[rkward-cvs] SF.net SVN: rkward:[4351] branches/external_plugins/rk.FactorAnalysis

m-eik at users.sourceforge.net m-eik at users.sourceforge.net
Sun Oct 7 20:32:56 UTC 2012


Revision: 4351
          http://rkward.svn.sourceforge.net/rkward/?rev=4351&view=rev
Author:   m-eik
Date:     2012-10-07 20:32:56 +0000 (Sun, 07 Oct 2012)
Log Message:
-----------
rk.FactorAnalysis: fixing a bug, some changes to the VSS/MAP stuff

Modified Paths:
--------------
    branches/external_plugins/rk.FactorAnalysis/DESCRIPTION
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/Factoranalysis.js
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/VerySimpleStructureMinimumAveragePartial.js
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/VerySimpleStructureMinimumAveragePartial.xml
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/rk.FactorAnalysis.pluginmap
    branches/external_plugins/rk.FactorAnalysis/inst/rkward/rkwarddev_plugin_script_FA.R

Modified: branches/external_plugins/rk.FactorAnalysis/DESCRIPTION
===================================================================
--- branches/external_plugins/rk.FactorAnalysis/DESCRIPTION	2012-10-07 20:30:46 UTC (rev 4350)
+++ branches/external_plugins/rk.FactorAnalysis/DESCRIPTION	2012-10-07 20:32:56 UTC (rev 4351)
@@ -2,7 +2,7 @@
 Type: Package
 Title: RKWard GUI to conduct principal component and factor analysis
 Version: 0.01-9
-Date: 2012-10-06
+Date: 2012-10-07
 Author: Meik Michalke <meik.michalke at hhu.de>
 Maintainer: Meik Michalke <meik.michalke at hhu.de>
 Depends: rkward (>= 0.5.6)

Modified: branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/Factoranalysis.js
===================================================================
--- branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/Factoranalysis.js	2012-10-07 20:30:46 UTC (rev 4350)
+++ branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/Factoranalysis.js	2012-10-07 20:32:56 UTC (rev 4351)
@@ -39,7 +39,7 @@
 	// the R code to be evaluated
 	var obrot = new Array("promax", "oblimin", "simplimax", "bentlerQ", "geominQ", "biquartimin", "cluster");
 
-	if(obrot.indexOf(drpEFARotate) == -1) {
+	if((obrot.indexOf(drpEFARotate) == -1 && radFctrngmt != "PCA") | (obrot.indexOf(drpPCARotate) == -1 && radFctrngmt == "PCA")) {
 		isObrot = false;
 	} else {
 		isObrot = true;

Modified: branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/VerySimpleStructureMinimumAveragePartial.js
===================================================================
--- branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/VerySimpleStructureMinimumAveragePartial.js	2012-10-07 20:30:46 UTC (rev 4350)
+++ branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/VerySimpleStructureMinimumAveragePartial.js	2012-10-07 20:32:56 UTC (rev 4351)
@@ -12,8 +12,8 @@
 	// read in variables from dialog
 	var vrslData = getValue("vrsl_Data");
 	var drpVssFactmeth = getValue("drp_vss_factmeth");
+	var spnNmbrfbsr = getValue("spn_Nmbrfbsr");
 	var drpVssRotate = getValue("drp_vss_rotate");
-	var spnNmbrfbs0 = getValue("spn_Nmbrfbs0");
 	var chcFtthdgnl = getValue("chc_Ftthdgnl");
 	var inpMaintitl = getValue("inp_Maintitl");
 	var chcCnnctdff = getValue("chc_Cnnctdff");
@@ -25,8 +25,8 @@
 	if(vrslData) {
 		echo("\n\t\t\t" + vrslData);
 	}
-	if(spnNmbrfbs0 != 0) {
-		echo(",\n\t\t\tn.obs=" + spnNmbrfbs0);
+	if(spnNmbrfbsr != 0) {
+		echo(",\n\t\t\tn.obs=" + spnNmbrfbsr);
 	}
 	if(drpVssFactmeth != "minres") {
 		echo(",\n\t\t\tfm=\"" + drpVssFactmeth + "\"");
@@ -57,8 +57,8 @@
 	// read in variables from dialog
 	var vrslData = getValue("vrsl_Data");
 	var drpVssFactmeth = getValue("drp_vss_factmeth");
+	var spnNmbrfbsr = getValue("spn_Nmbrfbsr");
 	var drpVssRotate = getValue("drp_vss_rotate");
-	var spnNmbrfbs0 = getValue("spn_Nmbrfbs0");
 	var chcFtthdgnl = getValue("chc_Ftthdgnl");
 	var inpMaintitl = getValue("inp_Maintitl");
 	var chcCnnctdff = getValue("chc_Cnnctdff");

Modified: branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/VerySimpleStructureMinimumAveragePartial.xml
===================================================================
--- branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/VerySimpleStructureMinimumAveragePartial.xml	2012-10-07 20:30:46 UTC (rev 4350)
+++ branches/external_plugins/rk.FactorAnalysis/inst/rkward/plugins/VerySimpleStructureMinimumAveragePartial.xml	2012-10-07 20:32:56 UTC (rev 4351)
@@ -5,8 +5,8 @@
 	<code file="VerySimpleStructureMinimumAveragePartial.js" />
 	<help file="VerySimpleStructureMinimumAveragePartial.rkh" />
 	<logic>
-		<!-- <convert id="!edit!" sources="!edit!" mode="equals" standard="!edit!" /> -->
-		<!-- <connect governor="!edit!" client="!edit!.enabled" /> -->
+		<convert id="lgc_drpvssfc" sources="drp_vss_factmeth.string" mode="equals" standard="ml" />
+		<connect governor="lgc_drpvssfc" client="spn_Nmbrfbsr.enabled" />
 	</logic>
 	<dialog label="VSS/MAP">
 		<row id="row_vSSDDSFMUL">
@@ -14,18 +14,18 @@
 			<column id="clm_vDDSFMULSP">
 				<varslot id="vrsl_Data" label="Data" source="vrs_Slctdtfr" required="true" />
 				<dropdown id="drp_vss_factmeth" label="Factoring method">
-					<option label="Minimum residual (ULS)" value="minres" checked="true" />
-					<option label="Principal Components" value="pc" />
-					<option label="Principal axis" value="pa" />
-					<option label="Maximum likelihood" value="ml" />
+					<option label="Minimum residual factoring (ULS)" value="minres" checked="true" />
+					<option label="Principal component analysis" value="pc" />
+					<option label="Principal axis factor analysis" value="pa" />
+					<option label="Maximum likelihood factor analysis" value="ml" />
 				</dropdown>
+				<spinbox label="Number of observations" id="spn_Nmbrfbsr" initial="1000" min="0" type="integer" />
 				<dropdown id="drp_vss_rotate" label="Rotation method">
 					<option label="None" value="none" />
 					<option label="Varimax (orthogonal)" value="varimax" checked="true" />
 					<option label="Promax" value="promax" />
 					<option label="Oblimin" value="oblimin" />
 				</dropdown>
-				<spinbox label="Number of observations (0 implies raw data)" id="spn_Nmbrfbs0" min="0" type="integer" />
 				<checkbox id="chc_Ftthdgnl" label="Fit the diagonal as well" value="true" />
 				<stretch />
 				<frame label="Plot results" checkable="true" id="frm_Pltrslts">

Modified: branches/external_plugins/rk.FactorAnalysis/inst/rkward/rk.FactorAnalysis.pluginmap
===================================================================
--- branches/external_plugins/rk.FactorAnalysis/inst/rkward/rk.FactorAnalysis.pluginmap	2012-10-07 20:30:46 UTC (rev 4350)
+++ branches/external_plugins/rk.FactorAnalysis/inst/rkward/rk.FactorAnalysis.pluginmap	2012-10-07 20:32:56 UTC (rev 4351)
@@ -12,7 +12,7 @@
 		shortinfo="RKWard GUI to conduct principal component and factor analysis"
 		longinfo="RKWard GUI to conduct principal component and factor analysis (using the psych package). Also includes dialogs for scree plots, correlation plots, VSS/MAP and parallel analysis."
 		version="0.01-9"
-		releasedate="2012-10-06"
+		releasedate="2012-10-07"
 		url="http://rkward.sf.net"
 		license="GPL (>= 3)"
 	>

Modified: branches/external_plugins/rk.FactorAnalysis/inst/rkward/rkwarddev_plugin_script_FA.R
===================================================================
--- branches/external_plugins/rk.FactorAnalysis/inst/rkward/rkwarddev_plugin_script_FA.R	2012-10-07 20:30:46 UTC (rev 4350)
+++ branches/external_plugins/rk.FactorAnalysis/inst/rkward/rkwarddev_plugin_script_FA.R	2012-10-07 20:32:56 UTC (rev 4351)
@@ -206,7 +206,10 @@
 js.calc <- rk.paste.JS(
 	# create a variable for oblique transformations
 	"var obrot = new Array(\"promax\", \"oblimin\", \"simplimax\", \"bentlerQ\", \"geominQ\", \"biquartimin\", \"cluster\");\n",
-	ite(id("obrot.indexOf(",drp.rotation.EFA ,") == -1"),  "isObrot = false;", "isObrot = true;"),
+	ite(id("(obrot.indexOf(",drp.rotation.EFA ,") == -1 && ", radio.analysis,
+		" != \"PCA\") | (obrot.indexOf(", drp.rotation.PCA ,") == -1 && ", radio.analysis,
+		" == \"PCA\")"),
+	"isObrot = false;", "isObrot = true;"),
 	echo("\tFA.results <- "),
 	ite(id(radio.analysis, " == \"PCA\""),
 		echo("principal("),
@@ -491,10 +494,10 @@
 
 # minres, ml, uls, wls, gls, pa
 vss.factmeth <- rk.XML.dropdown("Factoring method", options=list(
-		"Minimum residual (ULS)"=c(val="minres", chk=TRUE),
-		"Principal Components"=c(val="pc"),
-		"Principal axis"=c(val="pa"),
-		"Maximum likelihood"=c(val="ml")
+		"Minimum residual factoring (ULS)"=c(val="minres", chk=TRUE),
+		"Principal component analysis"=c(val="pc"),
+		"Principal axis factor analysis"=c(val="pa"),
+		"Maximum likelihood factor analysis"=c(val="ml")
 	), id.name="drp_vss_factmeth")
 
 vss.drp.rotation <- rk.XML.dropdown("Rotation method", options=list(
@@ -508,7 +511,7 @@
 
 vss.main <- rk.XML.input(label="Main title", initial="Very Simple Structure")
 
-vss.spin.nobs <- rk.XML.spinbox("Number of observations (0 implies raw data)", min=0, initial=0, real=FALSE)
+vss.spin.nobs <- rk.XML.spinbox("Number of observations", min=0, initial=1000, real=FALSE)
 
 vss.cbox.diag <- rk.XML.cbox("Fit the diagonal as well")
 
@@ -528,8 +531,8 @@
 		rk.XML.col(
 			vss.var.data,
 			vss.factmeth,
+			vss.spin.nobs,
 			vss.drp.rotation,
-			vss.spin.nobs,
 			vss.cbox.diag,
 			rk.XML.stretch(),
 			vss.frame.plot,
@@ -538,6 +541,12 @@
 	)
 , label="VSS/MAP")
 
+## logic section
+	vss.lgc.sect <- rk.XML.logic(
+		vss.gov.factmeth <- rk.XML.convert(sources=list(string=vss.factmeth), mode=c(equals="ml")),
+		rk.XML.connect(governor=vss.gov.factmeth, client=vss.spin.nobs, set="enabled")
+	)
+
 ## JavaScript
 vss.js.calc <- rk.paste.JS(
 	echo("\t\tVSS.data <- VSS("),
@@ -576,6 +585,7 @@
 ## make a whole component
 vss.component <- rk.plugin.component("Very Simple Structure/Minimum Average Partial",
 	xml=list(
+		logic=vss.lgc.sect,
 		dialog=vss.full.dialog),
 	js=list(
 		require="psych",

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