[rkward-cvs] SF.net SVN: rkward:[2727] trunk/rkward

m-eik at users.sourceforge.net m-eik at users.sourceforge.net
Thu Dec 17 16:39:39 UTC 2009


Revision: 2727
          http://rkward.svn.sourceforge.net/rkward/?rev=2727&view=rev
Author:   m-eik
Date:     2009-12-17 16:39:38 +0000 (Thu, 17 Dec 2009)

Log Message:
-----------
irt: migrated estimation plugins from php to js, updated tests

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.js
    trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.js
    trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.xml
    trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.js
    trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.xml
    trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.js
    trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.xml
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.js
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.xml
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.js
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.xml
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.js
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.xml
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.js
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.xml
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.js
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.xml
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.js
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.xml
    trunk/rkward/tests/item_response_theory/RKTestStandard.2PL_parameter_estimation.rkcommands.R
    trunk/rkward/tests/item_response_theory/RKTestStandard.2PL_parameter_estimation.rkout
    trunk/rkward/tests/item_response_theory/RKTestStandard.3PL_parameter_estimation.rkcommands.R
    trunk/rkward/tests/item_response_theory/RKTestStandard.3PL_parameter_estimation.rkout
    trunk/rkward/tests/item_response_theory/RKTestStandard.GPCM_parameter_estimation.rkcommands.R
    trunk/rkward/tests/item_response_theory/RKTestStandard.GPCM_parameter_estimation.rkout
    trunk/rkward/tests/item_response_theory/RKTestStandard.GRM_parameter_estimation.rkcommands.R
    trunk/rkward/tests/item_response_theory/RKTestStandard.GRM_parameter_estimation.rkout
    trunk/rkward/tests/item_response_theory/RKTestStandard.LLTM_parameter_estimation.rkcommands.R
    trunk/rkward/tests/item_response_theory/RKTestStandard.LLTM_parameter_estimation.rkout
    trunk/rkward/tests/item_response_theory/RKTestStandard.LPCM_parameter_estimation.rkcommands.R
    trunk/rkward/tests/item_response_theory/RKTestStandard.LPCM_parameter_estimation.rkout
    trunk/rkward/tests/item_response_theory/RKTestStandard.LRSM_parameter_estimation.rkcommands.R
    trunk/rkward/tests/item_response_theory/RKTestStandard.LRSM_parameter_estimation.rkout
    trunk/rkward/tests/item_response_theory/RKTestStandard.PCM_parameter_estimation.rkcommands.R
    trunk/rkward/tests/item_response_theory/RKTestStandard.PCM_parameter_estimation.rkout
    trunk/rkward/tests/item_response_theory/RKTestStandard.RSM_parameter_estimation.rkcommands.R
    trunk/rkward/tests/item_response_theory/RKTestStandard.RSM_parameter_estimation.rkout
    trunk/rkward/tests/item_response_theory/RKTestStandard.Rasch_parameter_estimation.rkcommands.R
    trunk/rkward/tests/item_response_theory/RKTestStandard.Rasch_parameter_estimation.rkout

Removed Paths:
-------------
    trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.php
    trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.php
    trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.php
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.php
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.php
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.php
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.php
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.php
    trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.php

Modified: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.js	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_2pl.js	2009-12-17 16:39:38 UTC (rev 2727)
@@ -21,29 +21,29 @@
 	///////////////////////////////////
 	// check for selected advanced control options
 	var control = new Array() ;
-	if (iterem != "40"){
-		control[control.length] = "iter.em="+iterem ; }
-	if (iterqn_2pl != "150"){
-		control[control.length] = "iter.qN="+iterqn_2pl ; }
-	if (ghk_2pl != "15"){
-		control[control.length] = "GHk="+ghk_2pl ; }
-	if (optimeth != "BFGS"){
-		control[control.length] = "method=\""+optimeth+"\"" ; }
-	if (verbose == "TRUE"){
-		control[control.length] = "verbose=TRUE" ; }
+	if (iterem != "40")
+		control[control.length] = "iter.em="+iterem ;
+	if (iterqn_2pl != "150")
+		control[control.length] = "iter.qN="+iterqn_2pl ;
+	if (ghk_2pl != "15")
+		control[control.length] = "GHk="+ghk_2pl ;
+	if (optimeth != "BFGS")
+		control[control.length] = "method=\""+optimeth+"\"" ;
+	if (verbose == "TRUE")
+		control[control.length] = "verbose=TRUE" ;
 
-		echo ('estimates.2pl <- ltm(' + getValue("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.length > 0) echo(", control=list("+control.join(", ")+")");
-				echo (')\n');
-			}
+	echo ('estimates.2pl <- ltm(' + getValue("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.length > 0) echo(", control=list("+control.join(", ")+")");
+	echo (')\n');
+}
 
 function printout () {
 	// check whether parameter estimations should be kept in the global enviroment
@@ -51,8 +51,9 @@
 	var save_name    = getValue("save_name");
 
 	echo ('rk.header ("2PL parameter estimation")\n');
-	echo ('rk.print (paste("Call: <code>",deparse(estimates.2pl$call, width.cutoff=500),"</code>"))\n');
-	echo ('rk.print ("<h4>Coefficients:</h4>")\n');
+	echo ('rk.print ("Call:")\n');
+	echo ('rk.print.literal (deparse(estimates.2pl$call, width.cutoff=500))\n');
+	echo ('rk.header ("Coefficients:", level=4)\n');
 	echo ('rk.print (coef(estimates.2pl))\n');
 	echo ('rk.print (paste("Log-likelihood value at convergence:",round(estimates.2pl$log.Lik, digits=1)))\n');
 	// check if results are to be saved:

Modified: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.js	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.js	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,103 +1,69 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	// we'll need the ltm package, so in case it's not loaded...
-
-	echo ('  require(ltm)\n');
+	echo ('require(ltm)\n');
 }
 
 function calculate () {
-	var constraint = "";
-	var startval = "";
-	var startval_mtx = "";
-	var naaction = "";
-	var irtparam = "";
-	var optimeth = "";
-	var verbose = "";
-	var ghk_3pl = "";
-	var iterqn_3pl = "";
-	var type = "";
-	var maxguess = "";
-	var optimizer = "";
-	var epshess = "";
-	var control = "";
 	// let's read all values into php variables for the sake of readable code
-	constraint   = getValue("constraint");
-	startval     = getValue("startval");
-	startval_mtx = getValue("startval_mtx");
-	naaction     = getValue("naaction");
-	irtparam     = getValue("irtparam");
-	optimeth     = getValue("optimeth");
-	verbose      = getValue("verbose");
+	var constraint   = getValue("constraint");
+	var startval     = getValue("startval");
+	var startval_mtx = getValue("startval_mtx");
+	var naaction     = getValue("naaction");
+	var irtparam     = getValue("irtparam");
+	var optimeth     = getValue("optimeth");
+	var verbose      = getValue("verbose");
 	// these are 3pl specific
-	ghk_3pl      = getValue("ghk_3pl");
-	iterqn_3pl   = getValue("iterqn_3pl");
-	type         = getValue("type");
-	maxguess     = getValue("maxguess");
-	optimizer    = getValue("optimizer");
-	epshess      = getValue("epshess");
-	// $parscale     = getRK_val("parscale"); not implemented yet...
+	var ghk_3pl      = getValue("ghk_3pl");
+	var iterqn_3pl   = getValue("iterqn_3pl");
+	var type         = getValue("type");
+	var maxguess     = getValue("maxguess");
+	var optimizer    = getValue("optimizer");
+	var epshess      = getValue("epshess");
+	// var parscale     = getValue("parscale"); not implemented yet...
 
 	///////////////////////////////////
 	// check for selected advanced control options
-	control = new Array) ;
+	var control = new 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 ;
+		control[control.length] = "optimizer=\"nlminb\"" ;
+	if (iterqn_3pl != 1000)
+		control[control.length] = "iter.qN="+iterqn_3pl ;
+	if (ghk_3pl != 21)
+		control[control.length] = "GHk="+ghk_3pl ;
+	if (optimizer == "optim" && optimeth != "BFGS")
+		control[control.length] = "method=\""+optimeth+"\"" ;
+	if (verbose == "TRUE")
+		control[control.length] = "verbose=TRUE" ;
+	if (epshess != 1e-03)
+		control[control.length] = "eps.hessian="+epshess ;
 
-						echo ('estimates.3pl <- tpm(' + getValue("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)+")");
-															echo (')\n');
-														}
+	echo ('estimates.3pl <- tpm(' + getValue("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.length > 0) echo(", control=list("+control.join(", ")+")");
+	echo (')\n');
+}
 
 function printout () {
-	var save = "";
-	var save_name = "";
 	// check whether parameter estimations should be kept in the global enviroment
-	save         = getValue("chk_save");
-	save_name    = getValue("save_name");
+	var save = getValue("chk_save");
+	var save_name = getValue("save_name");
 
 	echo ('rk.header ("3PL parameter estimation")\n');
-	echo ('rk.print (paste("Call: <code>",deparse(estimates.3pl$call, width.cutoff=500),"</code>"))\n');
-	echo ('rk.print ("<h4>Coefficients:</h4>")\n');
+	echo ('rk.print ("Call:")\n');
+	echo ('rk.print.literal (deparse(estimates.3pl$call, width.cutoff=500))\n');
+	echo ('rk.header ("Coefficients:", level=4)\n');
 	echo ('rk.print (coef(estimates.3pl))\n');
 	echo ('rk.print (paste("Log-likelihood value at convergence:",round(estimates.3pl$log.Lik, digits=1)))\n');
-// check if results are to be saved:
+	// check if results are to be saved:
 	if (save && save_name) {
-
 		echo ('# keep results in current workspace\n');
 		echo (save_name + ' <<- estimates.3pl\n');
 	}

Deleted: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.php	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.php	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,74 +0,0 @@
-<?
-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 () {
-  // check whether parameter estimations should be kept in the global enviroment
-  $save         = getRK_val("chk_save");
-  $save_name    = getRK_val("save_name");
-?>
-rk.header ("3PL parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.3pl$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
-rk.print (coef(estimates.3pl))
-rk.print (paste("Log-likelihood value at convergence:",round(estimates.3pl$log.Lik, digits=1)))
-<?
-// check if results are to be saved:
-if ($save && $save_name) {
-?>
-# keep results in current workspace
-<? echo($save_name); ?> <<- estimates.3pl
-<?}
-}
-?>
\ No newline at end of file

Modified: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.xml	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_3pl.xml	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,7 +1,7 @@
 <!DOCTYPE rkplugin>
 <document>
-  <code file="par_est_3pl.php" />
-  <help file="par_est_3pl.rkh" />
+  <code file="par_est_3pl.js" />
+  <help file="par_est_3pl.rkh" ></help>
 
   <logic>
     <convert id="optim_used"  mode="equals" sources="optimizer.string" standard="optim" />

Modified: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.js	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.js	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,72 +1,45 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	// we'll need the eRm package, so in case it's not loaded...
-
-	echo ('  require(eRm)\n');
+	echo ('require(eRm)\n');
 }
 
 function calculate () {
-	var mpoints = "";
-	var groups = "";
-	var group_vec = "";
-	var design = "";
-	var design_mtx = "";
-	var etastart = "";
-	var etastart_vec = "";
-	var stderr = "";
-	var sumnull = "";
 	// let's read all values into php variables for the sake of readable code
-	mpoints      = getValue("mpoints");
-	groups       = getValue("groups");
-	group_vec    = getValue("group_vec");
-	design       = getValue("design");
-	design_mtx   = getValue("design_mtx");
-	etastart     = getValue("etastart");
-	etastart_vec = getValue("etastart_vec");
-	stderr       = getValue("stderr");
-	sumnull      = getValue("sumnull");
+	var mpoints = getValue("mpoints");
+	var groups = getValue("groups");
+	var group_vec = getValue("group_vec");
+	var design = getValue("design");
+	var design_mtx = getValue("design_mtx");
+	var etastart = getValue("etastart");
+	var etastart_vec = getValue("etastart_vec");
+	var stderr = getValue("stderr");
+	var sumnull = getValue("sumnull");
 
 	echo ('estimates.lltm <- LLTM(' + getValue("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);
+		// 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);
 	echo (')\n');
 }
 
 function printout () {
-	var save = "";
-	var save_name = "";
 	// check whether parameter estimations should be kept in the global enviroment
-	save         = getValue("chk_save");
-	save_name    = getValue("save_name");
+	var save = getValue("chk_save");
+	var save_name = getValue("save_name");
 
 	echo ('rk.header ("LLTM  parameter estimation")\n');
-	echo ('rk.print (paste("Call: <code>",deparse(estimates.lltm$call, width.cutoff=500),"</code>"))\n');
-	echo ('rk.print ("<h4>Coefficients:</h4>")\n');
+	echo ('rk.print ("Call:")\n');
+	echo ('rk.print.literal (deparse(estimates.lltm$call, width.cutoff=500))\n');
+	echo ('rk.header ("Coefficients:", level=4)\n');
 	echo ('rk.print(t(rbind(Eta=estimates.lltm$etapar,StdErr=estimates.lltm$se.eta)))\n');
 	echo ('rk.print (paste("Conditional log-likelihood:",round(estimates.lltm$loglik, digits=1),\n');
 	echo ('"<br />Number of iterations:",estimates.lltm$iter,"<br />Number of parameters:",estimates.lltm$npar))\n');
-// check if results are to be saved:
+	// check if results are to be saved:
 	if (save && save_name) {
-
 		echo ('# keep results in current workspace\n');
 		echo (save_name + ' <<- estimates.lltm\n');
 	}

Deleted: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.php	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.php	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,50 +0,0 @@
-<?
-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 () {
-  // check whether parameter estimations should be kept in the global enviroment
-  $save         = getRK_val("chk_save");
-  $save_name    = getRK_val("save_name");
-?>
-rk.header ("LLTM  parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.lltm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
-rk.print(t(rbind(Eta=estimates.lltm$etapar,StdErr=estimates.lltm$se.eta)))
-rk.print (paste("Conditional log-likelihood:",round(estimates.lltm$loglik, digits=1),
-"<br />Number of iterations:",estimates.lltm$iter,"<br />Number of parameters:",estimates.lltm$npar))
-<?
-// check if results are to be saved:
-if ($save && $save_name) {
-?>
-# keep results in current workspace
-<? echo($save_name); ?> <<- estimates.lltm
-<?}
-}
-?>
\ No newline at end of file

Modified: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.xml	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_lltm.xml	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,7 +1,7 @@
 <!DOCTYPE rkplugin>
 <document>
-  <code file="par_est_lltm.php" />
-  <help file="par_est_lltm.rkh" />
+  <code file="par_est_lltm.js" />
+  <help file="par_est_lltm.rkh" ></help>
 
   <logic>
     <convert id="group_contrasts" mode="equals" sources="groups.string" standard="contrasts" />

Modified: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.js	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.js	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,88 +1,59 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	// we'll need the ltm package, so in case it's not loaded...
-
-	echo ('  require(ltm)\n');
+	echo ('require(ltm)\n');
 }
 
 function calculate () {
-	var constraint = "";
-	var startval = "";
-	var startval_mtx = "";
-	var naaction = "";
-	var irtparam = "";
-	var optimeth = "";
-	var verbose = "";
-	var ghk_rasch = "";
-	var iterqn_rasch = "";
-	var control = "";
 	// let's read all values into php variables for the sake of readable code
-	constraint   = getValue("constraint");
-	startval     = getValue("startval");
-	startval_mtx = getValue("startval_mtx");
-	naaction     = getValue("naaction");
-	irtparam     = getValue("irtparam");
-	optimeth     = getValue("optimeth");
-	verbose      = getValue("verbose");
+	var constraint   = getValue("constraint");
+	var startval     = getValue("startval");
+	var startval_mtx = getValue("startval_mtx");
+	var naaction     = getValue("naaction");
+	var irtparam     = getValue("irtparam");
+	var optimeth     = getValue("optimeth");
+	var verbose      = getValue("verbose");
 	// these are rasch specific
-	ghk_rasch    = getValue("ghk_rasch");
-	iterqn_rasch = getValue("iterqn_rasch");
+	var ghk_rasch = getValue("ghk_rasch");
+	var iterqn_rasch = getValue("iterqn_rasch");
 
 	///////////////////////////////////
 	// check for selected advanced control options
-	control = new 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" ;
+	var control = new Array() ;
+	if (iterqn_rasch != 150)
+		control[control.length] = "iter.qN="+iterqn_rasch ;
+	if (ghk_rasch != 21)
+		control[control.length] = "GHk="+ghk_rasch ;
+	if (optimeth != "BFGS")
+		control[control.length] = "method=\""+optimeth+"\"" ;
+	if (verbose == "TRUE")
+		control[control.length] = "verbose=TRUE" ;
 
-				echo ('estimates.rasch <- rasch(' + getValue("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)+")");
-											echo (')\n');
-										}
+	echo ('estimates.rasch <- rasch(' + getValue("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.length > 0) echo(", control=list("+control.join(", ")+")");
+	echo (')\n');
+}
 
 function printout () {
-	var save = "";
-	var save_name = "";
-	var irtparam = "";
 	// check whether parameter estimations should be kept in the global enviroment
-	save         = getValue("chk_save");
-	save_name    = getValue("save_name");
-	irtparam     = getValue("irtparam");
+	var save      = getValue("chk_save");
+	var save_name = getValue("save_name");
+	var irtparam  = getValue("irtparam");
 
 	echo ('rk.header ("Rasch parameter estimation")\n');
-	echo ('rk.print (paste("Call: <code>",deparse(estimates.rasch$call, width.cutoff=500),"</code>"))\n');
-	echo ('rk.print ("<h4>Coefficients:</h4>")\n');
+	echo ('rk.print ("Call:")\n');
+	echo ('rk.print.literal (deparse(estimates.rasch$call, width.cutoff=500))\n');
+	echo ('rk.header ("Coefficients:", level=4)\n');
 	echo ('rk.print (coef(estimates.rasch))\n');
 	echo ('rk.print (paste("Log-likelihood value at convergence:",round(estimates.rasch$log.Lik, digits=1)))\n');
-// check if results are to be saved:
+	// check if results are to be saved:
 	if (save && save_name) {
-
 		echo ('# keep results in current workspace\n');
 		echo (save_name + ' <<- estimates.rasch\n');
 	}

Deleted: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.php	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.php	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,64 +0,0 @@
-<?
-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 () {
-  // check whether parameter estimations should be kept in the global enviroment
-  $save         = getRK_val("chk_save");
-  $save_name    = getRK_val("save_name");
-  $irtparam     = getRK_val("irtparam");
-?>
-rk.header ("Rasch parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.rasch$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
-rk.print (coef(estimates.rasch))
-rk.print (paste("Log-likelihood value at convergence:",round(estimates.rasch$log.Lik, digits=1)))
-<?
-// check if results are to be saved:
-if ($save && $save_name) {
-?>
-# keep results in current workspace
-<? echo($save_name); ?> <<- estimates.rasch
-<?}
-}
-?>
\ No newline at end of file

Modified: trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.xml	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/dichotomous/par_est_rasch.xml	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-  <code file="par_est_rasch.php" />
+  <code file="par_est_rasch.js" />
   <help file="par_est_rasch.rkh" />
 
   <logic>

Modified: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.js	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.js	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,114 +1,78 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Warning: '$' inside '"'-delimited string. This might be a variable name. Please check by hand!
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	// we'll need the ltm package, so in case it's not loaded...
-
-	echo ('  require(ltm)\n');
+	echo ('require(ltm)\n');
 }
 
 function calculate () {
-	var data = "";
-	var chk_select = "";
-	var inp_items = "";
-	var constraint = "";
-	var startval = "";
-	var startval_lst = "";
-	var naaction = "";
-	var irtparam = "";
-	var optimeth = "";
-	var verbose = "";
-	var ghk_gpcm = "";
-	var iterqn_gpcm = "";
-	var optimizer = "";
-	var numrderiv = "";
-	var epshess = "";
-	var control = "";
 	// let's read all values into php variables for the sake of readable code
-	data         = getValue("x");
-	chk_select   = getValue("chk_select");
-	inp_items    = getValue("inp_items");
-	// reformat $inp_items
-	if (inp_items)
-		inp_items       = str_replace("\n", ", ", preg_replace("/(.+)\[\[(.+)\]\]/", "$2", inp_items));
-
-	constraint   = getValue("constraint");
-	startval     = getValue("startval");
-	startval_lst = getValue("startval_lst");
-	naaction     = getValue("naaction");
-	irtparam     = getValue("irtparam");
-	optimeth     = getValue("optimeth");
-	verbose      = getValue("verbose");
+	var data          = getValue("x");
+	var chk_select    = getValue("chk_select");
+	var inp_items     = getValue("inp_items");
+	// reformat inp_items
+		if (inp_items)
+			inp_items = inp_items.split("\n").join(", ").replace(/(\w*)\[\["(\w*)"\]\]/g, '"$2"');
+	var constraint    = getValue("constraint");
+	var startval      = getValue("startval");
+	var startval_lst  = getValue("startval_lst");
+	var naaction      = getValue("naaction");
+	var irtparam      = getValue("irtparam");
+	var optimeth      = getValue("optimeth");
+	var verbose       = getValue("verbose");
 	// these are gpcm specific
-	ghk_gpcm     = getValue("ghk_gpcm");
-	iterqn_gpcm  = getValue("iterqn_gpcm");
-	optimizer    = getValue("optimizer");
-	numrderiv    = getValue("numrderiv");
-	epshess      = getValue("epshess");
-	// $parscale     = getRK_val("parscale"); not implemented yet...
+	var ghk_gpcm      = getValue("ghk_gpcm");
+	var iterqn_gpcm   = getValue("iterqn_gpcm");
+	var optimizer     = getValue("optimizer");
+	var numrderiv     = getValue("numrderiv");
+	var epshess       = getValue("epshess");
+	// parscale     = getValue("parscale"); not implemented yet...
 
 	///////////////////////////////////
 	// check for selected advanced control options
-	control = new Array) ;
-	if (iterqn_gpcm != "150")
-	control[] = "iter.qN="+iterqn_gpcm ;
-	if (ghk_gpcm != "21")
-		control[] = "GHk="+ghk_gpcm ;
-		if (optimizer != "optim")
-			control[] = "optimizer=\"nlminb\"" ;
-			if (optimizer == "optim" && optimeth != "BFGS")
-				control[] = "optimMethod=\""+optimeth+"\"" ;
-				if (numrderiv != "fd")
-					control[] = "numrDeriv=\"cd\"" ;
-					if (epshess != "1e-06")
-						control[] = "epsHes="+epshess ;
-						if (verbose == "TRUE")
-							control[] = "verbose=TRUE" ;
+	var control = new Array() ;
+	if (iterqn_gpcm != 150)
+		control[control.length] = "iter.qN="+iterqn_gpcm ;
+	if (ghk_gpcm != 21)
+		control[control.length] = "GHk="+ghk_gpcm ;
+	if (optimizer != "optim")
+		control[control.length] = "optimizer=\"nlminb\"" ;
+	if (optimizer == "optim" && optimeth != "BFGS")
+		control[control.length] = "optimMethod=\""+optimeth+"\"" ;
+	if (numrderiv != "fd")
+		control[control.length] = "numrDeriv=\"cd\"" ;
+	if (epshess != 1e-06)
+		control[control.length] = "epsHes="+epshess ;
+	if (verbose == "TRUE")
+		control[control.length] = "verbose=TRUE" ;
 
-							echo ('estimates.gpcm <- gpcm(');
-							if (data && chk_select && inp_items)
-								echo ("subset("+data+", select=c("+inp_items+"))");
-								else
-									echo (data);
-									// any additional options?
-									if (constraint != "gpcm") echo(", constraint=\""+constraint+"\"");
-										if (irtparam != "TRUE") echo(", IRT.param=FALSE");
-											if (startval == "list" && startval_lst) echo(", start.val="+startval_lst);
-												if (startval == "random") echo(", start.val=\"random\"");
-													if (naaction) echo(", na.action="+naaction);
-														// finally check if any advanced control options must be inserted
-														if (control) echo(", control=list("+join(", ", control)+")");
-																echo (')\n');
-															}
+	echo ('estimates.gpcm <- gpcm(');
+		if (data && chk_select && inp_items)
+			echo ("subset("+data+", select=c("+inp_items+"))");
+		else
+			echo (data);
+		// any additional options?
+		if (constraint != "gpcm") echo(", constraint=\""+constraint+"\"");
+		if (irtparam != "TRUE") echo(", IRT.param=FALSE");
+		if (startval == "list" && startval_lst) echo(", start.val="+startval_lst);
+		if (startval == "random") echo(", start.val=\"random\"");
+		if (naaction) echo(", na.action="+naaction);
+		// finally check if any advanced control options must be inserted
+		if (control.length > 0) echo(", control=list("+control.join(", ")+")");
+	echo (')\n');
+}
 
 function printout () {
-	var save = "";
-	var save_name = "";
 	// check whether parameter estimations should be kept in the global enviroment
-	save         = getValue("chk_save");
-	save_name    = getValue("save_name");
+	var save = getValue("chk_save");
+	var save_name = getValue("save_name");
 
 	echo ('rk.header ("GPCM parameter estimation")\n');
-	echo ('rk.print (paste("Call: <code>",deparse(estimates.gpcm$call, width.cutoff=500),"</code>"))\n');
-	echo ('rk.print ("<h4>Coefficients:</h4>")\n');
+	echo ('rk.print ("Call:")\n');
+	echo ('rk.print.literal (deparse(estimates.gpcm$call, width.cutoff=500))\n');
+	echo ('rk.header ("Coefficients:", level=4)\n');
 	echo ('rk.print (coef(estimates.gpcm))\n');
 	echo ('rk.print (paste("Log-likelihood value at convergence:",round(estimates.gpcm$log.Lik, digits=1)))\n');
 // check if results are to be saved:
 	if (save && save_name) {
-
 		echo ('# keep results in current workspace\n');
 		echo (save_name + ' <<- estimates.gpcm\n');
 	}

Deleted: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.php	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.php	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,84 +0,0 @@
-<?
-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
-  $data         = getRK_val("x");
-  $chk_select   = getRK_val("chk_select");
-  $inp_items    = getRK_val("inp_items");
-  // reformat $inp_items
-  if($inp_items)
-    $inp_items       = str_replace("\n", ", ", preg_replace("/(.+)\[\[(.+)\]\]/", "$2", $inp_items));
-
-  $constraint   = getRK_val("constraint");
-  $startval     = getRK_val("startval");
-  $startval_lst = getRK_val("startval_lst");
-  $naaction     = getRK_val("naaction");
-  $irtparam     = getRK_val("irtparam");
-  $optimeth     = getRK_val("optimeth");
-  $verbose      = getRK_val("verbose");
-  // these are gpcm specific
-  $ghk_gpcm     = getRK_val("ghk_gpcm");
-  $iterqn_gpcm  = getRK_val("iterqn_gpcm");
-  $optimizer    = getRK_val("optimizer");
-  $numrderiv    = getRK_val("numrderiv");
-  $epshess      = getRK_val("epshess");
-  // $parscale     = getRK_val("parscale"); not implemented yet...
-
-  ///////////////////////////////////
-  // check for selected advanced control options
-  $control = array() ;
-  if($iterqn_gpcm != "150")
-    $control[] = "iter.qN=".$iterqn_gpcm ;
-  if($ghk_gpcm != "21")
-    $control[] = "GHk=".$ghk_gpcm ;
-  if($optimizer != "optim")
-    $control[] = "optimizer=\"nlminb\"" ;
-  if($optimizer == "optim" && $optimeth != "BFGS")
-    $control[] = "optimMethod=\"".$optimeth."\"" ;
-  if($numrderiv != "fd")
-    $control[] = "numrDeriv=\"cd\"" ;
-  if($epshess != "1e-06")
-    $control[] = "epsHes=".$epshess ;
-  if($verbose == "TRUE")
-    $control[] = "verbose=TRUE" ;
-
-?>estimates.gpcm <- gpcm(<?
-		  if($data && $chk_select && $inp_items)
-		    echo("subset(".$data.", select=c(".$inp_items."))");
-		  else
-		    echo($data);
-                  // any additional options?
-                  if($constraint != "gpcm") echo(", constraint=\"".$constraint."\"");
-                  if($irtparam != "TRUE") echo(", IRT.param=FALSE");
-                  if($startval == "list" && $startval_lst) echo(", start.val=".$startval_lst);
-		  if($startval == "random") echo(", start.val=\"random\"");
-                  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 () {
-  // check whether parameter estimations should be kept in the global enviroment
-  $save         = getRK_val("chk_save");
-  $save_name    = getRK_val("save_name");
-?>
-rk.header ("GPCM parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.gpcm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
-rk.print (coef(estimates.gpcm))
-rk.print (paste("Log-likelihood value at convergence:",round(estimates.gpcm$log.Lik, digits=1)))
-<?
-// check if results are to be saved:
-if ($save && $save_name) {
-?>
-# keep results in current workspace
-<? echo($save_name); ?> <<- estimates.gpcm
-<?}
-}
-?>
\ No newline at end of file

Modified: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.xml	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_gpcm.xml	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,7 +1,7 @@
 <!DOCTYPE rkplugin>
 <document>
-  <code file="par_est_gpcm.php" />
-  <help file="par_est_gpcm.rkh" />
+  <code file="par_est_gpcm.js" />
+  <help file="par_est_gpcm.rkh" ></help>
 
   <logic>
     <convert id="optim_used"  mode="equals" sources="optimizer.string" standard="optim" />

Modified: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.js	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.js	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,94 +1,63 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	// we'll need the ltm package, so in case it's not loaded...
-
-	echo ('  require(ltm)\n');
+	echo ('require(ltm)\n');
 }
 
 function calculate () {
-	var constraint = "";
-	var startval = "";
-	var startval_lst = "";
-	var hessian = "";
-	var naaction = "";
-	var irtparam = "";
-	var optimeth = "";
-	var verbose = "";
-	var ghk_grm = "";
-	var iterqn_grm = "";
-	var dig_abbrv = "";
-	var control = "";
 	// let's read all values into php variables for the sake of readable code
-	constraint   = getValue("constraint");
-	startval     = getValue("startval");
-	startval_lst = getValue("startval_lst");
-	hessian      = getValue("hessian");
-	naaction     = getValue("naaction");
-	irtparam     = getValue("irtparam");
-	optimeth     = getValue("optimeth");
-	verbose      = getValue("verbose");
+	var constraint   = getValue("constraint");
+	var startval     = getValue("startval");
+	var startval_lst = getValue("startval_lst");
+	var hessian      = getValue("hessian");
+	var naaction     = getValue("naaction");
+	var irtparam     = getValue("irtparam");
+	var optimeth     = getValue("optimeth");
+	var verbose      = getValue("verbose");
 	// these are grm specific
-	ghk_grm      = getValue("ghk_grm");
-	iterqn_grm   = getValue("iterqn_grm");
-	dig_abbrv    = getValue("dig_abbrv");
+	var ghk_grm      = getValue("ghk_grm");
+	var iterqn_grm   = getValue("iterqn_grm");
+	var dig_abbrv    = getValue("dig_abbrv");
 
 	///////////////////////////////////
 	// check for selected advanced control options
-	control = new 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 ;
+	var control = new Array() ;
+	if (iterqn_grm != 150)
+		control[control.length] = "iter.qN="+iterqn_grm ;
+	if (ghk_grm != 21)
+		control[control.length] = "GHk="+ghk_grm ;
+	if (optimeth != "BFGS")
+		control[control.length] = "method=\""+optimeth+"\"" ;
+	if (verbose == "TRUE")
+		control[control.length] = "verbose=TRUE" ;
+	if (dig_abbrv != 6)
+		control[control.length] = "digits.abbrv="+dig_abbrv ;
 
-					echo ('estimates.grm <- grm(' + getValue("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)+")");
-													echo (')\n');
-												}
+	echo ('estimates.grm <- grm(' + getValue("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.length > 0) echo(", control=list("+control.join(", ")+")");
+	echo (')\n');
+}
 
 function printout () {
-	var save = "";
-	var save_name = "";
 	// check whether parameter estimations should be kept in the global enviroment
-	save         = getValue("chk_save");
-	save_name    = getValue("save_name");
+	var save         = getValue("chk_save");
+	var save_name    = getValue("save_name");
 
 	echo ('rk.header ("GRM parameter estimation")\n');
-	echo ('rk.print (paste("Call: <code>",deparse(estimates.grm$call, width.cutoff=500),"</code>"))\n');
-	echo ('rk.print ("<h4>Coefficients:</h4>")\n');
+	echo ('rk.print ("Call:")\n');
+	echo ('rk.print.literal (deparse(estimates.grm$call, width.cutoff=500))\n');
+	echo ('rk.header ("Coefficients:", level=4)\n');
 	echo ('rk.print (coef(estimates.grm))\n');
 	echo ('rk.print (paste("Log-likelihood value at convergence:",round(estimates.grm$log.Lik, digits=1)))\n');
-// check if results are to be saved:
+	// check if results are to be saved:
 	if (save && save_name) {
-
 		echo ('# keep results in current workspace\n');
 		echo (save_name + ' <<- estimates.grm\n');
 	}

Deleted: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.php	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.php	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,68 +0,0 @@
-<?
-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 () {
-  // check whether parameter estimations should be kept in the global enviroment
-  $save         = getRK_val("chk_save");
-  $save_name    = getRK_val("save_name");
-?>
-rk.header ("GRM parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.grm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
-rk.print (coef(estimates.grm))
-rk.print (paste("Log-likelihood value at convergence:",round(estimates.grm$log.Lik, digits=1)))
-<?
-// check if results are to be saved:
-if ($save && $save_name) {
-?>
-# keep results in current workspace
-<? echo($save_name); ?> <<- estimates.grm
-<?}
-}
-?>
\ No newline at end of file

Modified: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.xml	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_grm.xml	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-  <code file="par_est_grm.php" />
+  <code file="par_est_grm.js" />
   <help file="par_est_grm.rkh" />
 
   <logic>

Modified: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.js	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.js	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,72 +1,45 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	// we'll need the eRm package, so in case it's not loaded...
-
-	echo ('  require(eRm)\n');
+	echo ('require(eRm)\n');
 }
 
 function calculate () {
-	var mpoints = "";
-	var groups = "";
-	var group_vec = "";
-	var design = "";
-	var design_mtx = "";
-	var etastart = "";
-	var etastart_vec = "";
-	var stderr = "";
-	var sumnull = "";
 	// let's read all values into php variables for the sake of readable code
-	mpoints      = getValue("mpoints");
-	groups       = getValue("groups");
-	group_vec    = getValue("group_vec");
-	design       = getValue("design");
-	design_mtx   = getValue("design_mtx");
-	etastart     = getValue("etastart");
-	etastart_vec = getValue("etastart_vec");
-	stderr       = getValue("stderr");
-	sumnull      = getValue("sumnull");
+	var mpoints      = getValue("mpoints");
+	var groups       = getValue("groups");
+	var group_vec    = getValue("group_vec");
+	var design       = getValue("design");
+	var design_mtx   = getValue("design_mtx");
+	var etastart     = getValue("etastart");
+	var etastart_vec = getValue("etastart_vec");
+	var stderr       = getValue("stderr");
+	var sumnull      = getValue("sumnull");
 
 	echo ('estimates.lpcm <- LPCM(' + getValue("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);
+		// 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);
 	echo (')\n');
 }
 
 function printout () {
-	var save = "";
-	var save_name = "";
 	// check whether parameter estimations should be kept in the global enviroment
-	save         = getValue("chk_save");
-	save_name    = getValue("save_name");
+	var save         = getValue("chk_save");
+	var save_name    = getValue("save_name");
 
 	echo ('rk.header ("LPCM  parameter estimation")\n');
-	echo ('rk.print (paste("Call: <code>",deparse(estimates.lpcm$call, width.cutoff=500),"</code>"))\n');
-	echo ('rk.print ("<h4>Coefficients:</h4>")\n');
+	echo ('rk.print ("Call:")\n');
+	echo ('rk.print.literal (deparse(estimates.lpcm$call, width.cutoff=500))\n');
+	echo ('rk.header ("Coefficients:", level=4)\n');
 	echo ('rk.print(t(rbind(Eta=estimates.lpcm$etapar,StdErr=estimates.lpcm$se.eta)))\n');
 	echo ('rk.print (paste("Conditional log-likelihood:",round(estimates.lpcm$loglik, digits=1),\n');
 	echo ('"<br />Number of iterations:",estimates.lpcm$iter,"<br />Number of parameters:",estimates.lpcm$npar))\n');
-// check if results are to be saved:
+	// check if results are to be saved:
 	if (save && save_name) {
-
 		echo ('# keep results in current workspace\n');
 		echo (save_name + ' <<- estimates.lpcm\n');
 	}

Deleted: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.php	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.php	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,50 +0,0 @@
-<?
-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 () {
-  // check whether parameter estimations should be kept in the global enviroment
-  $save         = getRK_val("chk_save");
-  $save_name    = getRK_val("save_name");
-?>
-rk.header ("LPCM  parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.lpcm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
-rk.print(t(rbind(Eta=estimates.lpcm$etapar,StdErr=estimates.lpcm$se.eta)))
-rk.print (paste("Conditional log-likelihood:",round(estimates.lpcm$loglik, digits=1),
-"<br />Number of iterations:",estimates.lpcm$iter,"<br />Number of parameters:",estimates.lpcm$npar))
-<?
-// check if results are to be saved:
-if ($save && $save_name) {
-?>
-# keep results in current workspace
-<? echo($save_name); ?> <<- estimates.lpcm
-<?}
-}
-?>
\ No newline at end of file

Modified: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.xml	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lpcm.xml	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-  <code file="par_est_lpcm.php" />
+  <code file="par_est_lpcm.js" />
   <help file="par_est_lpcm.rkh" />
 
   <logic>

Modified: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.js	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.js	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,72 +1,45 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	// we'll need the eRm package, so in case it's not loaded...
-
-	echo ('  require(eRm)\n');
+	echo ('require(eRm)\n');
 }
 
 function calculate () {
-	var mpoints = "";
-	var groups = "";
-	var group_vec = "";
-	var design = "";
-	var design_mtx = "";
-	var etastart = "";
-	var etastart_vec = "";
-	var stderr = "";
-	var sumnull = "";
 	// let's read all values into php variables for the sake of readable code
-	mpoints      = getValue("mpoints");
-	groups       = getValue("groups");
-	group_vec    = getValue("group_vec");
-	design       = getValue("design");
-	design_mtx   = getValue("design_mtx");
-	etastart     = getValue("etastart");
-	etastart_vec = getValue("etastart_vec");
-	stderr       = getValue("stderr");
-	sumnull      = getValue("sumnull");
+	var mpoints      = getValue("mpoints");
+	var groups       = getValue("groups");
+	var group_vec    = getValue("group_vec");
+	var design       = getValue("design");
+	var design_mtx   = getValue("design_mtx");
+	var etastart     = getValue("etastart");
+	var etastart_vec = getValue("etastart_vec");
+	var stderr       = getValue("stderr");
+	var sumnull      = getValue("sumnull");
 
 	echo ('estimates.lrsm <- LRSM(' + getValue("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);
+		// 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);
 	echo (')\n');
 }
 
 function printout () {
-	var save = "";
-	var save_name = "";
 	// check whether parameter estimations should be kept in the global enviroment
-	save         = getValue("chk_save");
-	save_name    = getValue("save_name");
+	var save         = getValue("chk_save");
+	var save_name    = getValue("save_name");
 
 	echo ('rk.header ("LRSM  parameter estimation")\n');
-	echo ('rk.print (paste("Call: <code>",deparse(estimates.lrsm$call, width.cutoff=500),"</code>"))\n');
-	echo ('rk.print ("<h4>Coefficients:</h4>")\n');
+	echo ('rk.print ("Call:")\n');
+	echo ('rk.print.literal (deparse(estimates.lrsm$call, width.cutoff=500))\n');
+	echo ('rk.header ("Coefficients:", level=4)\n');
 	echo ('rk.print(t(rbind(Eta=estimates.lrsm$etapar,StdErr=estimates.lrsm$se.eta)))\n');
 	echo ('rk.print (paste("Conditional log-likelihood:",round(estimates.lrsm$loglik, digits=1),\n');
 	echo ('"<br />Number of iterations:",estimates.lrsm$iter,"<br />Number of parameters:",estimates.lrsm$npar))\n');
 // check if results are to be saved:
 	if (save && save_name) {
-
 		echo ('# keep results in current workspace\n');
 		echo (save_name + ' <<- estimates.lrsm\n');
 	}

Deleted: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.php	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.php	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,50 +0,0 @@
-<?
-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 () {
-  // check whether parameter estimations should be kept in the global enviroment
-  $save         = getRK_val("chk_save");
-  $save_name    = getRK_val("save_name");
-?>
-rk.header ("LRSM  parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.lrsm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
-rk.print(t(rbind(Eta=estimates.lrsm$etapar,StdErr=estimates.lrsm$se.eta)))
-rk.print (paste("Conditional log-likelihood:",round(estimates.lrsm$loglik, digits=1),
-"<br />Number of iterations:",estimates.lrsm$iter,"<br />Number of parameters:",estimates.lrsm$npar))
-<?
-// check if results are to be saved:
-if ($save && $save_name) {
-?>
-# keep results in current workspace
-<? echo($save_name); ?> <<- estimates.lrsm
-<?}
-}
-?>
\ No newline at end of file

Modified: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.xml	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_lrsm.xml	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-  <code file="par_est_lrsm.php" />
+  <code file="par_est_lrsm.js" />
   <help file="par_est_lrsm.rkh" />
 
   <logic>

Modified: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.js	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.js	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,62 +1,40 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	// we'll need the eRm package, so in case it's not loaded...
-
-	echo ('  require(eRm)\n');
+	echo ('require(eRm)\n');
 }
 
 function calculate () {
-	var design = "";
-	var design_mtx = "";
-	var etastart = "";
-	var etastart_vec = "";
-	var stderr = "";
-	var sumnull = "";
 	// let's read all values into php variables for the sake of readable code
-	design       = getValue("design");
-	design_mtx   = getValue("design_mtx");
-	etastart     = getValue("etastart");
-	etastart_vec = getValue("etastart_vec");
-	stderr       = getValue("stderr");
-	sumnull      = getValue("sumnull");
+	var design       = getValue("design");
+	var design_mtx   = getValue("design_mtx");
+	var etastart     = getValue("etastart");
+	var etastart_vec = getValue("etastart_vec");
+	var stderr       = getValue("stderr");
+	var sumnull      = getValue("sumnull");
 
 	echo ('estimates.pcm <- PCM(' + getValue("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);
+		// 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);
 	echo (')\n');
 }
 
 function printout () {
-	var save = "";
-	var save_name = "";
 	// check whether parameter estimations should be kept in the global enviroment
-	save         = getValue("chk_save");
-	save_name    = getValue("save_name");
+	var save         = getValue("chk_save");
+	var save_name    = getValue("save_name");
 
 	echo ('rk.header ("PCM  parameter estimation")\n');
-	echo ('rk.print (paste("Call: <code>",deparse(estimates.pcm$call, width.cutoff=500),"</code>"))\n');
-	echo ('rk.print ("<h4>Coefficients:</h4>")\n');
+	echo ('rk.print ("Call:")\n');
+	echo ('rk.print.literal (deparse(estimates.pcm$call, width.cutoff=500))\n');
+	echo ('rk.header ("Coefficients:", level=4)\n');
 	echo ('rk.print(t(rbind(Eta=estimates.pcm$etapar,StdErr=estimates.pcm$se.eta)))\n');
 	echo ('rk.print (paste("Conditional log-likelihood:",round(estimates.pcm$loglik, digits=1),\n');
 	echo ('"<br />Number of iterations:",estimates.pcm$iter,"<br />Number of parameters:",estimates.pcm$npar))\n');
 // check if results are to be saved:
 	if (save && save_name) {
-
 		echo ('# keep results in current workspace\n');
 		echo (save_name + ' <<- estimates.pcm\n');
 	}

Deleted: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.php	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.php	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,45 +0,0 @@
-<?
-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 () {
-  // check whether parameter estimations should be kept in the global enviroment
-  $save         = getRK_val("chk_save");
-  $save_name    = getRK_val("save_name");
-?>
-rk.header ("PCM  parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.pcm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
-rk.print(t(rbind(Eta=estimates.pcm$etapar,StdErr=estimates.pcm$se.eta)))
-rk.print (paste("Conditional log-likelihood:",round(estimates.pcm$loglik, digits=1),
-"<br />Number of iterations:",estimates.pcm$iter,"<br />Number of parameters:",estimates.pcm$npar))
-<?
-// check if results are to be saved:
-if ($save && $save_name) {
-?>
-# keep results in current workspace
-<? echo($save_name); ?> <<- estimates.pcm
-<?}
-}
-?>
\ No newline at end of file

Modified: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.xml	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_pcm.xml	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-  <code file="par_est_pcm.php" />
+  <code file="par_est_pcm.js" />
   <help file="par_est_pcm.rkh" />
 
   <logic>

Modified: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.js
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.js	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.js	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,62 +1,40 @@
-/* ------- This file generated by php2js from PHP code. --------
-Please check this file by hand, and remove this notice, afterwards.
-Messages:
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-Note: Control statement without braces. This is bad style.
-
----------------------------- */
-
-// globals
-var undefined;
-
 function preprocess () {
 	// we'll need the eRm package, so in case it's not loaded...
-
-	echo ('  require(eRm)\n');
+	echo ('require(eRm)\n');
 }
 
 function calculate () {
-	var design = "";
-	var design_mtx = "";
-	var etastart = "";
-	var etastart_vec = "";
-	var stderr = "";
-	var sumnull = "";
 	// let's read all values into php variables for the sake of readable code
-	design       = getValue("design");
-	design_mtx   = getValue("design_mtx");
-	etastart     = getValue("etastart");
-	etastart_vec = getValue("etastart_vec");
-	stderr       = getValue("stderr");
-	sumnull      = getValue("sumnull");
+	var design       = getValue("design");
+	var design_mtx   = getValue("design_mtx");
+	var etastart     = getValue("etastart");
+	var etastart_vec = getValue("etastart_vec");
+	var stderr       = getValue("stderr");
+	var sumnull      = getValue("sumnull");
 
 	echo ('estimates.rsm <- RSM(' + getValue("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);
+		// 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);
 	echo (')\n');
 }
 
 function printout () {
-	var save = "";
-	var save_name = "";
 	// check whether parameter estimations should be kept in the global enviroment
-	save         = getValue("chk_save");
-	save_name    = getValue("save_name");
+	var save         = getValue("chk_save");
+	var save_name    = getValue("save_name");
 
 	echo ('rk.header ("RSM  parameter estimation")\n');
-	echo ('rk.print (paste("Call: <code>",deparse(estimates.rsm$call, width.cutoff=500),"</code>"))\n');
-	echo ('rk.print ("<h4>Coefficients:</h4>")\n');
+	echo ('rk.print ("Call:")\n');
+	echo ('rk.print.literal (deparse(estimates.rsm$call, width.cutoff=500))\n');
+	echo ('rk.header ("Coefficients:", level=4)\n');
 	echo ('rk.print(t(rbind(Eta=estimates.rsm$etapar,StdErr=estimates.rsm$se.eta)))\n');
 	echo ('rk.print (paste("Conditional log-likelihood:",round(estimates.rsm$loglik, digits=1),\n');
 	echo ('"<br />Number of iterations:",estimates.rsm$iter,"<br />Number of parameters:",estimates.rsm$npar))\n');
 // check if results are to be saved:
 	if (save && save_name) {
-
 		echo ('# keep results in current workspace\n');
 		echo (save_name + ' <<- estimates.rsm\n');
 	}

Deleted: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.php	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.php	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,45 +0,0 @@
-<?
-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 () {
-  // check whether parameter estimations should be kept in the global enviroment
-  $save         = getRK_val("chk_save");
-  $save_name    = getRK_val("save_name");
-?>
-rk.header ("RSM  parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.rsm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
-rk.print(t(rbind(Eta=estimates.rsm$etapar,StdErr=estimates.rsm$se.eta)))
-rk.print (paste("Conditional log-likelihood:",round(estimates.rsm$loglik, digits=1),
-"<br />Number of iterations:",estimates.rsm$iter,"<br />Number of parameters:",estimates.rsm$npar))
-<?
-// check if results are to be saved:
-if ($save && $save_name) {
-?>
-# keep results in current workspace
-<? echo($save_name); ?> <<- estimates.rsm
-<?}
-}
-?>
\ No newline at end of file

Modified: trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.xml	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/rkward/plugins/analysis/irt/polytomous/par_est_rsm.xml	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,6 @@
 <!DOCTYPE rkplugin>
 <document>
-  <code file="par_est_rsm.php" />
+  <code file="par_est_rsm.js" />
   <help file="par_est_rsm.rkh" />
 
   <logic>

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.2PL_parameter_estimation.rkcommands.R
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.2PL_parameter_estimation.rkcommands.R	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.2PL_parameter_estimation.rkcommands.R	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,12 +1,13 @@
 local({
 ## Prepare
-  require(ltm)
+require(ltm)
 ## Compute
 estimates.2pl <- ltm(WIRS ~ z1 * z2)
 ## Print result
 rk.header ("2PL parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.2pl$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
+rk.print ("Call:")
+rk.print.literal (deparse(estimates.2pl$call, width.cutoff=500))
+rk.header ("Coefficients:", level=4)
 rk.print (coef(estimates.2pl))
 rk.print (paste("Log-likelihood value at convergence:",round(estimates.2pl$log.Lik, digits=1)))
 # keep results in current workspace

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.2PL_parameter_estimation.rkout
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.2PL_parameter_estimation.rkout	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.2PL_parameter_estimation.rkout	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,9 @@
 <h1>2PL parameter estimation</h1>
 DATE<br>
-<p class='character'>Call: <code> ltm(formula = WIRS ~ z1 * z2) </code></p><p class='character'><h4>Coefficients:</h4></p>
+<p class='character'>Call:</p><pre>ltm(formula = WIRS ~ z1 * z2)</pre>
+<h4>Coefficients:</h4>
+<br>
+
 <p align= center >
 <table cellspacing=0 border=1><caption align=bottom class=captiondataframe></caption><tr><td>
 	<table border=0 class=dataframe>

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.3PL_parameter_estimation.rkcommands.R
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.3PL_parameter_estimation.rkcommands.R	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.3PL_parameter_estimation.rkcommands.R	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,12 +1,13 @@
 local({
 ## Prepare
-  require(ltm)
+require(ltm)
 ## Compute
 estimates.3pl <- tpm(LSAT)
 ## Print result
 rk.header ("3PL parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.3pl$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
+rk.print ("Call:")
+rk.print.literal (deparse(estimates.3pl$call, width.cutoff=500))
+rk.header ("Coefficients:", level=4)
 rk.print (coef(estimates.3pl))
 rk.print (paste("Log-likelihood value at convergence:",round(estimates.3pl$log.Lik, digits=1)))
 # keep results in current workspace

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.3PL_parameter_estimation.rkout
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.3PL_parameter_estimation.rkout	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.3PL_parameter_estimation.rkout	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,9 @@
 <h1>3PL parameter estimation</h1>
 DATE<br>
-<p class='character'>Call: <code> tpm(data = LSAT) </code></p><p class='character'><h4>Coefficients:</h4></p>
+<p class='character'>Call:</p><pre>tpm(data = LSAT)</pre>
+<h4>Coefficients:</h4>
+<br>
+
 <p align= center >
 <table cellspacing=0 border=1><caption align=bottom class=captiondataframe></caption><tr><td>
 	<table border=0 class=dataframe>

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.GPCM_parameter_estimation.rkcommands.R
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.GPCM_parameter_estimation.rkcommands.R	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.GPCM_parameter_estimation.rkcommands.R	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,12 +1,13 @@
 local({
 ## Prepare
-  require(ltm)
+require(ltm)
 ## Compute
 estimates.gpcm <- gpcm(subset(Science, select=c("Work", "Industry", "Future", "Benefit")), constraint="rasch")
 ## Print result
 rk.header ("GPCM parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.gpcm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
+rk.print ("Call:")
+rk.print.literal (deparse(estimates.gpcm$call, width.cutoff=500))
+rk.header ("Coefficients:", level=4)
 rk.print (coef(estimates.gpcm))
 rk.print (paste("Log-likelihood value at convergence:",round(estimates.gpcm$log.Lik, digits=1)))
 # keep results in current workspace

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.GPCM_parameter_estimation.rkout
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.GPCM_parameter_estimation.rkout	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.GPCM_parameter_estimation.rkout	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,9 @@
 <h1>GPCM parameter estimation</h1>
 DATE<br>
-<p class='character'>Call: <code> gpcm(data = subset(Science, select = c("Work", "Industry", "Future", "Benefit")), constraint = "rasch") </code></p><p class='character'><h4>Coefficients:</h4></p>
+<p class='character'>Call:</p><pre>gpcm(data = subset(Science, select = c("Work", "Industry", "Future", "Benefit")), constraint = "rasch")</pre>
+<h4>Coefficients:</h4>
+<br>
+
 <p align= center >
 <table cellspacing=0 border=1><caption align=bottom class=captiondataframe></caption><tr><td>
 	<table border=0 class=dataframe>

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.GRM_parameter_estimation.rkcommands.R
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.GRM_parameter_estimation.rkcommands.R	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.GRM_parameter_estimation.rkcommands.R	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,12 +1,13 @@
 local({
 ## Prepare
-  require(ltm)
+require(ltm)
 ## Compute
 estimates.grm <- grm(Environment)
 ## Print result
 rk.header ("GRM parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.grm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
+rk.print ("Call:")
+rk.print.literal (deparse(estimates.grm$call, width.cutoff=500))
+rk.header ("Coefficients:", level=4)
 rk.print (coef(estimates.grm))
 rk.print (paste("Log-likelihood value at convergence:",round(estimates.grm$log.Lik, digits=1)))
 # keep results in current workspace

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.GRM_parameter_estimation.rkout
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.GRM_parameter_estimation.rkout	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.GRM_parameter_estimation.rkout	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,9 @@
 <h1>GRM parameter estimation</h1>
 DATE<br>
-<p class='character'>Call: <code> grm(data = Environment) </code></p><p class='character'><h4>Coefficients:</h4></p>
+<p class='character'>Call:</p><pre>grm(data = Environment)</pre>
+<h4>Coefficients:</h4>
+<br>
+
 <p align= center >
 <table cellspacing=0 border=1><caption align=bottom class=captiondataframe></caption><tr><td>
 	<table border=0 class=dataframe>

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.LLTM_parameter_estimation.rkcommands.R
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.LLTM_parameter_estimation.rkcommands.R	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.LLTM_parameter_estimation.rkcommands.R	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,12 +1,13 @@
 local({
 ## Prepare
-  require(eRm)
+require(eRm)
 ## Compute
 estimates.lltm <- LLTM(lltmdat1, mpoints=2)
 ## Print result
 rk.header ("LLTM  parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.lltm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
+rk.print ("Call:")
+rk.print.literal (deparse(estimates.lltm$call, width.cutoff=500))
+rk.header ("Coefficients:", level=4)
 rk.print(t(rbind(Eta=estimates.lltm$etapar,StdErr=estimates.lltm$se.eta)))
 rk.print (paste("Conditional log-likelihood:",round(estimates.lltm$loglik, digits=1),
 "<br />Number of iterations:",estimates.lltm$iter,"<br />Number of parameters:",estimates.lltm$npar))

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.LLTM_parameter_estimation.rkout
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.LLTM_parameter_estimation.rkout	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.LLTM_parameter_estimation.rkout	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,9 @@
 <h1>LLTM  parameter estimation</h1>
 DATE<br>
-<p class='character'>Call: <code> LLTM(X = lltmdat1, mpoints = 2) </code></p><p class='character'><h4>Coefficients:</h4></p>
+<p class='character'>Call:</p><pre>LLTM(X = lltmdat1, mpoints = 2)</pre>
+<h4>Coefficients:</h4>
+<br>
+
 <p align= center >
 <table cellspacing=0 border=1><caption align=bottom class=captiondataframe></caption><tr><td>
 	<table border=0 class=dataframe>

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.LPCM_parameter_estimation.rkcommands.R
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.LPCM_parameter_estimation.rkcommands.R	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.LPCM_parameter_estimation.rkcommands.R	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,12 +1,13 @@
 local({
 ## Prepare
-  require(eRm)
+require(eRm)
 ## Compute
 estimates.lpcm <- LPCM(lpcmdat, mpoints=2, groupvec=G)
 ## Print result
 rk.header ("LPCM  parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.lpcm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
+rk.print ("Call:")
+rk.print.literal (deparse(estimates.lpcm$call, width.cutoff=500))
+rk.header ("Coefficients:", level=4)
 rk.print(t(rbind(Eta=estimates.lpcm$etapar,StdErr=estimates.lpcm$se.eta)))
 rk.print (paste("Conditional log-likelihood:",round(estimates.lpcm$loglik, digits=1),
 "<br />Number of iterations:",estimates.lpcm$iter,"<br />Number of parameters:",estimates.lpcm$npar))

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.LPCM_parameter_estimation.rkout
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.LPCM_parameter_estimation.rkout	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.LPCM_parameter_estimation.rkout	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,9 @@
 <h1>LPCM  parameter estimation</h1>
 DATE<br>
-<p class='character'>Call: <code> LPCM(X = lpcmdat, mpoints = 2, groupvec = G) </code></p><p class='character'><h4>Coefficients:</h4></p>
+<p class='character'>Call:</p><pre>LPCM(X = lpcmdat, mpoints = 2, groupvec = G)</pre>
+<h4>Coefficients:</h4>
+<br>
+
 <p align= center >
 <table cellspacing=0 border=1><caption align=bottom class=captiondataframe></caption><tr><td>
 	<table border=0 class=dataframe>

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.LRSM_parameter_estimation.rkcommands.R
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.LRSM_parameter_estimation.rkcommands.R	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.LRSM_parameter_estimation.rkcommands.R	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,12 +1,13 @@
 local({
 ## Prepare
-  require(eRm)
+require(eRm)
 ## Compute
 estimates.lrsm <- LRSM(lrsmdat, mpoints=2, se=FALSE, sum0=FALSE)
 ## Print result
 rk.header ("LRSM  parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.lrsm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
+rk.print ("Call:")
+rk.print.literal (deparse(estimates.lrsm$call, width.cutoff=500))
+rk.header ("Coefficients:", level=4)
 rk.print(t(rbind(Eta=estimates.lrsm$etapar,StdErr=estimates.lrsm$se.eta)))
 rk.print (paste("Conditional log-likelihood:",round(estimates.lrsm$loglik, digits=1),
 "<br />Number of iterations:",estimates.lrsm$iter,"<br />Number of parameters:",estimates.lrsm$npar))

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.LRSM_parameter_estimation.rkout
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.LRSM_parameter_estimation.rkout	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.LRSM_parameter_estimation.rkout	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,9 @@
 <h1>LRSM  parameter estimation</h1>
 DATE<br>
-<p class='character'>Call: <code> LRSM(X = lrsmdat, mpoints = 2, se = FALSE, sum0 = FALSE) </code></p><p class='character'><h4>Coefficients:</h4></p>
+<p class='character'>Call:</p><pre>LRSM(X = lrsmdat, mpoints = 2, se = FALSE, sum0 = FALSE)</pre>
+<h4>Coefficients:</h4>
+<br>
+
 <p align= center >
 <table cellspacing=0 border=1><caption align=bottom class=captiondataframe></caption><tr><td>
 	<table border=0 class=dataframe>

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.PCM_parameter_estimation.rkcommands.R
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.PCM_parameter_estimation.rkcommands.R	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.PCM_parameter_estimation.rkcommands.R	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,12 +1,13 @@
 local({
 ## Prepare
-  require(eRm)
+require(eRm)
 ## Compute
 estimates.pcm <- PCM(pcmdat)
 ## Print result
 rk.header ("PCM  parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.pcm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
+rk.print ("Call:")
+rk.print.literal (deparse(estimates.pcm$call, width.cutoff=500))
+rk.header ("Coefficients:", level=4)
 rk.print(t(rbind(Eta=estimates.pcm$etapar,StdErr=estimates.pcm$se.eta)))
 rk.print (paste("Conditional log-likelihood:",round(estimates.pcm$loglik, digits=1),
 "<br />Number of iterations:",estimates.pcm$iter,"<br />Number of parameters:",estimates.pcm$npar))

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.PCM_parameter_estimation.rkout
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.PCM_parameter_estimation.rkout	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.PCM_parameter_estimation.rkout	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,9 @@
 <h1>PCM  parameter estimation</h1>
 DATE<br>
-<p class='character'>Call: <code> PCM(X = pcmdat) </code></p><p class='character'><h4>Coefficients:</h4></p>
+<p class='character'>Call:</p><pre>PCM(X = pcmdat)</pre>
+<h4>Coefficients:</h4>
+<br>
+
 <p align= center >
 <table cellspacing=0 border=1><caption align=bottom class=captiondataframe></caption><tr><td>
 	<table border=0 class=dataframe>

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.RSM_parameter_estimation.rkcommands.R
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.RSM_parameter_estimation.rkcommands.R	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.RSM_parameter_estimation.rkcommands.R	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,12 +1,13 @@
 local({
 ## Prepare
-  require(eRm)
+require(eRm)
 ## Compute
 estimates.rsm <- RSM(rsmdat)
 ## Print result
 rk.header ("RSM  parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.rsm$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
+rk.print ("Call:")
+rk.print.literal (deparse(estimates.rsm$call, width.cutoff=500))
+rk.header ("Coefficients:", level=4)
 rk.print(t(rbind(Eta=estimates.rsm$etapar,StdErr=estimates.rsm$se.eta)))
 rk.print (paste("Conditional log-likelihood:",round(estimates.rsm$loglik, digits=1),
 "<br />Number of iterations:",estimates.rsm$iter,"<br />Number of parameters:",estimates.rsm$npar))

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.RSM_parameter_estimation.rkout
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.RSM_parameter_estimation.rkout	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.RSM_parameter_estimation.rkout	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,9 @@
 <h1>RSM  parameter estimation</h1>
 DATE<br>
-<p class='character'>Call: <code> RSM(X = rsmdat) </code></p><p class='character'><h4>Coefficients:</h4></p>
+<p class='character'>Call:</p><pre>RSM(X = rsmdat)</pre>
+<h4>Coefficients:</h4>
+<br>
+
 <p align= center >
 <table cellspacing=0 border=1><caption align=bottom class=captiondataframe></caption><tr><td>
 	<table border=0 class=dataframe>

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.Rasch_parameter_estimation.rkcommands.R
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.Rasch_parameter_estimation.rkcommands.R	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.Rasch_parameter_estimation.rkcommands.R	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,12 +1,13 @@
 local({
 ## Prepare
-  require(ltm)
+require(ltm)
 ## Compute
 estimates.rasch <- rasch(LSAT)
 ## Print result
 rk.header ("Rasch parameter estimation")
-rk.print (paste("Call: <code>",deparse(estimates.rasch$call, width.cutoff=500),"</code>"))
-rk.print ("<h4>Coefficients:</h4>")
+rk.print ("Call:")
+rk.print.literal (deparse(estimates.rasch$call, width.cutoff=500))
+rk.header ("Coefficients:", level=4)
 rk.print (coef(estimates.rasch))
 rk.print (paste("Log-likelihood value at convergence:",round(estimates.rasch$log.Lik, digits=1)))
 # keep results in current workspace

Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.Rasch_parameter_estimation.rkout
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.Rasch_parameter_estimation.rkout	2009-12-17 08:35:09 UTC (rev 2726)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.Rasch_parameter_estimation.rkout	2009-12-17 16:39:38 UTC (rev 2727)
@@ -1,6 +1,9 @@
 <h1>Rasch parameter estimation</h1>
 DATE<br>
-<p class='character'>Call: <code> rasch(data = LSAT) </code></p><p class='character'><h4>Coefficients:</h4></p>
+<p class='character'>Call:</p><pre>rasch(data = LSAT)</pre>
+<h4>Coefficients:</h4>
+<br>
+
 <p align= center >
 <table cellspacing=0 border=1><caption align=bottom class=captiondataframe></caption><tr><td>
 	<table border=0 class=dataframe>


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