[Rsiena-commits] r12 - pkg/RSiena/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Sep 13 18:33:10 CEST 2009


Author: ripleyrm
Date: 2009-09-13 18:33:09 +0200 (Sun, 13 Sep 2009)
New Revision: 12

Modified:
   pkg/RSiena/R/effects.r
   pkg/RSiena/R/effectsInfo.R
   pkg/RSiena/R/phase1.r
   pkg/RSiena/R/print07Report.r
   pkg/RSiena/R/robmon.r
   pkg/RSiena/R/siena01.r
Log:
Fixes to multiple processors, minor changes to reports. 

Modified: pkg/RSiena/R/effects.r
===================================================================
--- pkg/RSiena/R/effects.r	2009-08-14 11:54:22 UTC (rev 11)
+++ pkg/RSiena/R/effects.r	2009-09-13 16:33:09 UTC (rev 12)
@@ -293,7 +293,9 @@
         objParms <- rep(0, length(objEffects))
         if (observations==1)
         {
-            rateEffects <- paste('rate', varname)
+            rateEffects <- paste('rate ',varname,' period ',
+                                 1, sep='')
+            ##rateEffects <- paste('rate', varname)
             rateFunctions <- "Amount of behavioral change"
             rateShortNames <- 'Rate'
             ratePeriods <- 1
@@ -405,7 +407,9 @@
             ## no starting value yet for quadratic effect
         }
         if (observations == 1)
-            effectname <- paste('rate', varname)
+     #       effectname <- paste('rate', varname)
+            effectname <- paste('rate ', varname,' period ',
+                                1:noPeriods, sep='')
         else
             effectname <- paste('rate ', varname,' (period ',
                                 1:noPeriods, ')', sep='')

Modified: pkg/RSiena/R/effectsInfo.R
===================================================================
--- pkg/RSiena/R/effectsInfo.R	2009-08-14 11:54:22 UTC (rev 11)
+++ pkg/RSiena/R/effectsInfo.R	2009-09-13 16:33:09 UTC (rev 12)
@@ -92,7 +92,7 @@
 ), ShortName = c("linear", "quad", "avSim", "totSim", "indeg",
 "outdeg", "isolate", "avSimRecip", "totSimRecip", "avSimPopAlt",
 "totSimPopAlt", "avSimRecPop", "totSimRecPop", "avAlt", "avRecAlt",
-"denseTriads", "simDenseTriads", "recipDeg", "avSimPopEgo")), .Names = c("EffectName",
+"behDenseTriads", "simDenseTriads", "recipDeg", "avSimPopEgo")), .Names = c("EffectName",
 "Function.Name", "Endowment.", "ShortName"), class = "data.frame", row.names = c(NA,
 -19L))
 behaviorRateEffects <-

Modified: pkg/RSiena/R/phase1.r
===================================================================
--- pkg/RSiena/R/phase1.r	2009-08-14 11:54:22 UTC (rev 11)
+++ pkg/RSiena/R/phase1.r	2009-09-13 16:33:09 UTC (rev 12)
@@ -198,7 +198,7 @@
     if (z$FinDiff.method)
     {
         z <- FiniteDifferences(z, x, fra + z$targets, z$cl, z$int, ...)
-        z$sdf[z$nit, , ] <- z$sdf0
+        z$sdf[z$nit:(z$nit + (z$int - 1)), , ] <- z$sdf0
     }
     else if (x$maxlike)
     {

Modified: pkg/RSiena/R/print07Report.r
===================================================================
--- pkg/RSiena/R/print07Report.r	2009-08-14 11:54:22 UTC (rev 11)
+++ pkg/RSiena/R/print07Report.r	2009-09-13 16:33:09 UTC (rev 12)
@@ -101,9 +101,10 @@
                z$effects$effectName[z$effects$netType=='behavior'] <-
                    behEffects$effectName
            }
-           tmp <- paste(sprintf("%2d",1:length(z$effects$effectName)),
+           typesp <- ifelse (z$effects$type== "endow", ": ", ":  ")
+           tmp <- paste(sprintf("%2d", 1:length(z$effects$effectName)),
                         '. ',format(paste(z$effects$type,
-                        ':  ', z$effects$effectName, sep = ''), width=50),
+                        typesp, z$effects$effectName, sep = ''), width=50),
                          theta, ses, '\n', sep='', collapse = '')
            if (nBehavs > 0 && nOneModes > 0)
            {

Modified: pkg/RSiena/R/robmon.r
===================================================================
--- pkg/RSiena/R/robmon.r	2009-08-14 11:54:22 UTC (rev 11)
+++ pkg/RSiena/R/robmon.r	2009-09-13 16:33:09 UTC (rev 12)
@@ -39,7 +39,7 @@
             stop("Multiple processors only for simstats0c at present")
         }
         cl <- makeCluster(clusterString, type = "SOCK",
-                          outfile = 'cluster.out', homogeneous=FALSE)
+                          outfile = 'cluster.out')
         clusterSetupRNG(cl, seed = rep(1, 6))
         clusterCall(cl, library, "RSiena", character.only = TRUE)
         clusterCall(cl, storeinFRANstore,  FRANstore())

Modified: pkg/RSiena/R/siena01.r
===================================================================
--- pkg/RSiena/R/siena01.r	2009-08-14 11:54:22 UTC (rev 11)
+++ pkg/RSiena/R/siena01.r	2009-09-13 16:33:09 UTC (rev 12)
@@ -498,7 +498,7 @@
             {
                 resp <- try(siena07(mymodel, data=mydata, effects=myeff,
                                     useCluster=TRUE, initC=TRUE,
-                                    nbrNodes=mymodel$nbrnodes),
+                                    nbrNodes=mymodel$nbrNodes),
                             silent=TRUE)
             }
             else



More information about the Rsiena-commits mailing list