[rkward-cvs] SF.net SVN: rkward:[2715] trunk/rkward
m-eik at users.sourceforge.net
m-eik at users.sourceforge.net
Fri Nov 27 23:13:40 UTC 2009
Revision: 2715
http://rkward.svn.sourceforge.net/rkward/?rev=2715&view=rev
Author: m-eik
Date: 2009-11-27 23:13:40 +0000 (Fri, 27 Nov 2009)
Log Message:
-----------
irt: aufhuebsching the cronbach output
Modified Paths:
--------------
trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.php
trunk/rkward/tests/item_response_theory/RKTestStandard.Cronbach_alpha.rkcommands.R
trunk/rkward/tests/item_response_theory/RKTestStandard.Cronbach_alpha.rkout
Modified: trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.php 2009-11-27 15:32:42 UTC (rev 2714)
+++ trunk/rkward/rkward/plugins/analysis/irt/tests/ltm_cronbach_alpha.php 2009-11-27 23:13:40 UTC (rev 2715)
@@ -46,20 +46,38 @@
// check if any advanced control options must be inserted
if($options) echo(", ".join(", ", $options));
?>)
+descript.res <- descript(<?
+ if($data && $chk_select && $inp_items)
+ echo("subset(".$data.", select=c(".$inp_items."))");
+ else
+ echo($data);
+ ?>, chi.squared=FALSE, B=<? echo($spin_samples); ?>)
<?}
function printout () {
+ $chk_select = getRK_val("chk_select");
+ $spin_samples = getRK_val("spin_samples");
+ $chk_standard = getRK_val("chk_standard");
+ $chk_na = getRK_val("chk_na");
+ $chk_bsci = getRK_val("chk_bsci");
+ $spin_ci = getRK_val("spin_ci");
$inp_items = getRK_val("inp_items");
// reformat $inp_items
if($inp_items)
$inp_items = str_replace("\n", ", ", preg_replace("/(.+)\[\[\"(.+)\"\]\]/", "$2", $inp_items));
?>
-rk.header ("Cronbach's alpha (<?
- getRK("x");
- if($inp_items)
- echo(", subset: ".$inp_items);
- ?>)")
-rk.print (cronalpha.res)
+rk.header ("Cronbach's alpha")
+rk.print("for the '<? getRK("x"); ?>' data-set<?
+ if($chk_select && $inp_items)
+ echo(" (subset: ".$inp_items.")");
+ ?>")
+rk.print(paste("Items:",cronalpha.res$p,"<br />Sample units:",cronalpha.res$n,"<br /><strong>alpha:",round(cronalpha.res$alpha, digits=2),"</strong><? if($chk_standard) echo(" (standardized)"); ?>"))
+rk.print("Effects on alpha if items are removed:")
+rk.print(descript.res$alpha)
<?
+if($chk_bsci) {?>
+rk.print("<? echo(($spin_ci * 100)."%"); ?> Confidence interval:")
+rk.print(cronalpha.res$ci)
+<?}
}
?>
\ No newline at end of file
Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.Cronbach_alpha.rkcommands.R
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.Cronbach_alpha.rkcommands.R 2009-11-27 15:32:42 UTC (rev 2714)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.Cronbach_alpha.rkcommands.R 2009-11-27 23:13:40 UTC (rev 2715)
@@ -3,9 +3,15 @@
require(ltm)
## Compute
cronalpha.res <- cronbach.alpha(subset(LSAT, select=c("Item 1", "Item 2", "Item 3", "Item 4", "Item 5")), CI=TRUE)
+descript.res <- descript(subset(LSAT, select=c("Item 1", "Item 2", "Item 3", "Item 4", "Item 5")), chi.squared=FALSE, B=1000)
## Print result
-rk.header ("Cronbach's alpha (LSAT, subset: Item 1, Item 2, Item 3, Item 4, Item 5)")
-rk.print (cronalpha.res)
+rk.header ("Cronbach's alpha")
+rk.print("for the 'LSAT' data-set (subset: Item 1, Item 2, Item 3, Item 4, Item 5)")
+rk.print(paste("Items:",cronalpha.res$p,"<br />Sample units:",cronalpha.res$n,"<br /><strong>alpha:",round(cronalpha.res$alpha, digits=2),"</strong>"))
+rk.print("Effects on alpha if items are removed:")
+rk.print(descript.res$alpha)
+rk.print("95% Confidence interval:")
+rk.print(cronalpha.res$ci)
})
.rk.rerun.plugin.link(plugin="rkward::ltm_cronbach_alpha", settings="chk_bsci.state=bsci\nchk_na.state=\nchk_select.state=select\nchk_standard.state=\ninp_items.available=LSAT[[\\\"Item 1\\\"]]\\nLSAT[[\\\"Item 2\\\"]]\\nLSAT[[\\\"Item 3\\\"]]\\nLSAT[[\\\"Item 4\\\"]]\\nLSAT[[\\\"Item 5\\\"]]\nspin_ci.real=0.95\nspin_samples.real=1000.00\nx.available=LSAT", label="Run again")
.rk.make.hr()
Modified: trunk/rkward/tests/item_response_theory/RKTestStandard.Cronbach_alpha.rkout
===================================================================
--- trunk/rkward/tests/item_response_theory/RKTestStandard.Cronbach_alpha.rkout 2009-11-27 15:32:42 UTC (rev 2714)
+++ trunk/rkward/tests/item_response_theory/RKTestStandard.Cronbach_alpha.rkout 2009-11-27 23:13:40 UTC (rev 2715)
@@ -1,3 +1,30 @@
-<h1>Cronbach's alpha (LSAT, subset: Item 1, Item 2, Item 3, Item 4, Item 5)</h1>
+<h1>Cronbach's alpha</h1>
DATE<br>
-<p class='character'><br>Cronbach's alpha for the 'subset(LSAT, select = c("Item 1", "Item 2", "Item 3", "Item 4", ' ' "Item 5"))' data-set<br><br>Items: 5<br>Sample units: 1000<br>alpha: 0.295<br><br>Bootstrap 95% CI based on 1000 samples<br> 2.5% 97.5% <br>0.219 0.365 <br><br></p>
\ No newline at end of file
+<p class='character'>for the 'LSAT' data-set (subset: Item 1, Item 2, Item 3, Item 4, Item 5)</p><p class='character'>Items: 5 <br />Sample units: 1000 <br /><strong>alpha: 0.29 </strong></p><p class='character'>Effects on alpha if items are removed:</p>
+<p align= center >
+<table cellspacing=0 border=1><caption align=bottom class=captiondataframe></caption><tr><td>
+ <table border=0 class=dataframe>
+ <tbody> <tr class= firstline > <th></th><th>value</th> </tr>
+ <tr><td class=firstcolumn>All Items</td><td class=cellinside>0.29</td></tr>
+ <tr><td class=firstcolumn>Excluding Item 1</td><td class=cellinside>0.28</td></tr>
+ <tr><td class=firstcolumn>Excluding Item 2</td><td class=cellinside>0.24</td></tr>
+ <tr><td class=firstcolumn>Excluding Item 3</td><td class=cellinside>0.22</td></tr>
+ <tr><td class=firstcolumn>Excluding Item 4</td><td class=cellinside>0.25</td></tr>
+ <tr><td class=firstcolumn>Excluding Item 5</td><td class=cellinside>0.27</td></tr>
+
+ </tbody>
+</table>
+ </td></table>
+ <br>
+<p class='character'>95% Confidence interval:</p>
+
+<p align= center >
+<table cellspacing=0 border=1><caption align=bottom class=captiondataframe></caption><tr><td>
+ <table border=0 class=dataframe>
+ <tbody> <tr class= firstline > <th></th><th>2.5%</th><th>97.5%</th> </tr>
+ <tr><td class=firstcolumn></td><td class=cellinside>0.22</td><td class=cellinside>0.36</td></tr>
+
+ </tbody>
+</table>
+ </td></table>
+ <br>
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