// globals

function preprocess () {
  

echo ('  require(ltm)\n');
}

function calculate () {
  
  spin_samples    = getValue("spin_samples");

echo ('GoFRasch.res <- GoF.rasch(' + getValue("x"));
                  
                  if(spin_samples != "49") echo (", B="+spin_samples);
 echo (')\n');
}

function printout () {
echo ('rk.header ("Goodness of Fit for Rasch Models (' + getValue("x") + ')")\n');
echo ('rk.print (GoFRasch.res)\n');
}
