startalphas: Starting values for polytymous logit-normit model

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Computes starting values for estimation of polytymous logit-normit model.

Usage

1
2
startalphas(x, ncat, nitem=NULL)
startbetas(x, ncat, nitem=NULL)

Arguments

x

A data matrix. Data can be in one of two formats: 1) raw data where the number of rows corresponds to the number of raw cases and each column represents an item, and 2) a matrix of dimensions nrecX(nitem+1) where each row corresponds to a response pattern and the last column is the frequency of that response pattern. A data matrix of the second type requires input for nitem and nrec.

ncat

Number of ordinal categories for each item, coded as 0,...,(ncat-1). Currently supported are items that have the same number of categories.

nitem

Number of items. If omitted, it is assumed that x contains a data matrix of the first type (raw data) and the number of columns in x will be selected as the number of items.

Details

startalphas computes starting values for the (decreasing) cutpoints for the items based on logit transformed probabilities, assuming independent items.

startbetas computes starting values for slopes under the polytymous logit-normit model, using a method based on values that are proportional to the average correlations of each item with all other items. Starting values are currently bounded between -.2 and 1.

Value

A vector of starting values, depending on which function was called.

Author(s)

Carl F. Falk cffalk@gmail.com, Harry Joe

See Also

nrmlepln nrmlerasch nrbcpln

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
### Raw data
data(item9cat5)

myAlphas<-startalphas(item9cat5, ncat=5)
print(myAlphas)

myBetas<-startbetas(item9cat5, ncat=5)
print(myBetas)

nrbcplnout<-nrbcpln(item9cat5, ncat=5, alphas=myAlphas, betas=myBetas, se=FALSE)
print(nrbcplnout)


### Matrix of response patterns and frequencies
data(item5fr)

myAlphas<-startalphas(item5fr, ncat=3, nitem=5)
print(myAlphas)

myBetas<-startbetas(item5fr, ncat=3, nitem=5)
print(myBetas)

nrbcplnout<-nrbcpln(item5fr, ncat=3, nitem=5, alphas=myAlphas, betas=myBetas, se=FALSE)
print(nrbcplnout)


Search within the pln package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.