Description Usage Arguments Details Value Author(s) References See Also Examples
automateConquestModel
facilitates data analysis using the software ConQuest. It automatically writes ConQuest syntax, label, anchor and data files
for a single model specified by several arguments in R. Moreover, a batch file is created to start the analysis. For automatically specifying and running
several models in a row, see automateModels
.
1 2 3 4 5 6 7 8 9 10 11 | automateConquestModel(dat, ID, regression=NULL, DIF=NULL, group.var=NULL,
weight=NULL, items, na=list(items=NULL, DIF=NULL, HG=NULL, group=NULL,
weight=NULL), person.grouping=NULL, item.grouping=NULL, compute.fit = TRUE,
model.statement="item", m.model="1pl", Title = NULL, jobName, jobFolder,
subFolder=list(), dataName=NULL, anchor=NULL, pathConquest, method=NULL,
std.err=NULL ,distribution=NULL, n.plausible=NULL, set.constraints=NULL,
nodes=NULL, p.nodes=NULL, f.nodes=NULL, n.iterations=NULL, converge=NULL,
deviancechange=NULL, seed = NULL, name.unidim=NULL, allowAllScoresEverywhere = FALSE,
equivalence.table="wle", use.letters=FALSE, checkLink=FALSE, verbose=TRUE,
export = list(logfile = TRUE, systemfile = TRUE, history = TRUE, covariance = TRUE,
reg_coefficients = TRUE, designmatrix = TRUE))
|
dat |
A data frame containing all variables necessary for analysis. |
ID |
Name or column number of the identifier (ID) variable. |
regression |
Names or column numbers of one or more context variables (e.g., sex, school). These variables will be used for latent regression in ConQuest. |
DIF |
Name or column number of one grouping variable for which differential item functioning analysis is to be done. |
group.var |
Names or column numbers of one or more grouping variables. Descriptive statistics for WLEs and Plausible Values will be computed separately for each group in ConQuest. |
weight |
Name or column number of one weighting variable. |
items |
Names or column numbers of variables with item responses. |
na |
A named list of numerical vectors indicating values to be considered as missing. Specific missing codes can be defined for each type of variable. |
item.grouping |
A named data frame indicating how items should be grouped to dimensions. The first column contains the names of all items and must be named |
person.grouping |
A named data frame indicating which persons should be grouped. The first column contains the identifier variable and must have the same name as the respective column in |
compute.fit |
Logical: Should fit statistics computed in ConQuest analysis? |
model.statement |
A character string with the model statement to use in the ConQuest syntax. If |
m.model |
A character string specifying the IRT model used for analysis. At the time, only |
Title |
A character string with the analysis title for the ConQuest syntax. If |
jobName |
A character string specifying the analysis name. All Conquest input and output files will named |
jobFolder |
A character string specifying an already existing folder where all analysis files will be written to, for example |
subFolder |
A named list of character strings specifying a maximum of two folders relative to |
dataName |
A character string specifying the dataset name if it is intended to be different from the name specified by |
anchor |
A named data frame with anchor parameters. The first column contains the names of all anchor items and must be named |
pathConquest |
A character string with path and name of the ConQuest console, for example |
method |
A character string indicating which method should be used for analysis. Possible options are |
std.err |
A character string specifying which type of standard error should be estimated. Possible options are |
distribution |
A character string indicating the a priori trait distribution. Possible options are |
n.plausible |
An integer value specifying the number of plausible values to draw. The default value is 5. |
set.constraints |
A character string specifying how the scale should be constrained. Possible options are |
nodes |
An integer value specifying the number of nodes to be used in the analysis. The default value is 15. |
p.nodes |
An integer value specifying the number of nodes that are used in the approximation of the posterior distributions, which are used in the drawing of plausible values and in the calculation of EAP estimates. The default value is 2000. |
f.nodes |
An integer value specifying the number of nodes that are used in the approximation of the posterior distributions in the calculation of fit statistics. The default value is 2000. |
n.iterations |
An integer value specifying the maximum number of iterations for which estimation will proceed without improvement in the deviance. The minimum value permitted is 5. The default value is 20. |
converge |
An integer value specifiying the convergence criterion for parameter estimates. The estimation will terminate when the largest change in any parameter estimate between successive iterations of the EM algorithm is less than |
deviancechange |
An integer value specifiying the convergence criterion for the deviance. The estimation will terminate when the change in the deviance between successive iterations of the EM algorithm is less than |
seed |
Sets the seed that is used in drawing random nodes for use in Monte Carlo estimation method. The default seed is 1. |
name.unidim |
A character string with the name of one latent dimension. Alternatively, the dimension name can be specified using the argument |
allowAllScoresEverywhere |
Logical: Relevant only in multidimensional models for polytomous data. If |
equivalence.table |
A character string specifying the type of equivalence table to print. Possible options are |
use.letters |
A logical value indicating whether item response values should be coded als letters. This option can be used in partial credit models comprising items with more than 10 categories to avoid response columns with width 2 in ConQuest. |
checkLink |
A logical value indicating whether the items in dataset are checked for being connected with each other via design. If |
verbose |
A logical value indicating whether messages are printed on the R console. |
export |
A named or unnamed list or vector of logical elements indicating whether Conquest should create logfile, systemfile, history file, covariance file, file of regression coefficients and file of designmatrix. |
If the folders specified in subFolder
should be parent folders to jobFolder
, they can be specified using double dots ..
. For example, if jobFolder
is "C:/programme/analysis"
and subFolder
is list(data="../dataset/analysis1", out="../../output/analysis1")
, dataset is written to "C:/programme/dataset/analysis1"
and output is
written to "C:/output/analysis1"
.
No results are returned to console. Input files and batch string are written to disk in specified folder(s).
Sebastian Weirich, Karoline Sachse, Martin Hecht
Wu, M.L., Adams, R.J., Wilson, M.R., & Haldane, S.A. (2007). ACER ConQuest Version 2.0. Generalised Item Response Modeling Software. Camberwell, Victoria: ACER Press.
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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | ## Not run:
#
# if software="conquest" (currently the only and default option) the path of the
# windows executable ConQuest console must be specified by setting
# conquestParameters = list ("pathConquest"="<path_to_your_conquest.exe>")
# e.g. conquestParameters = list ("pathConquest"=""C:/ConQuest/console.exe"")
# if not explicitely specified it is searched for in
# file.path(.Library,"eat/winexe/conquest")
# e.g. "C:/R/R-2.14.2/library/eat/winexe/conquest"
# you can put your ConQuest executable there
#
# load example data
# (these are simulated achievement test data)
# Note: all examples corresponding to examples in help file of 'automateModels'
data ( science1 )
#
### Example 1: create input files for a unidimensional Rasch model with all variables in dataset 'science1'
# only variables of 'science1' you want to use for analysis must be classified. In unidimensional Rasch model,
# 'id' and 'items' have to be specified
# automateConquestModel needs data with collapsed missing
science1.collapsed <- collapseMissings(science1, items = science1.items)
dir.create("C:/temp")
ex1 <- automateConquestModel ( dat = science1.collapsed, ID = "id", items = science1.items,
jobFolder = "C:/temp", jobName = "rasch_unidim")
#
### Example 2: create input files for a multidimensional Rasch model with DIF
# option 'item.grouping' specifies dimensions and mapping of items to dimensions
# 'item.grouping' is a data.frame with item names in first column ('item')
# and dimensions in further columns, mapping of items to dimension is
# indicated by 0 (item loads not on dimension) or 1 (item loads on dimension)
# (have a look at the example item.grouping 'science1.scales')
# since 6 dimensions are specified in 'science1.scales' input for a 6-dimensional Rasch model is run
# running this example may take some time + convergence is suboptimal. This is only for illustration.
# Note: in higher dimensional modes, number of nodes increased to 2^[number of dimensions]. If not explicitly
# specified by the user, automateModels automatically uses the estimator 'montecarlo', if nodes increased 3500
# Note: As DIF variable(s) have to be numeric in Conquest, factor variables (e.g. "sex" with male/female)
# will be expressed as numeric indicator variables.
science1.collapsed <- collapseMissings(science1, items = science1.items)
dir.create("C:/temp")
ex2 <- automateConquestModel ( item.grouping = science1.scales, dat = science1.collapsed, ID = "id", items = science1.items,
DIF = "sex", jobFolder = "C:/temp", jobName = "rasch_multidim" )
### Example 3: create input files for a multidimensional multigroup Rasch model with latent regression
# Note: As regression and group variables have to be numeric, factor variables (e.g. "sex" with male/female)
# will be expressed as numeric indicator variables.
# Moreover, unless estimation method is not specified explicitly, automateConquestModel chooses 'montecarlo' for
# estimation as 'gaussian quadrature' is not available due to latent regression model and 'Bock-Aitken' would use
# 11390625 nodes. Note: As 'montecarlo' needs to fix all item parameter when latent regression is applied, the
# parameters estimated in example 2 are used as anchor parameters here.
# Warning: This example may take a considerable amount of time. It's only for instruction.
science1.collapsed <- collapseMissings(science1, items = science1.items)
# in Conquest, latent regressors have to be numeric
dir.create("C:/temp")
# Run example 2 to gain item parameters
ex2 <- automateConquestModel ( item.grouping = science1.scales, dat = science1.collapsed, ID = "id", items = science1.items,
DIF = "sex", jobFolder = "C:/temp", jobName = "rasch_multidim" )
setwd("C:/temp")
system ( "rasch_multidim.bat" , wait = TRUE , show.output.on.console = FALSE , invisible = FALSE )
### get ANCHOR parametern
prm <- get.shw("rasch_multidim.shw")[[1]][,2:3]
ex3 <- automateConquestModel ( item.grouping = science1.scales, dat = science1.collapsed, ID = "id", items = science1.items,
anchor = prm, group = "track", regression = "grade", jobFolder = "C:/temp", jobName = "rasch_multidim_regression_group" )
#
### Example 4: create input files for a multidimensional partial credit model with latent regression and unequal factor loadings
# Warning: This example does not really make sense with regard to contents. It's only to illustrate generation of ConQuest input.
science1.collapsed <- collapseMissings(science1, items = science1.items)
# generate unequal factor loadings
science1.scales[c(10,14,20,22,1),2] <- 0.8
science1.scales[c(8,12,17), 2] <- 1.27
science1.scales[c(25,29,33), 3] <- 0.71
science1.scales[c(87,91,92), 5] <- 0.97
# generate a polytomous structure
for (i in science1.scales[,"item"]) {science1.collapsed[!is.na(science1.collapsed[,i]),i] <- sample(c(0:3), size = sum(!is.na(science1.collapsed[,i])), replace = TRUE)}
dir.create("C:/temp")
ex4 <- automateConquestModel ( item.grouping = science1.scales, dat = science1.collapsed, ID = "id", items = science1.items,
model.statement = "item + item*step", method = "quadrature", regression = "sex", jobFolder = "C:/temp", jobName = "pcm_multidim" )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.