Description Usage Arguments Details Author(s) See Also Examples
The resulting latent distribution is plotted. This is especially relevant when using a nonparametric estimation of the latent distribution.
1 | plot_ldistr(x,...)
|
x |
An object of class |
... |
Insert further arguments to the plot function. |
The function is plotting quadrature nodes and weights for each group (in the case of a multigroup estimation) which are approximating the posterior ability distribution for the group.
Manuel Reif
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | ## Not run:
## simulating data
NUMBI <- 5
ParList <- lapply(1:NUMBI,function(x)
{
Item1 <- c(c(-2,-1,1,2),c(-1.2,0.3,0.2,0.7))
names(Item1) <- c(paste("zeta",1:4,sep=""),paste("lamb",1:4,sep=""))
Item1
})
names(ParList) <- paste("item",1:NUMBI,sep="")
perp1 <- rnorm(5000,0,1)
perp2 <- rnorm(5000,1,1)
simdat1 <- NRM.sim(ParList,perp1)
simdat2 <- NRM.sim(ParList,perp2)
simdat1 <- data.frame(ID=1:5000,simdat1)
simdat2 <- data.frame(ID=5001:10000,simdat2)
simdatalla <- merge(simdat1,simdat2,all=T)
simdatall <- simdatalla[,-1]
head(simdatall)
gruAB <- factor(rep(c("A","B"),each=5000))
DAT1 <- data.frame(simdatall,ABgroup = gruAB)
head(DAT1)
## reshaping the data
reshOBJ <- reshMG(DAT1,items=1:NUMBI,groups=NUMBI+1,correct=rep(1,NUMBI))
## estimating the model
examp1 <- nrm(reshOBJ, ctrl=list(nodes=31))
## End(Not run)
# loading the estimated model, because estimating the model during example check takes too long
data(examp1)
plot_ldistr(examp1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.