Let’s load the Mosaic package:
require(mosaic)
# Poisson Distribution
plotDist('pois', type="h", params=list(2), xlim=c(-.5,25.5), ylim=c(0,.3), lwd=20, lineend = 1, col="darkgrey", main="Poisson with lambda=2")
plotDist('pois', type="h", params=list(10), xlim=c(-.5,25.5), ylim=c(0,.15), lwd=20, lineend = 1, col="darkgrey", main="Poisson with lambda=10")
# Binomial Distribution
plotDist('binom', type="h", params=list(size=10, prob=0.300), xlim=c(-.5,10.5), ylim=c(0,.3), lwd=50, lineend = 1, col="darkgrey", main="Binomial with p=0.30 and n=10")
plotDist('binom', type="h", params=list(size=10, prob=0.800), xlim=c(-.5,10.5), ylim=c(0,.3), lwd=50, lineend = 1, col="darkgrey", main="Binomial with p=0.30 and n=10")
# Normal Distribution
plotDist("norm", params=list(mean=100, sd=16), lwd=4, col="black", main="Normal with mu=100, sigma=16")
plotDist("norm", params=list(mean=110, sd=7), lwd=4, col="black", xlim=c(39,161), main="Normal with mu=110, sigma=7")
require(ltm)
## Loading required package: ltm
## Loading required package: MASS
## Loading required package: msm
## Loading required package: polycor
## Loading required package: mvtnorm
## Loading required package: sfsmisc
## Item Characteristic Curves LSAT questions
pl3 <- plot(tpm(LSAT, type = "rasch", max.guessing = 1))
text(2, 0.35, "Rasch model\nwith Guessing parameter")