Learn R Programming

mirt (version 0.8.0)

confmirt.model: Specify model loadings

Description

The confmirt.model function scans/reads user input to specify the confirmatory model.

Usage

confmirt.model(string = NULL, file = "", ...)

Arguments

string
a string input for writing out the model syntax.
file
a string specifying an external file that declares the input.
...
additional arguments for scan()

Value

  • Returns a model specification object to be used in confmirt.

Details

Factors are first named and then specify which numerical items they affect (i.e., where the slope is not equal to 0), separated either by commas or by - to indicate a range of items. Products between factors may be specified by enclosing the left hand term within brackets. To finish the declaration of a model simply enter a blank line with only a carriage return (i.e., the 'enter' or 'return' key), or instead read in a string version of the model syntax. There is an optional keyword for specifying the correlation between relationships between factors called COV, and non-linear factor products can be included by enclosing the product combination on the left hand side of the declaration (e.g., (F1*F1) would create a quadratic factor for F1). [object Object]

Examples

Run this code
model <- confmirt.model()
  F1 = 1,2,3,4-10
  F2 = 10-20
  (F1*F2) = 1,2,3,4-10
  COV = F1*F2


#Or alternatively
s <- 'F1 = 1,2,3,4-10
      F2 = 10-20
      (F1*F2) = 1,2,3,4-10
      COV = F1*F2'
model <- confmirt.model(s)

Run the code above in your browser using DataLab