[rkward-cvs] SF.net SVN: rkward:[2387] trunk/rkward/rkward/plugins/analysis
sjar at users.sourceforge.net
sjar at users.sourceforge.net
Mon Nov 17 23:37:06 UTC 2008
Revision: 2387
http://rkward.svn.sourceforge.net/rkward/?rev=2387&view=rev
Author: sjar
Date: 2008-11-17 23:37:06 +0000 (Mon, 17 Nov 2008)
Log Message:
-----------
* experimental software
* analysis plug-ins for irt by meik michalke
* still under development, thus in own folder for easear maintenance (folder herachie will be flattned later)
Added Paths:
-----------
trunk/rkward/rkward/plugins/analysis/irt/
trunk/rkward/rkward/plugins/analysis/irt/dichotomous/
trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.php
trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.rkh
trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.xml
trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.php
trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.rkh
trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.xml
trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.php
trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.rkh
trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.xml
trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.php
trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.rkh
trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.xml
trunk/rkward/rkward/plugins/analysis/irt/polytomous/
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.php
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.rkh
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.xml
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.php
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.rkh
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.xml
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.php
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.rkh
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.xml
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.php
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.rkh
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.xml
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.php
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.rkh
trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.xml
trunk/rkward/rkward/plugins/analysis/irt/tests/
trunk/rkward/rkward/plugins/analysis/irt/tests/eRm_waldtest.php
trunk/rkward/rkward/plugins/analysis/irt/tests/eRm_waldtest.xml
trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.php
trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.xml
trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_gof_rasch.php
trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_gof_rasch.xml
trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_item_fit.php
trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_item_fit.xml
trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_person_fit.php
trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_person_fit.xml
trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_unidimensional.php
trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_unidimensional.xml
Added: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,56 @@
+<?
+function preprocess () {
+ // we'll need the ltm package, so in case it's not loaded...
+?>
+ require(ltm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $constraint = getRK_val("constraint");
+ $startval = getRK_val("startval");
+ $startval_mtx = getRK_val("startval_mtx");
+ $naaction = getRK_val("naaction");
+ $irtparam = getRK_val("irtparam");
+ $optimeth = getRK_val("optimeth");
+ $verbose = getRK_val("verbose");
+ // these are 2pl specific
+ $ghk_2pl = getRK_val("ghk_2pl");
+ $iterem = getRK_val("iterem");
+ $iterqn_2pl = getRK_val("iterqn_2pl");
+ $interact = getRK_val("interact");
+
+ ///////////////////////////////////
+ // check for selected advanced control options
+ $control = array() ;
+ if($iterem != "40")
+ $control[] = "iter.em=".$iterem ;
+ if($iterqn_2pl != "150")
+ $control[] = "iter.qN=".$iterqn_2pl ;
+ if($ghk_2pl != "15")
+ $control[] = "GHk=".$ghk_2pl ;
+ if($optimeth != "BFGS")
+ $control[] = "method=\"".$optimeth."\"" ;
+ if($verbose == "TRUE")
+ $control[] ="verbose=TRUE" ;
+
+?>estimates.2pl <<- ltm(<? getRK("x"); ?> ~ z1<?
+ // any additional options?
+ if($interact == "TRUE") echo(" * z2");
+ if($constraint) echo(", constraint=".$constraint);
+ if($irtparam != "TRUE") echo(", IRT.param=FALSE");
+ if($startval == "random") echo(", start.val=\"random\"");
+ if($startval == "matrix") echo(", start.val=".$startval_mtx);
+ if($naaction) echo(", na.action=".$naaction);
+ // finally check if any advanced control options must be inserted
+ if($control) echo(", control=list(".join(", ", $control).")");
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("2PL parameter estimation")
+rk.print (estimates.2pl)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.rkh (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.rkh 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,63 @@
+<!DOCTYPE rkhelp>
+ <document>
+ <summary>
+ This plugin estimates parameters under Item Response Theory approach, using the <link href="rkward://rhelp/ltm-package">ltm</link> package.
+ </summary>
+
+ <usage>
+ To fit the two parameter logistic model with default settings, just the matrix of manifest variables (dichotomous item responses) must be selected. Further options are described in the sections below.
+
+ The complete results are stored as a new object in the current workspace for further use (e.g. plotting item characteristic curves). This object will be called <code>estimates.2pl</code>.
+ </usage>
+
+ <settings>
+ <caption id="tab_data"/>
+ <setting id="x" title="Matrix of manifest variables">
+ Select the matrix of dichotomous item responses from the objects shown on the left.
+ </setting>
+
+ <caption id="tab_options"/>
+ <setting id="frame_constraints">
+ If you want to fix parameters, you have to prepare a matrix of fixed-value constraints first and then select it here. For detailed information on the specific layout of that matrix please refer to the manual for the <link href="rkward://rhelp/ltm">ltm()</link> function.
+ </setting>
+ <setting id="startval">
+ By default start values for the parameters are computed automatically. Alternatively, you can force the use of random start values, or give a matrix of values to be used. For detailed information on the specific layout of that matrix please refer to the manual for the <link href="rkward://rhelp/ltm">ltm()</link> function.
+ </setting>
+ <setting id="naaction">
+ Specifies how missing values are to be treated. By default all available cases are used. If checked, only complete cases will be considered.
+ </setting>
+ <setting id="irtparam">
+ If checked, the coefficients' estimates are reported under the usual Item Response Theory parameterization (which is the default).
+ </setting>
+
+ <caption id="tab_advanced_control"/>
+ <setting id="iterem" title="Number of EM iterations">
+ Defaults to 40.
+ </setting>
+ <setting id="iterqn_2pl" title="Number of quasi-Newton iterations">
+ Defaults to 150.
+ </setting>
+ <setting id="ghk_2pl" title="Number of Gauss-Hermite quadrature points">
+ Defaults to 15.
+ </setting>
+ <setting id="optimeth" title="Optimization method">
+ The default optimization method is BFGS. It can be set to Nelder-Mead, CG, L-BFGS-B, or SANN instead. Please refer to the <link href="rkward://rhelp/optim">optim()</link> manual for details.
+ </setting>
+ <setting id="verbose">
+ Pretty much speaks for itself ;-)
+ </setting>
+ </settings>
+
+ <related>
+ Please refer to the <code>ltm</code> manuals for further information and detailed command line options:
+ <ul>
+ <li><link href="rkward://rhelp/ltm-package"/></li>
+ <li><link href="rkward://rhelp/ltm"/></li>
+ </ul>
+ </related>
+
+ <technical>
+ <ul>
+ <li>The two factor solution of the <code>ltm()</code> function is not yet fully implemented (quadratic term is missing).</li>
+ </ul>
+ </technical>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,66 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="par_est_2pl.php" />
+ <help file="par_est_2pl.rkh" />
+
+ <logic>
+ <convert id="sv_matrix" mode="equals" sources="startval.string" standard="matrix" />
+
+ <connect client="startval_mtx.enabled" governor="sv_matrix" />
+ <connect client="startval_mtx.required" governor="sv_matrix" />
+ </logic>
+
+ <dialog label="IRT parameter estimation: Two parameter logistic model">
+ <tabbook>
+ <tab id="tab_data" label="Manifest variables">
+ <row id="manifest_resp_row">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="data.frame matrix" source="vars" required="true" label="Matrix of manifest variables:"/>
+ <stretch />
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_options" label="Options">
+ <row id="options_row">
+ <varselector id="vars2" />
+ <column id="opt_var_col">
+ <frame id="frame_constraints" label="Should parameters be fixed (constraints)?">
+ <varslot type="numeric" id="constraint" classes="data.frame matrix" source="vars2" label="Constraint matrix:"/>
+ </frame>
+ <stretch />
+ <radio label="Start values" id="startval">
+ <option label="Compute automatically" value="NULL" checked="true" />
+ <option label="Use random start values" value="random" />
+ <option label="Use own matrix of start values" value="matrix" />
+ </radio>
+ <varslot type="numeric" id="startval_mtx" classes="data.frame matrix" source="vars2" label="Matrix of start values:"/>
+ <frame label="Misc options">
+ <checkbox id="naaction" label="Use only complete cases" value="na.exclude" />
+ <checkbox id="irtparam" label="Usual IRT parameterization" checked="true" value="TRUE" />
+ <checkbox id="interact" label="Assume two-factor model with interaction term" value="TRUE" />
+ </frame>
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_advanced_control" label="Advanced control">
+ <row>
+ <column id="control_col">
+ <spinbox id="iterem" label="Number of EM iterations:" type="integer" initial="40" size="small" />
+ <spinbox id="iterqn_2pl" label="Number of quasi-Newton iterations:" type="integer" initial="150" size="small" />
+ <spinbox id="ghk_2pl" label="Number of Gauss-Hermite quadrature points:" type="integer" initial="15" size="small" />
+ <dropdown id="optimeth" label="Optimization method:">
+ <option label="BFGS" value="BFGS" checked="true" />
+ <option label="Nelder-Mead" value="Nelder-Mead" />
+ <option label="CG" value="CG" />
+ <option label="L-BFGS-B" value="L-BFGS-B" />
+ <option label="SANN" value="SANN" />
+ </dropdown>
+ <stretch />
+ <checkbox id="verbose" label="Print verbose info about optimization" value="TRUE" />
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,62 @@
+<?
+function preprocess () {
+ // we'll need the ltm package, so in case it's not loaded...
+?>
+ require(ltm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $constraint = getRK_val("constraint");
+ $startval = getRK_val("startval");
+ $startval_mtx = getRK_val("startval_mtx");
+ $naaction = getRK_val("naaction");
+ $irtparam = getRK_val("irtparam");
+ $optimeth = getRK_val("optimeth");
+ $verbose = getRK_val("verbose");
+ // these are 3pl specific
+ $ghk_3pl = getRK_val("ghk_3pl");
+ $iterqn_3pl = getRK_val("iterqn_3pl");
+ $type = getRK_val("type");
+ $maxguess = getRK_val("maxguess");
+ $optimizer = getRK_val("optimizer");
+ $epshess = getRK_val("epshess");
+ // $parscale = getRK_val("parscale"); not implemented yet...
+
+ ///////////////////////////////////
+ // check for selected advanced control options
+ $control = array() ;
+ if($optimizer != "optim")
+ $control[] = "optimizer=\"nlminb\"" ;
+ if($iterqn_3pl != "1000")
+ $control[] = "iter.qN=".$iterqn_3pl ;
+ if($ghk_3pl != "21")
+ $control[] = "GHk=".$ghk_3pl ;
+ if($optimizer == "optim" && $optimeth != "BFGS")
+ $control[] = "method=\"".$optimeth."\"" ;
+ if($verbose == "TRUE")
+ $control[] = "verbose=TRUE" ;
+ if($epshess != "1e-03")
+ $control[] = "eps.hessian=".$epshess ;
+
+?>estimates.3pl <<- tpm(<? getRK("x");
+ // any additional options?
+ if($type == "rasch") echo(", type=\"rasch\"");
+ if($constraint) echo(", constraint=".$constraint);
+ if($maxguess != "1") echo(", max.guessing=".$maxguess);
+ if($irtparam != "TRUE") echo(", IRT.param=FALSE");
+ if($startval == "random") echo(", start.val=\"random\"");
+ if($startval == "matrix") echo(", start.val=".$startval_mtx);
+ if($naaction) echo(", na.action=".$naaction);
+ // finally check if any advanced control options must be inserted
+ if($control) echo(", control=list(".join(", ", $control).")");
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("3PL parameter estimation")
+rk.print (estimates.3pl)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.rkh (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.rkh 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,73 @@
+<!DOCTYPE rkhelp>
+ <document>
+ <summary>
+ This plugin estimates parameters under Item Response Theory approach, using the <link href="rkward://rhelp/ltm-package">ltm</link> package.
+ </summary>
+
+ <usage>
+ To fit the Birnbaum three parameter model with default settings, just the matrix of manifest variables (dichotomous item responses) must be selected. Further options are described in the sections below.
+
+ The complete results are stored as a new object in the current workspace for further use (e.g. plotting item characteristic curves). This object will be called <code>estimates.3pl</code>.
+ </usage>
+
+ <settings>
+ <caption id="tab_data"/>
+ <setting id="x" title="Matrix of manifest variables">
+ Select the matrix of dichotomous item responses from the objects shown on the left.
+ </setting>
+
+ <caption id="tab_options"/>
+ <setting id="frame_constraints">
+ If you want to fix parameters, you have to prepare a matrix of fixed-value constraints first and then select it here. For detailed information on the specific layout of that matrix please refer to the manual for the <link href="rkward://rhelp/tpm">tpm()</link> function.
+ </setting>
+ <setting id="maxguess">
+ Limits the estimated guessing parameter (accepts values between 0 and 1).
+ </setting>
+ <setting id="startval">
+ By default start values for the parameters are computed automatically. Alternatively, you can force the use of random start values, or give a matrix of values to be used. For detailed information on the specific layout of that matrix please refer to the manual for the <link href="rkward://rhelp/tpm">tpm()</link> function.
+ </setting>
+ <setting id="type">
+ If checked it is assumed that discrimination parameters are equal for all items, as in the 1PL Rasch model. That leaves difficulty and guessing parameters to be estimated.
+ </setting>
+ <setting id="naaction">
+ Specifies how missing values are to be treated. By default all available cases are used. If checked, only complete cases will be considered.
+ </setting>
+ <setting id="irtparam">
+ If checked, the coefficients' estimates are reported under the usual Item Response Theory parameterization (which is the default).
+ </setting>
+
+ <caption id="tab_advanced_control"/>
+ <setting id="iterqn_3pl" title="Number of quasi-Newton iterations">
+ Defaults to 1000.
+ </setting>
+ <setting id="ghk_3pl" title="Number of Gauss-Hermite quadrature points">
+ Defaults to 21.
+ </setting>
+ <setting id="optimizer" title="Used optimizer">
+ By default <link href="rkward://rhelp/optim">optim()</link> is being used for optimization. Alternatively, <link href="rkward://rhelp/nlminb">nlminb()</link> can be called.
+ </setting>
+ <setting id="optimeth" title="Optimization method">
+ <i>Only if <code>optim()</code> is used:</i> The default optimization method is BFGS. It can be set to Nelder-Mead, CG, L-BFGS-B, or SANN instead. Please refer to the <link href="rkward://rhelp/optim">optim()</link> manual for details.
+ </setting>
+ <setting id="epshess">
+ Used in the central difference approximation that approximates the hessian. Defaults to 1e-03.
+ </setting>
+ <setting id="verbose">
+ Pretty much speaks for itself ;-)
+ </setting>
+ </settings>
+
+ <related>
+ Please refer to the <code>ltm</code> manuals for further information and detailed command line options:
+ <ul>
+ <li><link href="rkward://rhelp/ltm-package"/></li>
+ <li><link href="rkward://rhelp/tpm"/></li>
+ </ul>
+ </related>
+
+ <technical>
+ Todo:
+ <ul>
+ <li>The <code>parscale</code> control element is not yet implemented.</li>
+ </ul>
+ </technical>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,74 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="par_est_3pl.php" />
+ <help file="par_est_3pl.rkh" />
+
+ <logic>
+ <convert id="optim_used" mode="equals" sources="optimizer.string" standard="optim" />
+ <convert id="sv_matrix" mode="equals" sources="startval.string" standard="matrix" />
+
+ <connect client="optimeth.enabled" governor="optim_used" />
+ <connect client="startval_mtx.enabled" governor="sv_matrix" />
+ <connect client="startval_mtx.required" governor="sv_matrix" />
+ </logic>
+
+ <dialog label="IRT parameter estimation: Birnbaum three parameter model">
+ <tabbook>
+ <tab id="tab_data" label="Manifest variables">
+ <row id="manifest_resp_row">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="data.frame matrix" source="vars" required="true" label="Matrix of manifest variables:"/>
+ <stretch />
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_options" label="Options">
+ <row id="options_row">
+ <varselector id="vars2" />
+ <column id="opt_var_col">
+ <frame id="frame_constraints" label="Should parameters be fixed (constraints)?">
+ <varslot type="numeric" id="constraint" classes="data.frame matrix" source="vars2" label="Constraint matrix:"/>
+ </frame>
+ <spinbox id="maxguess" label="Upper bound for guessing parameter" type="real" initial="1" min="0" max="1" size="small" />
+ <stretch />
+ <radio label="Start values" id="startval">
+ <option label="Compute automatically" value="NULL" checked="true" />
+ <option label="Use random start values" value="random" />
+ <option label="Use own matrix of start values" value="matrix" />
+ </radio>
+ <varslot type="numeric" id="startval_mtx" classes="data.frame matrix" source="vars2" label="Matrix of start values:"/>
+ <frame label="Misc options">
+ <checkbox id="type" label="Assume equal discrimination parameters" value="rasch" />
+ <checkbox id="naaction" label="Use only complete cases" value="na.exclude" />
+ <checkbox id="irtparam" label="Usual IRT parameterization" checked="true" value="TRUE" />
+ </frame>
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_advanced_control" label="Advanced control">
+ <row>
+ <column id="control_col">
+ <spinbox id="iterqn_3pl" label="Number of quasi-Newton iterations:" type="integer" initial="1000" size="small" />
+ <spinbox id="ghk_3pl" label="Number of Gauss-Hermite quadrature points:" type="integer" initial="21" size="small" />
+ <dropdown id="optimizer" label="Used optimizer:">
+ <option label="optim()" value="optim" checked="true" />
+ <option label="nlminb()" value="nlminb" />
+ </dropdown>
+ <dropdown id="optimeth" label="Optimization method:">
+ <option label="BFGS" value="BFGS" checked="true" />
+ <option label="Nelder-Mead" value="Nelder-Mead" />
+ <option label="CG" value="CG" />
+ <option label="L-BFGS-B" value="L-BFGS-B" />
+ <option label="SANN" value="SANN" />
+ </dropdown>
+ <spinbox id="epshess" label="Step-length for approximation" type="real" initial="1e-03" size="small" />
+ <!-- todo: parscale option -->
+ <stretch />
+ <checkbox id="verbose" label="Print verbose info about optimization" value="TRUE" />
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,37 @@
+<?
+function preprocess () {
+ // we'll need the eRm package, so in case it's not loaded...
+?>
+ require(eRm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $mpoints = getRK_val("mpoints");
+ $groups = getRK_val("groups");
+ $group_vec = getRK_val("group_vec");
+ $design = getRK_val("design");
+ $design_mtx = getRK_val("design_mtx");
+ $etastart = getRK_val("etastart");
+ $etastart_vec = getRK_val("etastart_vec");
+ $stderr = getRK_val("stderr");
+ $sumnull = getRK_val("sumnull");
+
+?>estimates.lltm <<- LLTM(<? getRK("x");
+ // any additional options?
+ if($design == "matrix") echo(", W=".$design_mtx);
+ if($mpoints > 1) echo(", mpoints=".$mpoints);
+ if($groups == "contrasts") echo(", groupvec=".$group_vec);
+ if($stderr != "se") echo(", se=FALSE");
+ if($sumnull != "sum0") echo(", sum0=FALSE");
+ if($etastart == "startval") echo(", etaStart=".$etastart_vec);
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("LLTM parameter estimation")
+rk.print (estimates.lltm)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.rkh (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.rkh 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,47 @@
+<!DOCTYPE rkhelp>
+ <document>
+ <summary>
+ This plugin estimates parameters under Item Response Theory approach, using the <link href="rkward://rhelp/eRm-package">eRm</link> package.
+ </summary>
+
+ <usage>
+ To fit the linear logstic test model with default settings, just the matrix of manifest variables (dichotomous item responses) must be selected. Further options are described in the sections below. For detailed information on the expected layout of matrices and vectors please refer to the manual for the <link href="rkward://rhelp/LLTM">LLTM()</link> function.
+
+ The complete results are stored as a new object in the current workspace for further use (e.g. plotting item characteristic curves). This object will be called <code>estimates.lltm</code>.
+ </usage>
+
+ <settings>
+ <caption id="tab_data"/>
+ <setting id="x" title="Matrix of manifest variables">
+ Select the matrix of dichotomous item responses from the objects shown on the left.
+ </setting>
+ <setting id="mpoints">
+ If repeated measurement applies, specify how many are represented in the data matrix (defaults to 1). This will divide the columns in the matrix into equally sized subsets of data.
+ </setting>
+ <setting id="groups">
+ If you want to compute group contrasts, a vector determing the group membership of each subject must be given. By default no group contrasts are imposed.
+ </setting>
+
+ <caption id="tab_options"/>
+ <setting id="design">
+ By default the design matrix for the LLTM will be computed automatically. Alternatively, you may specify your own design matrix here.
+ </setting>
+ <setting id="etastart">
+ By default eta values start with the 0-vector. To change this, a vector of starting values can be specified.
+ </setting>
+ <setting id="stderr">
+ If checked, standard errors are computed (which is the default).
+ </setting>
+ <setting id="sumnull">
+ By default parameters are normalized to sum-0 by specifying an appropriate design matrix. Uncheck this box to restrict the first parameter to 0.
+ </setting>
+
+ </settings>
+
+ <related>
+ Please refer to the <code>eRm</code> manuals for further information and detailed command line options:
+ <ul>
+ <li><link href="rkward://rhelp/eRm-package"/></li>
+ <li><link href="rkward://rhelp/LLTM"/></li>
+ </ul>
+ </related>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,60 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="par_est_lltm.php" />
+ <help file="par_est_lltm.rkh" />
+
+ <logic>
+ <convert id="group_contrasts" mode="equals" sources="groups.string" standard="contrasts" />
+ <convert id="design_matrix" mode="equals" sources="design.string" standard="matrix" />
+ <convert id="eta_vector" mode="equals" sources="etastart.string" standard="startval" />
+
+ <connect client="group_vec.enabled" governor="group_contrasts" />
+ <connect client="group_vec.required" governor="group_contrasts" />
+ <connect client="design_mtx.enabled" governor="design_matrix" />
+ <connect client="design_mtx.required" governor="design_matrix" />
+ <connect client="etastart_vec.enabled" governor="eta_vector" />
+ <connect client="etastart_vec.required" governor="eta_vector" />
+ </logic>
+
+ <dialog label="IRT parameter estimation: Linear logistic test model">
+ <tabbook>
+ <tab id="tab_data" label="Manifest variables">
+ <row id="manifest_resp_row">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="data.frame matrix" source="vars" required="true" label="Matrix of manifest variables:"/>
+ <spinbox id="mpoints" label="Number of measurement points" type="integer" initial="1" min="1" size="small" />
+ <stretch />
+ <radio label="Group contrasts" id="groups">
+ <option label="All subjects belong to one group" value="1" checked="true" />
+ <option label="Compute group contrasts" value="contrasts" />
+ </radio>
+ <varslot type="numeric" id="group_vec" source="vars" label="Use this group vector:"/>
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_options" label="Options">
+ <row id="options_row">
+ <varselector id="vars2" />
+ <column id="opt_var_col">
+ <radio label="Design matrix" id="design">
+ <option label="Compute automatically" value="auto" checked="true" />
+ <option label="Use own design matrix" value="matrix" />
+ </radio>
+ <varslot type="numeric" id="design_mtx" classes="data.frame matrix" source="vars2" label="Design matrix:"/>
+ <stretch />
+ <radio label="Eta start values" id="etastart">
+ <option label="Use 0-vector" value="NULL" checked="true" />
+ <option label="Use own vector of eta start values" value="startval" />
+ </radio>
+ <varslot type="numeric" id="etastart_vec" source="vars2" label="Vector of start values:"/>
+ <frame label="Misc options">
+ <checkbox id="stderr" label="Compute standard error" checked="true" value="se" />
+ <checkbox id="sumnull" label="Normalize parameters to sum-0" checked="true" value="sum0" />
+ </frame>
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,51 @@
+<?
+function preprocess () {
+ // we'll need the ltm package, so in case it's not loaded...
+?>
+ require(ltm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $constraint = getRK_val("constraint");
+ $startval = getRK_val("startval");
+ $startval_mtx = getRK_val("startval_mtx");
+ $naaction = getRK_val("naaction");
+ $irtparam = getRK_val("irtparam");
+ $optimeth = getRK_val("optimeth");
+ $verbose = getRK_val("verbose");
+ // these are rasch specific
+ $ghk_rasch = getRK_val("ghk_rasch");
+ $iterqn_rasch = getRK_val("iterqn_rasch");
+
+ ///////////////////////////////////
+ // check for selected advanced control options
+ $control = array() ;
+ if($iterqn_rasch != "150")
+ $control[] = "iter.qN=".$iterqn_rasch ;
+ if($ghk_rasch != "21")
+ $control[] = "GHk=".$ghk_rasch ;
+ if($optimeth != "BFGS")
+ $control[] = "method=\"".$optimeth."\"" ;
+ if($verbose == "TRUE")
+ $control[] = "verbose=TRUE" ;
+
+?>estimates.rasch <<- rasch(<? getRK("x");
+ // any additional options?
+ if($constraint) echo(", constraint=".$constraint);
+ if($irtparam != "TRUE") echo(", IRT.param=FALSE");
+ if($startval == "random") echo(", start.val=\"random\"");
+ if($startval == "matrix") echo(", start.val=".$startval_mtx);
+ if($naaction) echo(", na.action=".$naaction);
+ // finally check if any advanced control options must be inserted
+ if($control) echo(", control=list(".join(", ", $control).")");
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("Rasch parameter estimation")
+rk.print (estimates.rasch$coefficients)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.rkh (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.rkh 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,54 @@
+<!DOCTYPE rkhelp>
+ <document>
+ <summary>
+ This plugin estimates parameters under Item Response Theory approach, using the <link href="rkward://rhelp/ltm-package">ltm</link> package.
+ </summary>
+
+ <usage>
+ To fit the Rasch model with default settings, just the matrix of manifest variables (dichotomous item responses) must be selected. Further options are described in the sections below.
+
+ The complete results are stored as a new object in the current workspace for further use (e.g. plotting item characteristic curves). This object will be called <code>estimates.rasch</code>.
+ </usage>
+
+ <settings>
+ <caption id="tab_data"/>
+ <setting id="x" title="Matrix of manifest variables">
+ Select the matrix of dichotomous item responses from the objects shown on the left.
+ </setting>
+
+ <caption id="tab_options"/>
+ <setting id="frame_constraints">
+ If you want to fix parameters, you have to prepare a matrix of fixed-value constraints first and then select it here. For detailed information on the specific layout of that matrix please refer to the manual for the <link href="rkward://rhelp/rasch">rasch()</link> function.
+ </setting>
+ <setting id="startval">
+ By default start values for the parameters are computed automatically. Alternatively, you can force the use of random start values, or give a matrix of values to be used. For detailed information on the specific layout of that matrix please refer to the manual for the <link href="rkward://rhelp/rasch">rasch()</link> function.
+ </setting>
+ <setting id="naaction">
+ Specifies how missing values are to be treated. By default all available cases are used. If checked, only complete cases will be considered.
+ </setting>
+ <setting id="irtparam">
+ If checked, the coefficients' estimates are reported under the usual Item Response Theory parameterization (which is the default).
+ </setting>
+
+ <caption id="tab_advanced_control"/>
+ <setting id="iterqn_rasch" title="Number of quasi-Newton iterations">
+ Defaults to 150.
+ </setting>
+ <setting id="ghk_rasch" title="Number of Gauss-Hermite quadrature points">
+ Defaults to 21.
+ </setting>
+ <setting id="optimeth" title="Optimization method">
+ The default optimization method is BFGS. It can be set to Nelder-Mead, CG, L-BFGS-B, or SANN instead. Please refer to the <link href="rkward://rhelp/optim">optim()</link> manual for details.
+ </setting>
+ <setting id="verbose">
+ Pretty much speaks for itself ;-)
+ </setting>
+ </settings>
+
+ <related>
+ Please refer to the <code>ltm</code> manuals for further information and detailed command line options:
+ <ul>
+ <li><link href="rkward://rhelp/ltm-package"/></li>
+ <li><link href="rkward://rhelp/rasch"/></li>
+ </ul>
+ </related>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,64 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="par_est_rasch.php" />
+ <help file="par_est_rasch.rkh" />
+
+ <logic>
+ <convert id="sv_matrix" mode="equals" sources="startval.string" standard="matrix" />
+
+ <connect client="startval_mtx.enabled" governor="sv_matrix" />
+ <connect client="startval_mtx.required" governor="sv_matrix" />
+ </logic>
+
+ <dialog label="IRT parameter estimation: Rasch model">
+ <tabbook>
+ <tab id="tab_data" label="Manifest variables">
+ <row id="manifest_resp_row">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="data.frame matrix" source="vars" required="true" label="Matrix of manifest variables:"/>
+ <stretch />
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_options" label="Options">
+ <row id="options_row">
+ <varselector id="vars2" />
+ <column id="opt_var_col">
+ <frame id="frame_constraints" label="Should parameters be fixed (constraints)?">
+ <varslot type="numeric" id="constraint" classes="data.frame matrix" source="vars2" label="Constraint matrix:"/>
+ </frame>
+ <stretch />
+ <radio label="Start values" id="startval">
+ <option label="Compute automatically" value="NULL" checked="true" />
+ <option label="Use random start values" value="random" />
+ <option label="Use own matrix of start values" value="matrix" />
+ </radio>
+ <varslot type="numeric" id="startval_mtx" classes="data.frame matrix" source="vars2" label="Matrix of start values:"/>
+ <frame label="Misc options">
+ <checkbox id="naaction" label="Use only complete cases" value="na.exclude" />
+ <checkbox id="irtparam" label="Usual IRT parameterization" checked="true" value="TRUE" />
+ </frame>
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_advanced_control" label="Advanced control">
+ <row>
+ <column id="control_col">
+ <spinbox id="iterqn_rasch" label="Number of quasi-Newton iterations:" type="integer" initial="150" size="small" />
+ <spinbox id="ghk_rasch" label="Number of Gauss-Hermite quadrature points:" type="integer" initial="21" size="small" />
+ <dropdown id="optimeth" label="Optimization method:">
+ <option label="BFGS" value="BFGS" checked="true" />
+ <option label="Nelder-Mead" value="Nelder-Mead" />
+ <option label="CG" value="CG" />
+ <option label="L-BFGS-B" value="L-BFGS-B" />
+ <option label="SANN" value="SANN" />
+ </dropdown>
+ <stretch />
+ <checkbox id="verbose" label="Print verbose info about optimization" value="TRUE" />
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,56 @@
+<?
+function preprocess () {
+ // we'll need the ltm package, so in case it's not loaded...
+?>
+ require(ltm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $constraint = getRK_val("constraint");
+ $startval = getRK_val("startval");
+ $startval_lst = getRK_val("startval_lst");
+ $hessian = getRK_val("hessian");
+ $naaction = getRK_val("naaction");
+ $irtparam = getRK_val("irtparam");
+ $optimeth = getRK_val("optimeth");
+ $verbose = getRK_val("verbose");
+ // these are grm specific
+ $ghk_grm = getRK_val("ghk_grm");
+ $iterqn_grm = getRK_val("iterqn_grm");
+ $dig_abbrv = getRK_val("dig_abbrv");
+
+ ///////////////////////////////////
+ // check for selected advanced control options
+ $control = array() ;
+ if($iterqn_grm != "150")
+ $control[] = "iter.qN=".$iterqn_grm ;
+ if($ghk_grm != "21")
+ $control[] = "GHk=".$ghk_grm ;
+ if($optimeth != "BFGS")
+ $control[] = "method=\"".$optimeth."\"" ;
+ if($verbose == "TRUE")
+ $control[] = "verbose=TRUE" ;
+ if($dig_abbrv != "6")
+ $control[] = "digits.abbrv=".$dig_abbrv ;
+
+?>estimates.grm <<- grm(<? getRK("x");
+ // any additional options?
+ if($constraint == "const_discr") echo(", constrained=TRUE");
+ if($irtparam != "TRUE") echo(", IRT.param=FALSE");
+ if($hessian == "hessian") echo(", Hessian=TRUE");
+ if($startval == "random") echo(", start.val=\"random\"");
+ if($startval == "list") echo(", start.val=".$startval_lst);
+ if($naaction) echo(", na.action=".$naaction);
+ // finally check if any advanced control options must be inserted
+ if($control) echo(", control=list(".join(", ", $control).")");
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("GRM parameter estimation")
+rk.print (estimates.grm)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.rkh (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.rkh 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,67 @@
+<!DOCTYPE rkhelp>
+ <document>
+ <summary>
+ This plugin estimates parameters under Item Response Theory approach, using the <link href="rkward://rhelp/ltm-package">ltm</link> package.
+ </summary>
+
+ <usage>
+ To fit the graded response model with default settings, just the matrix of manifest variables (polytomous item responses) must be selected. Further options are described in the sections below.
+
+ The complete results are stored as a new object in the current workspace for further use (e.g. plotting item characteristic curves). This object will be called <code>estimates.grm</code>.
+ </usage>
+
+ <settings>
+ <caption id="tab_data"/>
+ <setting id="x" title="Matrix of manifest variables">
+ Select the matrix of polytomous item responses from the objects shown on the left.
+ </setting>
+
+ <caption id="tab_options"/>
+ <setting id="frame_constraints">
+ If checked it is assumed that discrimination parameters are equal for all items.
+ </setting>
+ <setting id="startval">
+ By default start values for the parameters are computed automatically. Alternatively, you can force the use of random start values, or give a list of values to be used. For detailed information on the specific layout of that list please refer to the manual for the <link href="rkward://rhelp/grm">grm()</link> function.
+ </setting>
+ <setting id="hessian">
+ If checked the Hessian matrix is computed.
+ </setting>
+ <setting id="naaction">
+ Specifies how missing values are to be treated. By default all available cases are used. If checked, only complete cases will be considered.
+ </setting>
+ <setting id="irtparam">
+ If checked, the coefficients' estimates are reported under the usual Item Response Theory parameterization (which is the default).
+ </setting>
+
+ <caption id="tab_advanced_control"/>
+ <setting id="iterqn_grm" title="Number of quasi-Newton iterations">
+ Defaults to 150.
+ </setting>
+ <setting id="ghk_grm" title="Number of Gauss-Hermite quadrature points">
+ Defaults to 21.
+ </setting>
+ <setting id="optimeth" title="Optimization method">
+ The default optimization method is BFGS. It can be set to Nelder-Mead, CG, L-BFGS-B, or SANN instead. Please refer to the <link href="rkward://rhelp/optim">optim()</link> manual for details.
+ </setting>
+ <setting id="dig_abbrv" title="Number of digits to abbreviate item names">
+ Specifies how many digits are used in abbreviating item names. Defaults to 6.
+ </setting>
+ <setting id="verbose">
+ Pretty much speaks for itself ;-)
+ </setting>
+ </settings>
+
+ <related>
+ Please refer to the <code>ltm</code> manuals for further information and detailed command line options:
+ <ul>
+ <li><link href="rkward://rhelp/ltm-package"/></li>
+ <li><link href="rkward://rhelp/grm"/></li>
+ </ul>
+ </related>
+
+ <technical>
+ Todo:
+ <ul>
+ <li>The <code>parscale</code> control element is not yet implemented.</li>
+ </ul>
+ </technical>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,66 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="par_est_grm.php" />
+ <help file="par_est_grm.rkh" />
+
+ <logic>
+ <convert id="sv_matrix" mode="equals" sources="startval.string" standard="list" />
+
+ <connect client="startval_lst.enabled" governor="sv_matrix" />
+ <connect client="startval_lst.required" governor="sv_matrix" />
+ </logic>
+
+ <dialog label="IRT parameter estimation: Graded response model">
+ <tabbook>
+ <tab id="tab_data" label="Manifest variables">
+ <row id="manifest_resp_row">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="data.frame matrix" source="vars" required="true" label="Matrix of manifest variables:"/>
+ <stretch />
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_options" label="Options">
+ <row id="options_row">
+ <varselector id="vars2" />
+ <column id="opt_var_col">
+ <frame id="frame_constraints" label="Should parameters be fixed (constraints)?">
+ <checkbox id="constraint" label="Assume equal discrimination parameters across items" value="const_discr" />
+ </frame>
+ <stretch />
+ <radio label="Start values" id="startval">
+ <option label="Compute automatically" value="NULL" checked="true" />
+ <option label="Use random start values" value="random" />
+ <option label="Use own list of start values" value="list" />
+ </radio>
+ <varslot type="numeric" id="startval_lst" source="vars2" label="List of start values:"/>
+ <frame label="Misc options">
+ <checkbox id="hessian" label="Compute Hessian matrix" value="hessian" />
+ <checkbox id="naaction" label="Use only complete cases" value="na.exclude" />
+ <checkbox id="irtparam" label="Usual IRT parameterization" checked="true" value="TRUE" />
+ </frame>
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_advanced_control" label="Advanced control">
+ <row>
+ <column id="control_col">
+ <spinbox id="iterqn_grm" label="Number of quasi-Newton iterations:" type="integer" initial="150" size="small" />
+ <spinbox id="ghk_grm" label="Number of Gauss-Hermite quadrature points:" type="integer" initial="21" size="small" />
+ <dropdown id="optimeth" label="Optimization method:">
+ <option label="BFGS" value="BFGS" checked="true" />
+ <option label="Nelder-Mead" value="Nelder-Mead" />
+ <option label="CG" value="CG" />
+ <option label="L-BFGS-B" value="L-BFGS-B" />
+ <option label="SANN" value="SANN" />
+ </dropdown>
+ <spinbox id="dig_abbrv" label="Number of digits to abbreviate item names:" type="integer" initial="6" size="small" />
+ <stretch />
+ <checkbox id="verbose" label="Print verbose info about optimization" value="TRUE" />
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,37 @@
+<?
+function preprocess () {
+ // we'll need the eRm package, so in case it's not loaded...
+?>
+ require(eRm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $mpoints = getRK_val("mpoints");
+ $groups = getRK_val("groups");
+ $group_vec = getRK_val("group_vec");
+ $design = getRK_val("design");
+ $design_mtx = getRK_val("design_mtx");
+ $etastart = getRK_val("etastart");
+ $etastart_vec = getRK_val("etastart_vec");
+ $stderr = getRK_val("stderr");
+ $sumnull = getRK_val("sumnull");
+
+?>estimates.lpcm <<- LPCM(<? getRK("x");
+ // any additional options?
+ if($design == "matrix") echo(", W=".$design_mtx);
+ if($mpoints > 1) echo(", mpoints=".$mpoints);
+ if($groups == "contrasts") echo(", groupvec=".$group_vec);
+ if($stderr != "se") echo(", se=FALSE");
+ if($sumnull != "sum0") echo(", sum0=FALSE");
+ if($etastart == "startval") echo(", etaStart=".$etastart_vec);
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("LPCM parameter estimation")
+rk.print (estimates.lpcm)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.rkh (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.rkh 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,47 @@
+<!DOCTYPE rkhelp>
+ <document>
+ <summary>
+ This plugin estimates parameters under Item Response Theory approach, using the <link href="rkward://rhelp/eRm-package">eRm</link> package.
+ </summary>
+
+ <usage>
+ To fit the linear partial credit model with default settings, just the matrix of manifest variables (item responses) must be selected. Further options are described in the sections below. For detailed information on the expected layout of matrices and vectors please refer to the manual for the <link href="rkward://rhelp/LPCM">LPCM()</link> function.
+
+ The complete results are stored as a new object in the current workspace for further use (e.g. plotting item characteristic curves). This object will be called <code>estimates.lpcm</code>.
+ </usage>
+
+ <settings>
+ <caption id="tab_data"/>
+ <setting id="x" title="Matrix of manifest variables">
+ Select the matrix of item responses from the objects shown on the left.
+ </setting>
+ <setting id="mpoints">
+ If repeated measurement applies, specify how many are represented in the data matrix (defaults to 1). This will divide the columns in the matrix into equally sized subsets of data.
+ </setting>
+ <setting id="groups">
+ If you want to compute group contrasts, a vector determing the group membership of each subject must be given. By default no group contrasts are imposed.
+ </setting>
+
+ <caption id="tab_options"/>
+ <setting id="design">
+ By default the design matrix for the LPCM will be computed automatically. Alternatively, you may specify your own design matrix here.
+ </setting>
+ <setting id="etastart">
+ By default eta values start with the 0-vector. To change this, a vector of starting values can be specified.
+ </setting>
+ <setting id="stderr">
+ If checked, standard errors are computed (which is the default).
+ </setting>
+ <setting id="sumnull">
+ By default parameters are normalized to sum-0 by specifying an appropriate design matrix. Uncheck this box to restrict the first parameter to 0.
+ </setting>
+
+ </settings>
+
+ <related>
+ Please refer to the <code>eRm</code> manuals for further information and detailed command line options:
+ <ul>
+ <li><link href="rkward://rhelp/eRm-package"/></li>
+ <li><link href="rkward://rhelp/LPCM"/></li>
+ </ul>
+ </related>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,60 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="par_est_lpcm.php" />
+ <help file="par_est_lpcm.rkh" />
+
+ <logic>
+ <convert id="group_contrasts" mode="equals" sources="groups.string" standard="contrasts" />
+ <convert id="design_matrix" mode="equals" sources="design.string" standard="matrix" />
+ <convert id="eta_vector" mode="equals" sources="etastart.string" standard="startval" />
+
+ <connect client="group_vec.enabled" governor="group_contrasts" />
+ <connect client="group_vec.required" governor="group_contrasts" />
+ <connect client="design_mtx.enabled" governor="design_matrix" />
+ <connect client="design_mtx.required" governor="design_matrix" />
+ <connect client="etastart_vec.enabled" governor="eta_vector" />
+ <connect client="etastart_vec.required" governor="eta_vector" />
+ </logic>
+
+ <dialog label="IRT parameter estimation: Linear partial credit model">
+ <tabbook>
+ <tab id="tab_data" label="Manifest variables">
+ <row id="manifest_resp_row">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="data.frame matrix" source="vars" required="true" label="Matrix of manifest variables:"/>
+ <spinbox id="mpoints" label="Number of measurement points" type="integer" initial="1" min="1" size="small" />
+ <stretch />
+ <radio label="Group contrasts" id="groups">
+ <option label="All subjects belong to one group" value="1" checked="true" />
+ <option label="Compute group contrasts" value="contrasts" />
+ </radio>
+ <varslot type="numeric" id="group_vec" source="vars" label="Use this group vector:"/>
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_options" label="Options">
+ <row id="options_row">
+ <varselector id="vars2" />
+ <column id="opt_var_col">
+ <radio label="Design matrix" id="design">
+ <option label="Compute automatically" value="auto" checked="true" />
+ <option label="Use own design matrix" value="matrix" />
+ </radio>
+ <varslot type="numeric" id="design_mtx" classes="data.frame matrix" source="vars2" label="Design matrix:"/>
+ <stretch />
+ <radio label="Eta start values" id="etastart">
+ <option label="Use 0-vector" value="NULL" checked="true" />
+ <option label="Use own vector of eta start values" value="startval" />
+ </radio>
+ <varslot type="numeric" id="etastart_vec" source="vars2" label="Vector of start values:"/>
+ <frame label="Misc options">
+ <checkbox id="stderr" label="Compute standard error" checked="true" value="se" />
+ <checkbox id="sumnull" label="Normalize parameters to sum-0" checked="true" value="sum0" />
+ </frame>
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,37 @@
+<?
+function preprocess () {
+ // we'll need the eRm package, so in case it's not loaded...
+?>
+ require(eRm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $mpoints = getRK_val("mpoints");
+ $groups = getRK_val("groups");
+ $group_vec = getRK_val("group_vec");
+ $design = getRK_val("design");
+ $design_mtx = getRK_val("design_mtx");
+ $etastart = getRK_val("etastart");
+ $etastart_vec = getRK_val("etastart_vec");
+ $stderr = getRK_val("stderr");
+ $sumnull = getRK_val("sumnull");
+
+?>estimates.lrsm <<- LRSM(<? getRK("x");
+ // any additional options?
+ if($design == "matrix") echo(", W=".$design_mtx);
+ if($mpoints > 1) echo(", mpoints=".$mpoints);
+ if($groups == "contrasts") echo(", groupvec=".$group_vec);
+ if($stderr != "se") echo(", se=FALSE");
+ if($sumnull != "sum0") echo(", sum0=FALSE");
+ if($etastart == "startval") echo(", etaStart=".$etastart_vec);
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("LRSM parameter estimation")
+rk.print (estimates.lrsm)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.rkh (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.rkh 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,47 @@
+<!DOCTYPE rkhelp>
+ <document>
+ <summary>
+ This plugin estimates parameters under Item Response Theory approach, using the <link href="rkward://rhelp/eRm-package">eRm</link> package.
+ </summary>
+
+ <usage>
+ To fit the linear rating scale model with default settings, just the matrix of manifest variables (item responses) must be selected. Further options are described in the sections below. For detailed information on the expected layout of matrices and vectors please refer to the manual for the <link href="rkward://rhelp/LRSM">LRSM()</link> function.
+
+ The complete results are stored as a new object in the current workspace for further use (e.g. plotting item characteristic curves). This object will be called <code>estimates.lrsm</code>.
+ </usage>
+
+ <settings>
+ <caption id="tab_data"/>
+ <setting id="x" title="Matrix of manifest variables">
+ Select the matrix of item responses from the objects shown on the left.
+ </setting>
+ <setting id="mpoints">
+ If repeated measurement applies, specify how many are represented in the data matrix (defaults to 1). This will divide the columns in the matrix into equally sized subsets of data.
+ </setting>
+ <setting id="groups">
+ If you want to compute group contrasts, a vector determing the group membership of each subject must be given. By default no group contrasts are imposed.
+ </setting>
+
+ <caption id="tab_options"/>
+ <setting id="design">
+ By default the design matrix for the LRSM will be computed automatically. Alternatively, you may specify your own design matrix here.
+ </setting>
+ <setting id="etastart">
+ By default eta values start with the 0-vector. To change this, a vector of starting values can be specified.
+ </setting>
+ <setting id="stderr">
+ If checked, standard errors are computed (which is the default).
+ </setting>
+ <setting id="sumnull">
+ By default parameters are normalized to sum-0 by specifying an appropriate design matrix. Uncheck this box to restrict the first parameter to 0.
+ </setting>
+
+ </settings>
+
+ <related>
+ Please refer to the <code>eRm</code> manuals for further information and detailed command line options:
+ <ul>
+ <li><link href="rkward://rhelp/eRm-package"/></li>
+ <li><link href="rkward://rhelp/LRSM"/></li>
+ </ul>
+ </related>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,60 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="par_est_lrsm.php" />
+ <help file="par_est_lrsm.rkh" />
+
+ <logic>
+ <convert id="group_contrasts" mode="equals" sources="groups.string" standard="contrasts" />
+ <convert id="design_matrix" mode="equals" sources="design.string" standard="matrix" />
+ <convert id="eta_vector" mode="equals" sources="etastart.string" standard="startval" />
+
+ <connect client="group_vec.enabled" governor="group_contrasts" />
+ <connect client="group_vec.required" governor="group_contrasts" />
+ <connect client="design_mtx.enabled" governor="design_matrix" />
+ <connect client="design_mtx.required" governor="design_matrix" />
+ <connect client="etastart_vec.enabled" governor="eta_vector" />
+ <connect client="etastart_vec.required" governor="eta_vector" />
+ </logic>
+
+ <dialog label="IRT parameter estimation: Linear rating scale model">
+ <tabbook>
+ <tab id="tab_data" label="Manifest variables">
+ <row id="manifest_resp_row">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="data.frame matrix" source="vars" required="true" label="Matrix of manifest variables:"/>
+ <spinbox id="mpoints" label="Number of measurement points" type="integer" initial="1" min="1" size="small" />
+ <stretch />
+ <radio label="Group contrasts" id="groups">
+ <option label="All subjects belong to one group" value="1" checked="true" />
+ <option label="Compute group contrasts" value="contrasts" />
+ </radio>
+ <varslot type="numeric" id="group_vec" source="vars" label="Use this group vector:"/>
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_options" label="Options">
+ <row id="options_row">
+ <varselector id="vars2" />
+ <column id="opt_var_col">
+ <radio label="Design matrix" id="design">
+ <option label="Compute automatically" value="auto" checked="true" />
+ <option label="Use own design matrix" value="matrix" />
+ </radio>
+ <varslot type="numeric" id="design_mtx" classes="data.frame matrix" source="vars2" label="Design matrix:"/>
+ <stretch />
+ <radio label="Eta start values" id="etastart">
+ <option label="Use 0-vector" value="NULL" checked="true" />
+ <option label="Use own vector of eta start values" value="startval" />
+ </radio>
+ <varslot type="numeric" id="etastart_vec" source="vars2" label="Vector of start values:"/>
+ <frame label="Misc options">
+ <checkbox id="stderr" label="Compute standard error" checked="true" value="se" />
+ <checkbox id="sumnull" label="Normalize parameters to sum-0" checked="true" value="sum0" />
+ </frame>
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,32 @@
+<?
+function preprocess () {
+ // we'll need the eRm package, so in case it's not loaded...
+?>
+ require(eRm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $design = getRK_val("design");
+ $design_mtx = getRK_val("design_mtx");
+ $etastart = getRK_val("etastart");
+ $etastart_vec = getRK_val("etastart_vec");
+ $stderr = getRK_val("stderr");
+ $sumnull = getRK_val("sumnull");
+
+?>estimates.pcm <<- PCM(<? getRK("x");
+ // any additional options?
+ if($design == "matrix") echo(", W=".$design_mtx);
+ if($stderr != "se") echo(", se=FALSE");
+ if($sumnull != "sum0") echo(", sum0=FALSE");
+ if($etastart == "startval") echo(", etaStart=".$etastart_vec);
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("PCM parameter estimation")
+rk.print (estimates.pcm)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.rkh (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.rkh 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,41 @@
+<!DOCTYPE rkhelp>
+ <document>
+ <summary>
+ This plugin estimates parameters under Item Response Theory approach, using the <link href="rkward://rhelp/eRm-package">eRm</link> package.
+ </summary>
+
+ <usage>
+ To fit the partial credit model with default settings, just the matrix of manifest variables (item responses) must be selected. Further options are described in the sections below. For detailed information on the expected layout of matrices and vectors please refer to the manual for the <link href="rkward://rhelp/PCM">PCM()</link> function.
+
+ The complete results are stored as a new object in the current workspace for further use (e.g. plotting item characteristic curves). This object will be called <code>estimates.pcm</code>.
+ </usage>
+
+ <settings>
+ <caption id="tab_data"/>
+ <setting id="x" title="Matrix of manifest variables">
+ Select the matrix of item responses from the objects shown on the left.
+ </setting>
+
+ <caption id="tab_options"/>
+ <setting id="design">
+ By default the design matrix for the PCM will be computed automatically. Alternatively, you may specify your own design matrix here.
+ </setting>
+ <setting id="etastart">
+ By default eta values start with the 0-vector. To change this, a vector of starting values can be specified.
+ </setting>
+ <setting id="stderr">
+ If checked, standard errors are computed (which is the default).
+ </setting>
+ <setting id="sumnull">
+ By default parameters are normalized to sum-0 by specifying an appropriate design matrix. Uncheck this box to restrict the first parameter to 0.
+ </setting>
+
+ </settings>
+
+ <related>
+ Please refer to the <code>eRm</code> manuals for further information and detailed command line options:
+ <ul>
+ <li><link href="rkward://rhelp/eRm-package"/></li>
+ <li><link href="rkward://rhelp/PCM"/></li>
+ </ul>
+ </related>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,51 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="par_est_pcm.php" />
+ <help file="par_est_pcm.rkh" />
+
+ <logic>
+ <convert id="design_matrix" mode="equals" sources="design.string" standard="matrix" />
+ <convert id="eta_vector" mode="equals" sources="etastart.string" standard="startval" />
+
+ <connect client="design_mtx.enabled" governor="design_matrix" />
+ <connect client="design_mtx.required" governor="design_matrix" />
+ <connect client="etastart_vec.enabled" governor="eta_vector" />
+ <connect client="etastart_vec.required" governor="eta_vector" />
+ </logic>
+
+ <dialog label="IRT parameter estimation: Partial credit model">
+ <tabbook>
+ <tab id="tab_data" label="Manifest variables">
+ <row id="manifest_resp_row">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="data.frame matrix" source="vars" required="true" label="Matrix of manifest variables:"/>
+ <stretch />
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_options" label="Options">
+ <row id="options_row">
+ <varselector id="vars2" />
+ <column id="opt_var_col">
+ <radio label="Design matrix" id="design">
+ <option label="Compute automatically" value="auto" checked="true" />
+ <option label="Use own design matrix" value="matrix" />
+ </radio>
+ <varslot type="numeric" id="design_mtx" classes="data.frame matrix" source="vars2" label="Design matrix:"/>
+ <stretch />
+ <radio label="Eta start values" id="etastart">
+ <option label="Use 0-vector" value="NULL" checked="true" />
+ <option label="Use own vector of eta start values" value="startval" />
+ </radio>
+ <varslot type="numeric" id="etastart_vec" source="vars2" label="Vector of start values:"/>
+ <frame label="Misc options">
+ <checkbox id="stderr" label="Compute standard error" checked="true" value="se" />
+ <checkbox id="sumnull" label="Normalize parameters to sum-0" checked="true" value="sum0" />
+ </frame>
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,32 @@
+<?
+function preprocess () {
+ // we'll need the eRm package, so in case it's not loaded...
+?>
+ require(eRm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $design = getRK_val("design");
+ $design_mtx = getRK_val("design_mtx");
+ $etastart = getRK_val("etastart");
+ $etastart_vec = getRK_val("etastart_vec");
+ $stderr = getRK_val("stderr");
+ $sumnull = getRK_val("sumnull");
+
+?>estimates.rsm <<- RSM(<? getRK("x");
+ // any additional options?
+ if($design == "matrix") echo(", W=".$design_mtx);
+ if($stderr != "se") echo(", se=FALSE");
+ if($sumnull != "sum0") echo(", sum0=FALSE");
+ if($etastart == "startval") echo(", etaStart=".$etastart_vec);
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("RSM parameter estimation")
+rk.print (estimates.rsm)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.rkh (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.rkh 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,41 @@
+<!DOCTYPE rkhelp>
+ <document>
+ <summary>
+ This plugin estimates parameters under Item Response Theory approach, using the <link href="rkward://rhelp/eRm-package">eRm</link> package.
+ </summary>
+
+ <usage>
+ To fit the rating scale model with default settings, just the matrix of manifest variables (item responses) must be selected. Further options are described in the sections below. For detailed information on the expected layout of matrices and vectors please refer to the manual for the <link href="rkward://rhelp/RSM">RSM()</link> function.
+
+ The complete results are stored as a new object in the current workspace for further use (e.g. plotting item characteristic curves). This object will be called <code>estimates.rsm</code>.
+ </usage>
+
+ <settings>
+ <caption id="tab_data"/>
+ <setting id="x" title="Matrix of manifest variables">
+ Select the matrix of item responses from the objects shown on the left.
+ </setting>
+
+ <caption id="tab_options"/>
+ <setting id="design">
+ By default the design matrix for the RSM will be computed automatically. Alternatively, you may specify your own design matrix here.
+ </setting>
+ <setting id="etastart">
+ By default eta values start with the 0-vector. To change this, a vector of starting values can be specified.
+ </setting>
+ <setting id="stderr">
+ If checked, standard errors are computed (which is the default).
+ </setting>
+ <setting id="sumnull">
+ By default parameters are normalized to sum-0 by specifying an appropriate design matrix. Uncheck this box to restrict the first parameter to 0.
+ </setting>
+
+ </settings>
+
+ <related>
+ Please refer to the <code>eRm</code> manuals for further information and detailed command line options:
+ <ul>
+ <li><link href="rkward://rhelp/eRm-package"/></li>
+ <li><link href="rkward://rhelp/RSM"/></li>
+ </ul>
+ </related>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,51 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="par_est_rsm.php" />
+ <help file="par_est_rsm.rkh" />
+
+ <logic>
+ <convert id="design_matrix" mode="equals" sources="design.string" standard="matrix" />
+ <convert id="eta_vector" mode="equals" sources="etastart.string" standard="startval" />
+
+ <connect client="design_mtx.enabled" governor="design_matrix" />
+ <connect client="design_mtx.required" governor="design_matrix" />
+ <connect client="etastart_vec.enabled" governor="eta_vector" />
+ <connect client="etastart_vec.required" governor="eta_vector" />
+ </logic>
+
+ <dialog label="IRT parameter estimation: Rating scale model">
+ <tabbook>
+ <tab id="tab_data" label="Manifest variables">
+ <row id="manifest_resp_row">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="data.frame matrix" source="vars" required="true" label="Matrix of manifest variables:"/>
+ <stretch />
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_options" label="Options">
+ <row id="options_row">
+ <varselector id="vars2" />
+ <column id="opt_var_col">
+ <radio label="Design matrix" id="design">
+ <option label="Compute automatically" value="auto" checked="true" />
+ <option label="Use own design matrix" value="matrix" />
+ </radio>
+ <varslot type="numeric" id="design_mtx" classes="data.frame matrix" source="vars2" label="Design matrix:"/>
+ <stretch />
+ <radio label="Eta start values" id="etastart">
+ <option label="Use 0-vector" value="NULL" checked="true" />
+ <option label="Use own vector of eta start values" value="startval" />
+ </radio>
+ <varslot type="numeric" id="etastart_vec" source="vars2" label="Vector of start values:"/>
+ <frame label="Misc options">
+ <checkbox id="stderr" label="Compute standard error" checked="true" value="se" />
+ <checkbox id="sumnull" label="Normalize parameters to sum-0" checked="true" value="sum0" />
+ </frame>
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/tests/eRm_waldtest.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/tests/eRm_waldtest.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/tests/eRm_waldtest.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,26 @@
+<?
+function preprocess () {
+ // we'll need the eRm package, so in case it's not loaded...
+?>
+ require(eRm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $rad_splitcr = getRK_val("rad_splitcr");
+ $splitvector = getRK_val("splitvector");
+
+?>waldtest.res <- Waldtest(<? getRK("x");
+ // check if any advanced control options must be inserted
+ if($rad_splitcr == "mean") echo(", splitcr=\"mean\"") ;
+ if($rad_splitcr == "vector") echo(", splitcr=".$splitvector) ;
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("Wald test (<? getRK("x"); ?>)")
+rk.print (waldtest.res)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/tests/eRm_waldtest.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/tests/eRm_waldtest.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/tests/eRm_waldtest.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,33 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="eRm_waldtest.php" />
+ <!--<help file="eRm_waldtest.rkh" />-->
+
+ <logic>
+ <convert id="split_vec" mode="equals" sources="rad_splitcr.string" standard="vector" />
+
+ <connect client="splitvector.enabled" governor="split_vec" />
+ <connect client="splitvector.required" governor="split_vec" />
+ </logic>
+
+ <dialog label="Wald test">
+ <tabbook>
+ <tab id="tab_var_options" label="Data">
+ <row id="row_vars">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="Rm" source="vars" required="true" label="Chose fitted model to test:"/>
+ <text>Only objects of class Rm are valid!</text>
+ <stretch />
+ <radio id="rad_splitcr" label="Split criterion for subject raw scores">
+ <option label="Median" value="median" checked="true" />
+ <option label="Mean" value="mean" />
+ <option label="Use dichotomous vector to define groups" value="vector" />
+ </radio>
+ <varslot type="numeric" id="splitvector" source="vars" label="Select grouping vector:"/>
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,46 @@
+<?
+function preprocess () {
+ // we'll need the ltm package, so in case it's not loaded...
+?>
+ require(ltm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $spin_samples = getRK_val("spin_samples");
+ $chk_standard = getRK_val("chk_standard");
+ $chk_na = getRK_val("chk_na");
+ $chk_bsci = getRK_val("chk_bsci");
+ $spin_ci = getRK_val("spin_ci");
+
+ ///////////////////////////////////
+ // check for selected options
+ $options = array() ;
+ if($chk_standard == "standard")
+ $options[] = "standardized=TRUE" ;
+ if($chk_bsci == "bsci")
+ $options[] = "CI=TRUE" ;
+ if($spin_ci != ".95") {
+ $cilo = (1-$spin_ci)/2 ;
+ $cihi = 1-$cilo ;
+ $options[] = "probs=c($cilo, $cihi)" ;
+ }
+ if($spin_samples != "1000")
+ $options[] = "B=$spin_samples" ;
+ if($chk_na == "rm")
+ $options[] = "na.rm=TRUE" ;
+
+
+?>cronalpha.res <- cronbach.alpha(<? getRK("x");
+ // check if any advanced control options must be inserted
+ if($options) echo(", ".join(", ", $options));
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("Cronbach's alpha (<? getRK("x"); ?>)")
+rk.print (cronalpha.res)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,33 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="ltm_cronbach_alpha.php" />
+ <!--<help file="ltm_cronbach_alpha.rkh" />-->
+
+ <logic>
+ <convert id="conf_int" mode="and" sources="chk_bsci.state;chk_bsci.enabled" />
+
+ <connect client="spin_ci.enabled" governor="conf_int" />
+ </logic>
+
+ <dialog label="Cronbach's alpha">
+ <tabbook>
+ <tab id="tab_var_options" label="Data">
+ <row id="row_vars">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" source="vars" required="true" label="Item responses:"/>
+ <text>Must be a matrix or data.frame, with items as columns.</text>
+ <stretch />
+ <frame id="frame_options" label="Options">
+ <spinbox id="spin_samples" label="Number of Bootstrap samples:" type="integer" initial="1000" min="1" size="small" />
+ <checkbox id="chk_standard" label="Compute standardized Cronbach's alpha" value="standard" />
+ <checkbox id="chk_na" label="Ignore missing values" value="rm" />
+ <checkbox id="chk_bsci" label="Compute Bootstrap confidence interval (CI)" value="bsci" />
+ <spinbox id="spin_ci" label="Confidence interval:" type="real" initial=".95" min="0" max="1" size="small" />
+ </frame>
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_gof_rasch.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_gof_rasch.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_gof_rasch.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,24 @@
+<?
+function preprocess () {
+ // we'll need the ltm package, so in case it's not loaded...
+?>
+ require(ltm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $spin_samples = getRK_val("spin_samples");
+
+?>GoFRasch.res <- GoF.rasch(<? getRK("x");
+ // check if any advanced control options must be inserted
+ if($spin_samples != "49") echo(", B=".$spin_samples);
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("Goodness of Fit for Rasch Models (<? getRK("x"); ?>)")
+rk.print (GoFRasch.res)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_gof_rasch.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_gof_rasch.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_gof_rasch.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,26 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="ltm_gof_rasch.php" />
+ <!--<help file="ltm_gof_rasch.rkh" />-->
+
+ <logic>
+ </logic>
+
+ <dialog label="Goodness of Fit (Rasch model)">
+ <tabbook>
+ <tab id="tab_var_options" label="Data">
+ <row id="row_vars">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="rasch" source="vars" required="true" label="Chose fitted model to examine:"/>
+ <text>Only objects of class rasch are valid!</text>
+ <stretch />
+ <frame label="Bootstrap options">
+ <spinbox id="spin_samples" label="Number of samples" type="integer" initial="49" min="1" size="small" />
+ </frame>
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_item_fit.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_item_fit.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_item_fit.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,40 @@
+<?
+function preprocess () {
+ // we'll need the ltm package, so in case it's not loaded...
+?>
+ require(ltm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $spin_groups = getRK_val("spin_groups");
+ $drop_sumgroups = getRK_val("drop_sumgroups");
+ $rad_pvalue = getRK_val("rad_pvalue");
+ $spin_mc = getRK_val("spin_mc");
+
+ ///////////////////////////////////
+ // check for selected options
+ $options = array() ;
+ if($spin_groups != "10")
+ $options[] = "G=$spin_groups" ;
+ if($drop_sumgroups != "median")
+ $options[] = "FUN=$drop_sumgroups" ;
+ if($rad_pvalue == "montecarlo")
+ $options[] = "simulate.p.value=TRUE" ;
+ if($rad_pvalue == "montecarlo" && $spin_mc != "100" )
+ $options[] = "B=$spin_mc" ;
+
+
+?>itemfit.res <- item.fit(<? getRK("x");
+ // check if any advanced control options must be inserted
+ if($options) echo(", ".join(", ", $options));
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("Item-fit statistics (<? getRK("x"); ?>)")
+rk.print (itemfit.res)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_item_fit.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_item_fit.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_item_fit.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,42 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="ltm_item_fit.php" />
+ <!--<help file="ltm_item_fit.rkh" />-->
+
+ <logic>
+ <convert id="monte_carlo" mode="equals" sources="rad_pvalue.string" standard="montecarlo" />
+
+ <connect client="spin_mc.enabled" governor="monte_carlo" />
+ </logic>
+
+ <dialog label="Item-fit statistics for Rasch, LTM and 3PM">
+ <tabbook>
+ <tab id="tab_var_options" label="Data">
+ <row id="row_vars">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="rasch tpm ltm" source="vars" required="true" label="Chose fitted model to examine:"/>
+ <text>Only objects of class ltm, rasch and tpm are valid!</text>
+ <stretch />
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_options" label="Options">
+ <column id="col_ops">
+ <frame label="Grouping of sample units">
+ <spinbox id="spin_groups" label="Number of categories" type="integer" initial="10" min="1" size="small" />
+ <dropdown id="drop_sumgroups" label="Summarize the ability estimates by">
+ <option label="Median of each group" value="median" checked="true" />
+ <option label="Mean of each group" value="mean" />
+ </dropdown>
+ </frame>
+ <radio id="rad_pvalue" label="p value assumptions">
+ <option label="Assume chi-squared distribution" value="chi2" checked="true" />
+ <option label="Use Monte Carlo procedure to approximate distribution" value="montecarlo" />
+ </radio>
+ <spinbox id="spin_mc" label="Number of replications" type="integer" initial="100" min="1" size="small" />
+ </column>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_person_fit.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_person_fit.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_person_fit.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,41 @@
+<?
+function preprocess () {
+ // we'll need the ltm package, so in case it's not loaded...
+?>
+ require(ltm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $rad_hypot = getRK_val("rad_hypot");
+ $rad_resppat = getRK_val("rad_resppat");
+ $mtx_resppat = getRK_val("mtx_resppat");
+ $rad_pvalue = getRK_val("rad_pvalue");
+ $spin_mc = getRK_val("spin_mc");
+
+ ///////////////////////////////////
+ // check for selected options
+ $options = array() ;
+ if($rad_hypot == "greater" || $rad_hypot == "two.sided")
+ $options[] = "alternative=\"$rad_hypot\"" ;
+ if($rad_resppat == "resp_matrix" && $mtx_resppat)
+ $options[] = "resp.patterns=$mtx_resppat" ;
+ if($rad_pvalue == "montecarlo")
+ $options[] = "simulate.p.value=TRUE" ;
+ if($rad_pvalue == "montecarlo" && $spin_mc != "1000" )
+ $options[] = "B=$spin_mc" ;
+
+
+?>personfit.res <- person.fit(<? getRK("x");
+ // check if any advanced control options must be inserted
+ if($options) echo(", ".join(", ", $options));
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("Person-fit statistics (<? getRK("x"); ?>)")
+rk.print (personfit.res)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_person_fit.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_person_fit.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_person_fit.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,54 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="ltm_person_fit.php" />
+ <!--<help file="ltm_person_fit.rkh" />-->
+
+ <logic>
+ <convert id="response_pat" mode="equals" sources="rad_resppat.string" standard="resp_matrix" />
+ <convert id="monte_carlo" mode="equals" sources="rad_pvalue.string" standard="montecarlo" />
+
+ <connect client="mtx_resppat.enabled" governor="response_pat" />
+ <connect client="mtx_resppat.required" governor="response_pat" />
+ <connect client="spin_mc.enabled" governor="monte_carlo" />
+ </logic>
+
+ <dialog label="Person-fit statistics for Rasch, LTM and 3PM">
+ <tabbook>
+ <tab id="tab_var_options" label="Data">
+ <row id="row_vars">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="rasch tpm ltm" source="vars" required="true" label="Chose fitted model to examine:"/>
+ <text>Only objects of class ltm, rasch and tpm are valid!</text>
+ <stretch />
+ <radio id="rad_hypot" label="Alternative hypothesis to test">
+ <option label="Inconsistent response pattern under the estimated model" value="less" checked="true" />
+ <option label="More consistent response pattern than the model predicts" value="greater" />
+ <option label="Two sided (test both of the above)" value="two.sided" />
+ </radio>
+ </column>
+ </row>
+ </tab>
+ <tab id="tab_options" label="Options">
+ <row id="row_vars">
+ <varselector id="vars2" />
+ <column>
+ <radio id="rad_resppat" label="Response pattern">
+ <option label="Compute for observed response pattern" value="observed" checked="true" />
+ <option label="Compute for given response pattern" value="resp_matrix" />
+ </radio>
+ <varslot type="numeric" id="mtx_resppat" source="vars2" label="Select matrix or data.frame with pattern to use:"/>
+ <radio id="rad_pvalue" label="p value assumptions">
+ <option label="Assume standard normal distribution" value="normal" checked="true" />
+ <option label="Use Monte Carlo procedure to approximate distribution" value="montecarlo" />
+ </radio>
+ <spinbox id="spin_mc" label="Number of replications" type="integer" initial="1000" size="small" />
+ </column>
+ </row>
+ </tab>
+ <!-- <tab id="tab_udpf" label="User defined">
+ <text>Calculate user defined person-fit statistics (not implemented yet)</text>
+ </tab> -->
+ </tabbook>
+ </dialog>
+</document>
Added: trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_unidimensional.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_unidimensional.php (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_unidimensional.php 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,24 @@
+<?
+function preprocess () {
+ // we'll need the ltm package, so in case it's not loaded...
+?>
+ require(ltm)
+<?}
+
+function calculate () {
+ // let's read all values into php variables for the sake of readable code
+ $spin_samples = getRK_val("spin_samples");
+
+?>unidim.res <<- unidimTest(<? getRK("x");
+ // check if any options must be inserted
+ if($spin_samples != "100") echo(", B=$spin_samples") ;
+ ?>)
+<?}
+
+function printout () {
+?>
+rk.header ("Unidimensionality check (<? getRK("x"); ?>)")
+rk.print (unidim.res)
+<?
+}
+?>
\ No newline at end of file
Added: trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_unidimensional.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_unidimensional.xml (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_unidimensional.xml 2008-11-17 23:37:06 UTC (rev 2387)
@@ -0,0 +1,26 @@
+<!DOCTYPE rkplugin>
+<document>
+ <code file="ltm_unidimensional.php" />
+ <!--<help file="ltm_unidimensional.rkh" />-->
+
+ <logic>
+ </logic>
+
+ <dialog label="Unidimensionality check (Rasch, LTM, 3PM)">
+ <tabbook>
+ <tab id="tab_var_options" label="Data">
+ <row id="row_vars">
+ <varselector id="vars" />
+ <column>
+ <varslot type="numeric" id="x" classes="rasch ltm tpm" source="vars" required="true" label="Chose fitted model to check:"/>
+ <text>Only objects of class rasch, ltm or tpm are valid!</text>
+ <stretch />
+ <frame id="frame_options" label="Monte Carlo options">
+ <spinbox id="spin_samples" label="Number of samples:" type="integer" initial="100" min="1" size="small" />
+ </frame>
+ </column>
+ </row>
+ </tab>
+ </tabbook>
+ </dialog>
+</document>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list