[rkward-cvs] SF.net SVN: rkward: [1945] trunk/rkward/rkward/plugins/analysis/regression

sjar at users.sourceforge.net sjar at users.sourceforge.net
Sun Aug 5 23:14:53 UTC 2007


Revision: 1945
          http://rkward.svn.sourceforge.net/rkward/?rev=1945&view=rev
Author:   sjar
Date:     2007-08-05 16:14:52 -0700 (Sun, 05 Aug 2007)

Log Message:
-----------
added working but very simple linear regression plug-in (rather proof-of-concept!)

Added Paths:
-----------
    trunk/rkward/rkward/plugins/analysis/regression/linear_regression.php
    trunk/rkward/rkward/plugins/analysis/regression/linear_regression.rkh
    trunk/rkward/rkward/plugins/analysis/regression/linear_regression.xml

Added: trunk/rkward/rkward/plugins/analysis/regression/linear_regression.php
===================================================================
--- trunk/rkward/rkward/plugins/analysis/regression/linear_regression.php	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/regression/linear_regression.php	2007-08-05 23:14:52 UTC (rev 1945)
@@ -0,0 +1,17 @@
+<?
+function preprocess () {
+        }
+
+function calculate () {
+?>
+results <- summary (lm (<? getRK ("y"); ?> ~ <? getRK ("x"); ?>))
+<?
+}
+
+function printout () {
+?>
+rk.header ("Linear Regression")
+rk.print (results)
+<?
+}
+?>
\ No newline at end of file

Added: trunk/rkward/rkward/plugins/analysis/regression/linear_regression.rkh
===================================================================
--- trunk/rkward/rkward/plugins/analysis/regression/linear_regression.rkh	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/regression/linear_regression.rkh	2007-08-05 23:14:52 UTC (rev 1945)
@@ -0,0 +1,23 @@
+<!DOCTYPE rkhelp>
+<document>
+	<summary>
+		This test performs the Ansari-Bradley two-sample test to test for a difference in scale parameters.
+	</summary>
+
+	<usage>
+		Select two data sets for the Ansari-Bradley two-sample test. For this test the samples need to be numeric vectors (see below for details).
+	</usage>
+
+	<settings>
+		<caption id="tab_variables"/>
+		<setting id="x">Select the data to be computed. The vectors need to be numeric.</setting>
+		<setting id="y">Select the data to be computed. The vectors need to be numeric.</setting>
+		<caption id="tab_options"/>
+	</settings>
+	<related>
+		<ul>
+			<li><link href="rkward://rhelp/lm"/></li>
+		</ul>
+
+	</related>
+</document>

Added: trunk/rkward/rkward/plugins/analysis/regression/linear_regression.xml
===================================================================
--- trunk/rkward/rkward/plugins/analysis/regression/linear_regression.xml	                        (rev 0)
+++ trunk/rkward/rkward/plugins/analysis/regression/linear_regression.xml	2007-08-05 23:14:52 UTC (rev 1945)
@@ -0,0 +1,23 @@
+<!DOCTYPE rkplugin>
+<document>
+	<code file="linear_regression.php"/>
+	<help file="linear_regression.rkh"/>
+
+	<dialog label="Fitting Linear Models">
+		<tabbook>
+			<tab label="Basic settings" id="tab_variables">
+				<row>
+					<varselector id="vars"/>
+					<column>
+						<varslot type="numeric" id="y" source="vars" required="true" label="dependent variable"/>
+						<varslot type="numeric" id="x" source="vars" required="true" label="independent variable"/>
+						<stretch/>
+					</column>
+				</row>
+			</tab>
+			<tab label="Options" id="tab_options">
+			</tab>
+		</tabbook>
+	</dialog>
+	
+</document>


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list