plot.nlm: Plotting an object of class nlm

Description Usage Arguments Author(s) See Also Examples

Description

This plotting routine draws the Category Characteristic Curves (CCC) for each item.

Usage

1
2
## S3 method for class 'nelm'
plot(x, numbpoints = 100, fromto = c(-4, 4), ...)

Arguments

x

Commit an object of class 'nlm' which is a result of the nelm function.

numbpoints

A numerical vector of length 1, which denotes the number of points on the x-axis to draw the curves.

fromto

A numerical vector of length 2, which is about the same as xlim.

...

More plot arguments.

Author(s)

Manuel Reif

See Also

nelm

Examples

 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
## Not run: 

# create list of parameters
Item1 <- c(1,-2,c(-0.5,0.3,0.2),c(-0.5,-0.3,0.8))
names(Item1) <- c("a","b",paste("zeta1",1:3,sep=""),paste("lamb",1:3,sep=""))

Item2 <- c(1,-1,c(-0.5,-0.3,0.8),c(-0.5,0.3,0.2))
names(Item2) <- c("a","b",paste("zeta1",1:3,sep=""),paste("lamb",1:3,sep=""))

Item3 <- c(1,0,c(-0.5,-0.3,0.8),c(-0.5,0.3,0.2))
names(Item3) <- c("a","b",paste("zeta1",1:3,sep=""),paste("lamb",1:3,sep=""))

Item4 <- c(1,1,c(-0.5,-0.3,0.8),c(-0.5,0.3,0.2))
names(Item4) <- c("a","b",paste("zeta1",1:3,sep=""),paste("lamb",1:3,sep=""))

Item5 <- c(1,2,c(-0.5,-0.3,0.8),c(-0.5,0.3,0.2))
names(Item5) <- c("a","b",paste("zeta1",1:3,sep=""),paste("lamb",1:3,sep=""))

ParList <- list(Item1=Item1,Item2=Item2,Item3=Item3,Item4=Item4,Item5=Item5)

# simulate
perp1 <- rnorm(1000,0,1)
simdat1 <- NLM.sim(ParList,perp1)

# reshape
reshOBJ <- reshMG(simdat1,items=1:5,groups=NA,correct=rep(0,5),design="nodif",echo=TRUE,TYPE="NLM")

# estimate a nested logit model
res.nlm <- nelm(reshOBJ=reshOBJ)

# plot the estimated data
plot(res.nlm)



## End(Not run)

manuelreif/mcIRT documentation built on May 21, 2019, 11:26 a.m.