[Rsiena-commits] r279 - in pkg: RSiena RSiena/R RSiena/data RSiena/inst/doc RSiena/inst/scripts RSiena/man RSiena/src/model/effects RSiena/src/model/effects/generic RSiena/src/model/ml RSiena/tests RSienaTest RSienaTest/R RSienaTest/data RSienaTest/doc RSienaTest/inst/doc RSienaTest/inst/scripts RSienaTest/man RSienaTest/src/model/effects RSienaTest/src/model/effects/generic RSienaTest/src/model/ml RSienaTest/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 13 23:29:48 CET 2014


Author: tomsnijders
Date: 2014-11-13 23:29:47 +0100 (Thu, 13 Nov 2014)
New Revision: 279

Added:
   pkg/RSiena/man/sienaRIDynamics.Rd
   pkg/RSiena/src/model/effects/AltersDist2CovariateAverageEffect.cpp
   pkg/RSiena/src/model/effects/AltersDist2CovariateAverageEffect.h
   pkg/RSiena/src/model/effects/AltersInDist2CovariateAverageEffect.cpp
   pkg/RSiena/src/model/effects/AltersInDist2CovariateAverageEffect.h
   pkg/RSiena/src/model/effects/AverageAlterDist2Effect.cpp
   pkg/RSiena/src/model/effects/AverageAlterDist2Effect.h
   pkg/RSiena/src/model/effects/AverageAlterInDist2Effect.cpp
   pkg/RSiena/src/model/effects/AverageAlterInDist2Effect.h
   pkg/RSiena/src/model/effects/AverageInAlterEffect.cpp
   pkg/RSiena/src/model/effects/AverageInAlterEffect.h
   pkg/RSiena/src/model/effects/InAltersCovariateAverageEffect.cpp
   pkg/RSiena/src/model/effects/InAltersCovariateAverageEffect.h
   pkg/RSiena/src/model/effects/TransitiveReciprocatedTriplets2Effect.cpp
   pkg/RSiena/src/model/effects/TransitiveReciprocatedTriplets2Effect.h
   pkg/RSiena/src/model/effects/generic/SameCovariateInTiesFunction.cpp
   pkg/RSiena/src/model/effects/generic/SameCovariateInTiesFunction.h
   pkg/RSienaTest/doc/Siena_algorithms.tex
   pkg/RSienaTest/man/sienaRIDynamics.Rd
   pkg/RSienaTest/src/model/effects/AltersDist2CovariateAverageEffect.cpp
   pkg/RSienaTest/src/model/effects/AltersDist2CovariateAverageEffect.h
   pkg/RSienaTest/src/model/effects/AltersInDist2CovariateAverageEffect.cpp
   pkg/RSienaTest/src/model/effects/AltersInDist2CovariateAverageEffect.h
   pkg/RSienaTest/src/model/effects/AverageAlterDist2Effect.cpp
   pkg/RSienaTest/src/model/effects/AverageAlterDist2Effect.h
   pkg/RSienaTest/src/model/effects/AverageAlterInDist2Effect.cpp
   pkg/RSienaTest/src/model/effects/AverageAlterInDist2Effect.h
   pkg/RSienaTest/src/model/effects/AverageInAlterEffect.cpp
   pkg/RSienaTest/src/model/effects/AverageInAlterEffect.h
   pkg/RSienaTest/src/model/effects/InAltersCovariateAverageEffect.cpp
   pkg/RSienaTest/src/model/effects/InAltersCovariateAverageEffect.h
   pkg/RSienaTest/src/model/effects/TransitiveReciprocatedTriplets2Effect.cpp
   pkg/RSienaTest/src/model/effects/TransitiveReciprocatedTriplets2Effect.h
   pkg/RSienaTest/src/model/effects/generic/SameCovariateInTiesFunction.cpp
   pkg/RSienaTest/src/model/effects/generic/SameCovariateInTiesFunction.h
Removed:
   pkg/RSiena/inst/doc/effects.pdf
   pkg/RSienaTest/doc/Siena_algorithms4.tex
   pkg/RSienaTest/inst/doc/effects.pdf
Modified:
   pkg/RSiena/ChangeLog
   pkg/RSiena/DESCRIPTION
   pkg/RSiena/NAMESPACE
   pkg/RSiena/R/Sienatest.r
   pkg/RSiena/R/effects.r
   pkg/RSiena/R/effectsDocumentation.r
   pkg/RSiena/R/initializeFRAN.r
   pkg/RSiena/R/phase2.r
   pkg/RSiena/R/phase3.r
   pkg/RSiena/R/print01Report.r
   pkg/RSiena/R/print07Report.r
   pkg/RSiena/R/robmon.r
   pkg/RSiena/R/sienaDataCreateFromSession.r
   pkg/RSiena/R/sienaGOF.r
   pkg/RSiena/R/sienaRI.r
   pkg/RSiena/R/sienaRIDynamics.r
   pkg/RSiena/R/sienaTimeTest.r
   pkg/RSiena/R/sienaeffects.r
   pkg/RSiena/R/sienaprint.r
   pkg/RSiena/data/allEffects.csv
   pkg/RSiena/inst/doc/RSiena.bib
   pkg/RSiena/inst/doc/RSiena_Manual.pdf
   pkg/RSiena/inst/doc/RSiena_Manual.tex
   pkg/RSiena/inst/scripts/Rscript02SienaVariableFormat.R
   pkg/RSiena/inst/scripts/Rscript03SienaRunModel.R
   pkg/RSiena/inst/scripts/Rscript04SienaBehaviour.R
   pkg/RSiena/man/RSiena-package.Rd
   pkg/RSiena/man/print01Report.Rd
   pkg/RSiena/man/sienaGOF-auxiliary.Rd
   pkg/RSiena/man/sienaGOF.Rd
   pkg/RSiena/man/sienaRI.Rd
   pkg/RSiena/man/sienaTimeTest.Rd
   pkg/RSiena/src/model/effects/AllEffects.h
   pkg/RSiena/src/model/effects/AltersCovariateAverageEffect.cpp
   pkg/RSiena/src/model/effects/AltersCovariateAverageEffect.h
   pkg/RSiena/src/model/effects/AverageAlterEffect.cpp
   pkg/RSiena/src/model/effects/AverageAlterEffect.h
   pkg/RSiena/src/model/effects/AverageReciprocatedAlterEffect.cpp
   pkg/RSiena/src/model/effects/AverageReciprocatedAlterEffect.h
   pkg/RSiena/src/model/effects/EffectFactory.cpp
   pkg/RSiena/src/model/effects/InteractionCovariateEffect.cpp
   pkg/RSiena/src/model/effects/NetworkDependentBehaviorEffect.cpp
   pkg/RSiena/src/model/effects/NetworkDependentBehaviorEffect.h
   pkg/RSiena/src/model/effects/XWXClosureEffect.cpp
   pkg/RSiena/src/model/effects/XWXClosureEffect.h
   pkg/RSiena/src/model/effects/generic/CovariateDistance2AlterNetworkFunction.cpp
   pkg/RSiena/src/model/effects/generic/CovariateDistance2AlterNetworkFunction.h
   pkg/RSiena/src/model/ml/MLSimulation.cpp
   pkg/RSiena/tests/parallel.Rout.save
   pkg/RSienaTest/ChangeLog
   pkg/RSienaTest/DESCRIPTION
   pkg/RSienaTest/NAMESPACE
   pkg/RSienaTest/R/Sienatest.r
   pkg/RSienaTest/R/bayesTest.r
   pkg/RSienaTest/R/effects.r
   pkg/RSienaTest/R/effectsDocumentation.r
   pkg/RSienaTest/R/initializeFRAN.r
   pkg/RSienaTest/R/phase2.r
   pkg/RSienaTest/R/phase3.r
   pkg/RSienaTest/R/print01Report.r
   pkg/RSienaTest/R/print07Report.r
   pkg/RSienaTest/R/robmon.r
   pkg/RSienaTest/R/siena07.r
   pkg/RSienaTest/R/sienaBayes.r
   pkg/RSienaTest/R/sienaDataCreateFromSession.r
   pkg/RSienaTest/R/sienaGOF.r
   pkg/RSienaTest/R/sienaRI.r
   pkg/RSienaTest/R/sienaRIDynamics.r
   pkg/RSienaTest/R/sienaTimeTest.r
   pkg/RSienaTest/R/sienaeffects.r
   pkg/RSienaTest/R/sienaprint.r
   pkg/RSienaTest/data/allEffects.csv
   pkg/RSienaTest/doc/HowToCommit.pdf
   pkg/RSienaTest/doc/HowToCommit.tex
   pkg/RSienaTest/doc/RSIENAspec.tex
   pkg/RSienaTest/doc/RSienaDeveloper.tex
   pkg/RSienaTest/doc/missingsEtc.tex
   pkg/RSienaTest/inst/doc/RSiena.bib
   pkg/RSienaTest/inst/doc/RSiena_Manual.pdf
   pkg/RSienaTest/inst/doc/RSiena_Manual.tex
   pkg/RSienaTest/inst/scripts/Rscript02SienaVariableFormat.R
   pkg/RSienaTest/inst/scripts/Rscript03SienaRunModel.R
   pkg/RSienaTest/inst/scripts/Rscript04SienaBehaviour.R
   pkg/RSienaTest/man/RSiena-package.Rd
   pkg/RSienaTest/man/bayesTest.Rd
   pkg/RSienaTest/man/print01Report.Rd
   pkg/RSienaTest/man/sienaBayes.Rd
   pkg/RSienaTest/man/sienaGOF-auxiliary.Rd
   pkg/RSienaTest/man/sienaGOF.Rd
   pkg/RSienaTest/man/sienaRI.Rd
   pkg/RSienaTest/man/sienaTimeTest.Rd
   pkg/RSienaTest/src/model/effects/AllEffects.h
   pkg/RSienaTest/src/model/effects/AltersCovariateAverageEffect.cpp
   pkg/RSienaTest/src/model/effects/AltersCovariateAverageEffect.h
   pkg/RSienaTest/src/model/effects/AverageAlterEffect.cpp
   pkg/RSienaTest/src/model/effects/AverageAlterEffect.h
   pkg/RSienaTest/src/model/effects/AverageReciprocatedAlterEffect.cpp
   pkg/RSienaTest/src/model/effects/AverageReciprocatedAlterEffect.h
   pkg/RSienaTest/src/model/effects/EffectFactory.cpp
   pkg/RSienaTest/src/model/effects/InteractionCovariateEffect.cpp
   pkg/RSienaTest/src/model/effects/NetworkDependentBehaviorEffect.cpp
   pkg/RSienaTest/src/model/effects/NetworkDependentBehaviorEffect.h
   pkg/RSienaTest/src/model/effects/XWXClosureEffect.cpp
   pkg/RSienaTest/src/model/effects/XWXClosureEffect.h
   pkg/RSienaTest/src/model/effects/generic/CovariateDistance2AlterNetworkFunction.cpp
   pkg/RSienaTest/src/model/effects/generic/CovariateDistance2AlterNetworkFunction.h
   pkg/RSienaTest/src/model/ml/MLSimulation.cpp
   pkg/RSienaTest/tests/effectsTest.R
   pkg/RSienaTest/tests/parallel.Rout.save
   pkg/RSienaTest/tests/sampson.r
Log:


Modified: pkg/RSiena/ChangeLog
===================================================================
--- pkg/RSiena/ChangeLog	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/ChangeLog	2014-11-13 22:29:47 UTC (rev 279)
@@ -1,3 +1,65 @@
+2014-11-13 R-Forge Revision 279
+Changes in RSiena and RSienaTest:
+   * Effect AltsAvAlt renamed to avXAlt (with error message).
+   * effects object no longer used as argument for print01Report
+     (with error message).
+   * New effects sameXInPop, transRecTrip2, 
+     totAlt, avInAlt, totInAlt, totRecAlt,	 
+	 totXAlt, avXInAlt, totXInAlt, 
+	 avAltDist2, totAltDist2, avTAltDist, totAAltDist2, 
+	 avXAltDist, totXAltDist2, avTXAltDist, totAXAltDist2,
+	 avInAltDist2, totInAltDist2, avTInAltDist, totAInAltDist2, 
+	 avXInAltDist2, totXInAltDist2, avTXInAltDist, totAXInAltDist2,
+	 XWX1, XWX2, cl.XWX1, cl.XWX2.
+   * gwesp.. effects get endowment=TRUE in allEffects.csv, and thereby
+     obtain endowment and creation effects.
+   * In effect group behaviorBipartiteObjective, the following meaningless
+     effects were dropped: avAlt, avSim, totSim, avSimPopEgo, avSimPopAlt,
+	 behDenseTriads, simDenseTriads.
+   * Effect class covarBehaviorBipartiteObjective split into
+     covarABehaviorBipartiteObjective (for covariates on first mode)
+	 and covarBBehaviorBipartiteObjective (for covariates on second mode)
+	 (allEffects.csv, effects.r).
+   * Added effect class covarABehaviorBipartiteObjective  
+     and covarBBehaviorBipartiteObjective to effectsDocumentation.R.
+   * Undid duplication of covarNetNetObjective.
+   * For non-invertible covariance matrices, give diagnostic for the
+     linear combination that gives trouble at the end of the
+     algorithm (phase3.r).
+   * Correction of igraphNetworkExtraction() in sienaGOF-auxiliary.Rd
+     (the earlier version dropped isolated nodes from simulated networks).
+   * In sienaGOF-auxiliary.Rd, the example of constraint is replaced
+     by the example of eigenvector centrality (because constraint 
+	 is undefined for isolated nodes, leading to computational problems).
+   * sienaRIDynamics restored, after corrections.
+   * "file" parameter of sienaRI dropped (implied platform dependence).
+   * Parameter showAll added to descriptives.sienaGOF.
+   * Small correction of print.siena (reporting uponly/downonly).
+   * Some changes in print.sienaAlgorithm.
+   * Check in siena07 for incorrect MaxDegree specification.
+   * Correction of printing errors arising when result of score-type test is NA.
+   * maxRatio checked for NA or NaN in phase2.r.
+   * Section in manual about user-defined interaction effects updated.
+   * Siena_algorithms4.tex renamed Siena_algorithms.tex.
+   * Set diagonal of observed networks to 0 in sparseMatrixExtraction
+     (sienaGOF.r).
+   * Some improvement of error messages for sienaTimeTest.
+   * p-value for goodness of fit rounded to 3 decimal places (sienaGOF.r)
+   * Longer string length for output of z$requestedEffects$effectName
+     in print to output file (print07Report.r).
+   * File effects.pdf dropped from \inst\doc (it can be created
+     by effectsDocumentation() so the separate file is superfluous).
+   * AverageAlterEffect.cpp simplified.
+Changes in RSienaTest:
+   * sienaBayes(): new parameters nImproveMH and priorRatesFromData;
+      truncate initial rate parameters depending on prior. Small change
+	  in example in help page.
+   * glueBayes() corrected so that it can be applied sequentially.
+   * Small improvement in print.summary.sienaBayesFit().
+   * multipleBayesTest now allows matrix parameter to test 
+     linear combinations.
+   * Improved plot.multipleBayesTest (show truncation at 0).
+
 2014-07-24 R-Forge Revision 278
 Changes in RSiena and RSienaTest:
    * Added s50s to RSiena.rda.

Modified: pkg/RSiena/DESCRIPTION
===================================================================
--- pkg/RSiena/DESCRIPTION	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/DESCRIPTION	2014-11-13 22:29:47 UTC (rev 279)
@@ -1,8 +1,8 @@
 Package: RSiena
 Type: Package
 Title: Siena - Simulation Investigation for Empirical Network Analysis
-Version: 1.1-278
-Date: 2014-07-27
+Version: 1.1-279
+Date: 2014-11-13
 Author: Ruth Ripley, Krists Boitmanis, Tom A.B. Snijders
 Depends: R (>= 2.15.0)
 Imports: Matrix

Modified: pkg/RSiena/NAMESPACE
===================================================================
--- pkg/RSiena/NAMESPACE	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/NAMESPACE	2014-11-13 22:29:47 UTC (rev 279)
@@ -7,8 +7,8 @@
        varCovar, varDyadCovar, setEffect, includeEffects, includeInteraction,
        effectsDocumentation, sienaDataConstraint, print.xtable.sienaFit,
        installGui, siena08, iwlsm, sienaTimeTest, includeTimeDummy,
-       sienaGOF, descriptives.sienaGOF, sienaRI, sparseMatrixExtraction,
-       networkExtraction, behaviorExtraction,
+       sienaGOF, descriptives.sienaGOF, sienaRI, sienaRIDynamics, 
+	   sparseMatrixExtraction, networkExtraction, behaviorExtraction,
        OutdegreeDistribution, IndegreeDistribution, BehaviorDistribution,
        siena.table, xtable,
        Wald.RSiena, Multipar.RSiena)
@@ -52,4 +52,7 @@
 S3method(summary, sienaRI)
 S3method(print, sienaRI)
 S3method(plot, sienaRI)
+S3method(summary, sienaRIDynamics)
+S3method(print, sienaRIDynamics)
+S3method(plot, sienaRIDynamics)
 S3method(print, chains.data.frame)

Modified: pkg/RSiena/R/Sienatest.r
===================================================================
--- pkg/RSiena/R/Sienatest.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/Sienatest.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -111,10 +111,21 @@
         Report(c('   c = ',sprintf("%8.4f", z$testresOverall),
                  '   d.f. = ',j,'   p-value '),sep='',outf)
         pvalue <- 1-pchisq(z$testresOverall,j)
+		if (!is.na(pvalue))
+		{
         if (pvalue < 0.0001)
+			{
             Report('< 0.0001',outf)
+			}
         else
+			{
             Report(c('= ',sprintf("%8.4f",pvalue)), sep = '', outf)
+			}
+		}
+		else
+		{
+				Report('  NA  ',outf)		
+		}
         if (testn==1)
             Report(c('\n   one-sided (normal variate): ',
                      sprintf("%8.4f",z$testresulto[1])), sep = '', outf)
@@ -129,6 +140,8 @@
                 Report(c('  c = ', sprintf("%8.4f", z$testresult[k]),
                          '   d.f. = 1  p-value '), sep = '', outf)
                 pvalue<- 1-pchisq(z$testresult[k],1)
+				if (!is.na(pvalue))
+				{
                 if (pvalue < 0.0001)
                 {
                     Report('< 0.0001\n',outf)
@@ -138,6 +151,11 @@
                     Report(c('= ', sprintf("%8.4f", pvalue), '\n'), sep = '',
                            outf)
                 }
+				}
+				else
+				{
+					Report('  NA  ',outf)		
+				}
                 Report(c(' - one-sided (normal variate): ',
                          sprintf("%8.4f", z$testresulto[k])), sep = '', outf)
                 if (k < j)

Modified: pkg/RSiena/R/effects.r
===================================================================
--- pkg/RSiena/R/effects.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/effects.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -509,6 +509,13 @@
                 objEffects<- rbind(objEffects, tmp$objEff)
                 rateEffects<- rbind(rateEffects, tmp$rateEff)
 			}
+			else
+            {
+				nodeSet2 <- attr(xx$cCovars[[j]], 'nodeSet')
+                tmp <- covBBehEff(varname, names(xx$cCovars)[j], nodeSet2,
+									name=varname)
+                objEffects<- rbind(objEffects, tmp$objEff)
+			}
         }
         for (j in seq(along=xx$depvars))
         {
@@ -530,6 +537,13 @@
                 objEffects<- rbind(objEffects, tmp$objEff)
                 rateEffects<- rbind(rateEffects, tmp$rateEff)
             }
+			else
+            {
+				nodeSet2 <- attr(xx$vCovars[[j]], 'nodeSet')
+                tmp <- covBBehEff(varname, names(xx$vCovars)[j], nodeSet2,
+									name=varname)
+                objEffects<- rbind(objEffects, tmp$objEff)
+            }
         }
         interaction <- createEffects("unspecifiedBehaviorInteraction",
                                      varname, name=varname,
@@ -899,20 +913,41 @@
 					}
                 }
                 if ((types[j] == "bipartite" &&
-                     attr(xx$depvars[[j]], 'nodeSet')[2] == nodeSet))
+                     attr(xx$depvars[[j]], 'nodeSet')[1] == nodeSet))
                 {
                     newEffects <-
-                        createEffects("covarBehaviorBipartiteObjective", varname,
+                        createEffects("covarABehaviorBipartiteObjective", varname,
                                       covarname, names(xx$depvars)[j],
                                       groupName=groupName, group=group,
                                       netType=netType, name=name)
                     covObjEffects <- rbind(covObjEffects, newEffects)
                 }
+#browser()
             }
         }
 
         list(objEff=covObjEffects, rateEff=covRateEffects)
     }
+    ##@covBBehEff internal getEffects
+    covBBehEff<- function(varname, covarname, nodeSetB, name)
+    {
+        covObjEffects <-  NULL
+            for (j in seq(along=xx$depvars))
+            {
+                if ((types[j] == "bipartite" &&
+                     attr(xx$depvars[[j]], 'nodeSet')[2] == nodeSetB))
+                {
+                    newEffects <-
+                        createEffects("covarBBehaviorBipartiteObjective", varname,
+                                      covarname, names(xx$depvars)[j],
+                                      groupName=groupName, group=group,
+                                      netType=netType, name=name)
+                    covObjEffects <- rbind(covObjEffects, newEffects)
+                }
+#browser()
+            }
+        list(objEff=covObjEffects)
+    }
     ##@covarNetNetEff internal getEffects
     covarNetNetEff<- function(othernetname,
                               covarname, poszvar, name)

Modified: pkg/RSiena/R/effectsDocumentation.r
===================================================================
--- pkg/RSiena/R/effectsDocumentation.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/effectsDocumentation.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -83,7 +83,6 @@
                  "bipartiteNonSymmetricObjective",
                  "bipartiteSymmetricObjective",
                  "bipartiteBipartiteObjective",
-                 "covarNetNetObjective",
 
                  "behaviorObjective",
                  "behaviorOneModeObjective",
@@ -91,6 +90,8 @@
                  "behaviorBipartiteObjective",
                  "covarBehaviorObjective",
 				 "covarBehaviorNetObjective",
+				 "covarABehaviorBipartiteObjective",
+				 "covarBBehaviorBipartiteObjective",
                  "unspecifiedBehaviorInteraction")
 
     mytab <- table(allEffects[,1])

Modified: pkg/RSiena/R/initializeFRAN.r
===================================================================
--- pkg/RSiena/R/initializeFRAN.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/initializeFRAN.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -72,6 +72,12 @@
             }
             effects$initialValue <- defaultEffects$initialValue
         }
+		if (!all(names(x$MaxDegree) %in% names(data$depvars)))
+		{
+			cat(' MaxDegree in the algorithm should be a named vector\n')
+			cat(' with only names of dependent variables in the data set.\n')
+			stop('Invalid algorithm-data combination.')
+		}		
         ## get data object into group format to save coping with two
         ## different formats
         if (inherits(data, "sienaGroup"))

Modified: pkg/RSiena/R/phase2.r
===================================================================
--- pkg/RSiena/R/phase2.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/phase2.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -153,10 +153,11 @@
 		cat('Regression\n')
 		##  use regression
 		cat(z$thav / z$thavn, '; ') #(z$nit + 1)
-		mylm <- lm(z$sf[1:z$nit, ] ~ z$thetaStore[1:z$nit, ])
-		coefs <- coef(mylm)[-1, ]
-		newvals <- solve(t(coefs), - mylm$coef[1, ])
-		z$theta <- newvals
+		stop('Regression not implemented; revive z$thetaStore if you wish')
+#		mylm <- lm(z$sf[1:z$nit, ] ~ z$thetaStore[1:z$nit, ])
+#		coefs <- coef(mylm)[-1, ]
+#		newvals <- solve(t(coefs), - mylm$coef[1, ])
+#		z$theta <- newvals
 		cat(z$theta, '\n')
 	}
     DisplayThetaAutocor(z)
@@ -334,7 +335,11 @@
 # Except now the threshold is 5 instead of 10.
 # For the case !x$diagg it might be better
 # to base truncation on some multivariate norm of z$dfra.
-        maxRatio <- max(ifelse(z$fixed, 1.0, abs(fra)/ z$sd))
+        maxRatio <- max(ifelse(z$fixed, 1.0, abs(fra)/ z$sd), na.rm=TRUE)
+		if ((is.na(maxRatio)) || (is.nan(maxRatio)))
+		{
+			maxRatio <- 1.0
+		}
         if (x$diagg)
 		{
             changestep <- fra / diag(z$dfra)

Modified: pkg/RSiena/R/phase3.r
===================================================================
--- pkg/RSiena/R/phase3.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/phase3.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -279,6 +279,25 @@
 		if (inherits(try(msfinv <- solve(z$msfc), silent=TRUE), "try-error"))
 		{
 			Report('*** Warning: Covariance matrix not positive definite *** \n', outf)
+			Report('***            Standard errors not reliable           *** \n', outf)
+			ei <- eigen(z$msfc)
+			maxei <- max(abs(ei[[2]][,z$pp]))
+			# last eigenvector corresponds to smallest eigenvalue
+			smallei <- ei[[2]][,z$pp]/maxei
+			Report(
+			 'The approximate linear combination that has variance 0 is\n', outf)
+			thetext <- paste(round(smallei,2)[which(abs(smallei) > 0.1)],
+							' * beta[',
+							(1:z$pp)[which(abs(smallei) > 0.1)], ']',
+							sep="", collapse=" + ")
+			Report(thetext, outf)
+			Report('\n',outf)
+			cat('*** Warning: Covariance matrix not positive definite *** \n')
+			cat('*** Standard errors not reliable ***')
+			cat('The following is approximately a linear combination \n')
+			cat('For which the data carries no information:\n',
+			     thetext,'\n')
+			cat('It is advisable to drop one or more of these effects.\n')
 			if (any(z$fixed || any(z$newfixed)))
 			{
 				Report(c('(This may be unimportant, and related to the fact\n',

Modified: pkg/RSiena/R/print01Report.r
===================================================================
--- pkg/RSiena/R/print01Report.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/print01Report.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -8,7 +8,7 @@
 # * Description: This module contains the function to print the initial report
 # *****************************************************************************/
 ##@print01Report Reporting
-print01Report <- function(data, myeff, modelname="Siena", session=NULL,
+print01Report <- function(data, modelname="Siena", session=NULL,
 						  getDocumentation=FALSE)
 {
 	##@reportDataObject1 internal print01Report
@@ -944,6 +944,17 @@
 		tt <- getInternals()
 		return(tt)
 	}
+	if (!(inherits(data, "siena")))
+	{
+		stop("The first argument needs to be a siena data object.")
+	}
+	if ((!(inherits(modelname, "character")))|
+			(inherits(session,"sienaEffects")))
+	{
+		cat("Since version 1.1-279, an effects object should not be given\n")
+		cat(" in the call of print01Report. Consult the help file.\n")
+		stop("print01Report needs no effects object.")
+	}
 	Report(openfiles=TRUE, type="w", projname=modelname)
 	Report("							************************\n", outf)
 	Report(c("									 ", modelname, ".out\n"),
@@ -1497,7 +1508,8 @@
 			  })
 		}
 	}
-	printInitialDescription(data, myeff, modelname)
+	myeff <- getEffects(data)
+	printInitialDescription(data, myeff, modelName=modelname)
 	##close the files
 	Report(closefiles=TRUE)
 }

Modified: pkg/RSiena/R/print07Report.r
===================================================================
--- pkg/RSiena/R/print07Report.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/print07Report.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -142,7 +142,7 @@
 			ses <- rep('  ', z$pp)
 		}
 		tmp <- paste(sprintf("%2d", 1:length(z$requestedEffects$effectName)),
-					'. ', format(substr(tmp, 1, 50), width=50),
+					'. ', format(substr(tmp, 1, 60), width=60),
 					theta, ses, '\n', sep='', collapse = '')
 		if (nBehavs > 0 && nNetworks > 0)
 		{

Modified: pkg/RSiena/R/robmon.r
===================================================================
--- pkg/RSiena/R/robmon.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/robmon.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -8,7 +8,7 @@
 # * Description: This module contains the function robmon which controls
 # * the phases of the robbins-monro stochastic approximation algorithm.
 # *****************************************************************************/
-##args:x: model object - intended to be read only
+##args:x: model/algorithm object - intended to be read only
 ##     z: model fitting object
 ## returns updated z
 ##@robmon siena07 Controls MOM process

Modified: pkg/RSiena/R/sienaDataCreateFromSession.r
===================================================================
--- pkg/RSiena/R/sienaDataCreateFromSession.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/sienaDataCreateFromSession.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -719,6 +719,6 @@
         mydata <- get(gps)
     }
     myeff <- getEffects(mydata)
-    print01Report(mydata, myeff, modelName, session)
+    print01Report(mydata, modelName, session)
     return(list(OK=TRUE, mydata=mydata, myeff=myeff))
 }

Modified: pkg/RSiena/R/sienaGOF.r
===================================================================
--- pkg/RSiena/R/sienaGOF.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/sienaGOF.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -339,54 +339,49 @@
 							maxlike=sienaFitObject$maxlike)$oneStep )
 			mmPartialThetaDelta <- rep(0,length(theta0))
 			mmPartialThetaDelta[length(theta0)] <- mmThetaDelta[length(theta0)]
+
+      # \mu'_\theta(X)
 			JacobianExpStat <- lapply(period, function (i) {
 				t(SF[,i,]) %*% simStatsByPeriod[[i]]/ nSims	 })
+
+      # List structure: Period, effect index
+      thetaIndices <- 1:sum(effectsToInclude)
+      # \Gamma_i(\theta)
+      ExpStatCovar <- lapply(period, function (i) {
+            lapply(thetaIndices, function(j){
+              Reduce("+", lapply(1:nSims,function(k){
+                simStatsByPeriod[[i]][k,] %*% t(simStatsByPeriod[[i]][k,]) * SF[k,i,j]
+              })) / nSims
+              - JacobianExpStat[[i]][j,] %*% t(ExpStat[[i]]) - ExpStat[[i]] %*% t(JacobianExpStat[[i]][j,])
+            })
+        })
+
+      # \Xi_i(\theta)
+      JacobianCovar <- lapply(period, function (i) {
+        lapply(thetaIndices, function(j){
+          -1 * covInvByPeriod[[i]] %*% ExpStatCovar[[i]][[j]]  %*% covInvByPeriod[[i]] })
+        })
+
 			Gradient <- lapply(period, function(i) {
+          sapply(thetaIndices, function(j){
+          ( obsStatsByPeriod[[i]] - ExpStat[[i]] ) %*%
+            JacobianCovar[[i]][[j]] %*%
+          t( obsStatsByPeriod[[i]] - ExpStat[[i]] )
+          })
 						-2	* JacobianExpStat[[i]] %*%
 								covInvByPeriod[[i]] %*%
-								t( obsStatsByPeriod[[i]] - ExpStat[[i]] ) })
-			Hessian <- lapply(period, function (i) {
-							2 *
-							JacobianExpStat[[i]] %*%
-							covInvByPeriod[[i]] %*%
-							t(JacobianExpStat[[i]])
+            t( obsStatsByPeriod[[i]] - ExpStat[[i]] )
 					})
-			gmmThetaDelta <- -1 * as.numeric( ginv(Reduce("+", Hessian)) %*%
-							Reduce("+", Gradient) )
-			OneStepSpecs[effectsToInclude,counterTestEffects] <- theta0 +
-					mmThetaDelta
-			PartialOneStepSpecs[effectsToInclude,counterTestEffects] <-
-					theta0 + mmPartialThetaDelta
-			GmmOneStepSpecs[effectsToInclude,counterTestEffects] <- theta0 +
-					gmmThetaDelta
+
+      OneStepSpecs[effectsToInclude,counterTestEffects] <- theta0 + mmThetaDelta
+      PartialOneStepSpecs[effectsToInclude,counterTestEffects] <- theta0 + mmPartialThetaDelta
+
 			for (i in 1:length(obsMhd)) {
-				OneStepMHD[[i]][counterTestEffects] <-	as.numeric(
-					obsMhd[i] +
-					mmThetaDelta %*% Gradient[[i]] + 0.5 *
-					mmThetaDelta %*% Hessian[[i]] %*% mmThetaDelta)
-				GmmMhdValue[[i]][counterTestEffects] <-
-						as.numeric( obsMhd[i] +
-						gmmThetaDelta %*%
-						Gradient[[i]] + 0.5 *
-						gmmThetaDelta %*%
-						Hessian[[i]] %*%
-						gmmThetaDelta )
-				PartialOneStepMHD[[i]][counterTestEffects] <-
-						as.numeric(
-						obsMhd[i] +
-						mmPartialThetaDelta %*%
-						Gradient[[i]] +
-						0.5 *
-						mmPartialThetaDelta %*%
-						Hessian[[i]] %*%
-						mmPartialThetaDelta)
-			}
-			JoinedOneStepMHD[counterTestEffects] <-
-					Reduce("+",OneStepMHD)[counterTestEffects]
-			JoinedPartialOneStepMHD[counterTestEffects] <-
-					Reduce("+",PartialOneStepMHD)[counterTestEffects]
-			JoinedGmmMhdValue[counterTestEffects] <-
-					Reduce("+",GmmMhdValue)[counterTestEffects]
+        OneStepMHD[[i]][counterTestEffects] <- as.numeric(obsMhd[i] + mmThetaDelta %*% Gradient[[i]] )
+        PartialOneStepMHD[[i]][counterTestEffects] <- as.numeric( obsMhd[i] + mmPartialThetaDelta %*% Gradient[[i]] )
+      }
+      JoinedOneStepMHD[counterTestEffects] <- Reduce("+",OneStepMHD)[counterTestEffects]
+      JoinedPartialOneStepMHD[counterTestEffects] <- Reduce("+",PartialOneStepMHD)[counterTestEffects]
 		}
 	}
 
@@ -426,7 +421,7 @@
 		cat(" >",titleStr, "\n")
 		for (i in 1:length(pVals))
 		{
-			cat(names(x)[i], ": ", pVals[i], "\n")
+			cat(names(x)[i], ": ", round(pVals[i],3), "\n")
 		}
 		for (i in 1:length(pVals))
 		{
@@ -442,7 +437,7 @@
 	{
 		cat("Siena Goodness of Fit (",
 			attr(x,"auxiliaryStatisticName"),"), all periods\n=====\n")
-		cat(titleStr,pVals[1], "\n")
+		cat(titleStr, round(pVals[1],3), "\n")
 		if (x[[1]]$Rank < dim(x[[1]]$Observations)[2])
 			{
 				cat("**Note: Only", x[[1]]$Rank, "statistics are",
@@ -701,7 +696,7 @@
 
 ##@descriptives.sienaGOF siena07 Gives numerical values in the plot.
 descriptives.sienaGOF <- function (x, center=FALSE, scale=FALSE,
-			perc=.05, key=NULL, period=1)
+			perc=.05, key=NULL, period=1, showAll=FALSE)
 {
 # adapted excerpt from plot.sienaGOF
 	if (attr(x,"joined"))
@@ -718,8 +713,11 @@
 	itns <- nrow(sims)
 
 	screen <- sapply(1:ncol(obs),function(i){
-						(sum(is.nan(rbind(sims,obs)[,i])) == 0) }) &
-			(diag(var(rbind(sims,obs)))!=0)
+						(sum(is.nan(rbind(sims,obs)[,i])) == 0) })
+	if (!showAll)
+	{
+		screen <- screen & (diag(var(rbind(sims,obs)))!=0)
+	}
 	sims <- sims[,screen, drop=FALSE]
 	obs <- obs[,screen, drop=FALSE]
 	## Need to check for useless statistics here:
@@ -747,6 +745,7 @@
 
 	sims.themin <- apply(sims, 2, min)
 	sims.themax <- apply(sims, 2, max)
+	sims.mean <- apply(sims, 2, mean)
 	sims.min <- pmin(sims.themin, obs)
 	sims.max <- pmax(sims.themax, obs)
 
@@ -757,6 +756,7 @@
 					(sims[,i] - sims.median[i]) )
 		obs <- matrix(sapply(1:ncol(sims), function(i)
 							(obs[,i] - sims.median[i])), nrow=n.obs )
+		sims.mean <- sims.mean - sims.median
 		sims.min <- sims.min - sims.median
 		sims.max <- sims.max - sims.median
 	}
@@ -767,15 +767,17 @@
 		sims <- sapply(1:ncol(sims), function(i) sims[,i]/(sims.range[i]))
 		obs <- matrix(sapply(1:ncol(sims), function(i) obs[,i]/(sims.range[i]))
 				, nrow=n.obs )
+		sims.mean <- sims.mean/sims.range
 		sims.min <- sims.min/sims.range
 		sims.max <- sims.max/sims.range
 	}
 
-#	ymin <- 1.05*min(sims.min) - 0.05*max(sims.max)
-#	ymax <- -0.05*min(sims.min) + 1.05*max(sims.max)
 	screen <- sapply(1:ncol(obs),function(i){
-						(sum(is.nan(rbind(sims,obs)[,i])) == 0) }) &
-			(diag(var(rbind(sims,obs)))!=0)
+						(sum(is.nan(rbind(sims,obs)[,i])) == 0) })
+	if (!showAll)
+	{
+		screen <- screen & (diag(var(rbind(sims,obs)))!=0)
+	}
 	sims <- sims[,screen, drop=FALSE]
 	obs <- obs[,screen, drop=FALSE]
 	sims.themin <- sims.themin[screen, drop=FALSE]
@@ -790,14 +792,16 @@
 				sort(sims[,i])[ind.lower]  )
 	yperc.upper = sapply(1:ncol(sims), function(i)
 				sort(sims[,i])[ind.upper]  )
-	violins <- matrix(NA, 6, ncol(sims))
+	violins <- matrix(NA, 7, ncol(sims))
 	violins[1,] <- sims.themax
 	violins[2,] <- yperc.upper
-	violins[3,] <- yperc.mid
-	violins[4,] <- yperc.lower
-	violins[5,] <- sims.themin
-	violins[6,] <- obs
-	rownames(violins) <- c('max', 'perc.upper', 'median', 'perc.lower', 'min', 'obs')
+	violins[3,] <- sims.mean
+	violins[4,] <- yperc.mid
+	violins[5,] <- yperc.lower
+	violins[6,] <- sims.themin
+	violins[7,] <- obs
+	rownames(violins) <- c('max', 'perc.upper', 'mean',
+							'median', 'perc.lower', 'min', 'obs')
 	colnames(violins) <- key
 	violins
 }
@@ -909,6 +913,7 @@
 			returnValue <- changeToStructural(returnValue,
 				Matrix(obsData[[groupName]]$depvars[[varName]][,,period]))
 		}
+		diag(returnValue) <- 0 # not guaranteed by data input
 	}
 	else
 	{

Modified: pkg/RSiena/R/sienaRI.r
===================================================================
--- pkg/RSiena/R/sienaRI.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/sienaRI.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -87,7 +87,8 @@
 	effects <- effects[effects$include,]
 	if (!is.null(algorithm$settings))
 	{
-		effects <- addSettingsEffects(effects, algorithm)
+		stop('not implemented: RI together with settings')
+		# effects <- addSettingsEffects(effects, algorithm)
 	}
 	else
 	{
@@ -208,7 +209,7 @@
 
 #				RIs <- RIs_matrix
 				entropies <- entropy_vector
-
+				# divide by column sums:
 				RIActors[[w]] <- apply(RIs_matrix, 2, function(x){x/sum(x)})
 				absoluteSumActors[[w]] <- colSums(RIs_matrix)
 				entropyActors[[w]] <- entropies
@@ -348,8 +349,8 @@
 
 
 ##@plot.sienaRI Methods
-plot.sienaRI <- function(x, file = NULL, col = NULL, addPieChart = FALSE,
-	radius = 1, width = NULL, height = NULL, legend = TRUE,
+plot.sienaRI <- function(x, col = NULL, addPieChart = FALSE,
+	radius = NULL, width = NULL, height = NULL, legend = TRUE,
 	legendColumns = NULL, legendHeight = NULL, cex.legend = NULL,
 	cex.names = NULL, ...)
 {
@@ -424,9 +425,9 @@
 	{
 		if(addPieChart)
 		{
-			width = (actors/3+2)*0.9
+			width = (actors/3+4)
 		}else{
-			width = (actors/3+1)*1
+			width = (actors/3+3)
 		}
 	}
 
@@ -472,32 +473,9 @@
 	}
 	if(is.null(radius))
 	{
-		rad <- 1
+		rad <- 4
 	}
 
-	createPdf = FALSE
-	if(!is.null(file))
-	{
-		if (is.character(file)){
-			pdf(file = file, width = width, height = height)
-			createPdf = TRUE
-		}else{
-			file = NULL
-		warning("file has to be a of type 'character' \n could not create pdf")
-		}
-	}
-	if(is.null(file))
-	{
-		if (Sys.info()[1]=="Windows")
-		{
-			windows(width = width, height = height)
-		}
-		else
-		{
-		stop("On non-windows systems, a non-null <<file>> argument is needed.")
-		}
-	}
-
 	if(!is.null(col))
 	{
 		cl <- col
@@ -542,8 +520,7 @@
 			layout(layoutMatrix,widths=c((actors/3),2),heights=rep(1,waves))
 		}
 		par( oma = c( 0, 0, 2, 0 ),
-		mar = par()$mar+c(-1,0,-3,-2),
- xpd=T , cex = 0.75, no.readonly = TRUE )
+		mar = par()$mar+c(4.1, 4.1, 1.1, 0.1), xpd=T , cex = 0.75, no.readonly = TRUE )
 	}else{
 		if(legend)
 		{
@@ -553,7 +530,7 @@
 			layoutMatrix <- matrix(c(1:waves), byrow= TRUE, ncol=1, nrow=waves)
 			layout(layoutMatrix,widths=c((actors/3)),heights=rep(1,waves))
 		}
-		par( oma = c( 0, 0, 2, 0 ),mar = par()$mar+c(-1,0,-3,1), xpd=T ,
+		par( oma = c( 0, 0, 2, 0 ),mar = par()$mar+c(4.1,4.1,1.1,3), xpd=T ,
 				cex = 0.75, no.readonly = TRUE )
 	}
 	for(w in 1:waves)
@@ -576,10 +553,6 @@
 		plot(c(0,1), c(0,1), col=rgb(0,0,0,0),axes=FALSE,  ylab = "", xlab = "")
 		legend(0, 1, x$effectNames, fill=cl, ncol = legendColumns, bty = "n", cex=cex.legend)
 	}
-	if(createPdf)
-	{
-		dev.off()
-	}
 	invisible(cl)
 }
 

Modified: pkg/RSiena/R/sienaRIDynamics.r
===================================================================
--- pkg/RSiena/R/sienaRIDynamics.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/sienaRIDynamics.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -304,7 +304,7 @@
 
 
 ##@plot.sienaRIDynamics Methods
-plot.sienaRIDynamics <- function(x, staticRI = NULL, file = NULL, col = NULL,
+plot.sienaRIDynamics <- function(x, staticRI = NULL, col = NULL,
 			ylim=NULL, width = NULL, height = NULL, legend = TRUE,
 			legendColumns = NULL, legendHeight = NULL, cex.legend = NULL, ...)
 {
@@ -427,22 +427,6 @@
 		cex.legend <- 1
 	}
 
-	createPdf = FALSE
-	if(!is.null(file))
-	{
-		if (is.character(file)){
-			pdf(file = file, width = width, height = height)
-			createPdf = TRUE
-		}else{
-			file = NULL
-			warning("file has to be a of type 'character' \n could not create pdf")
-		}
-	}
-	if(is.null(file))
-	{
-		windows(width = width, height = height)
-	}
-
 	if(!is.null(col))
 	{
 		cl <- col
@@ -496,7 +480,8 @@
 	}else{
 		layout(rbind(1:periods),widths=rep(4, periods),heights=c(3))
 	}
-	par( oma = c( 1, 3, 1, 3 ),mar = par()$mar+c(-5,-4.1,-4,-2.1), xpd=T )
+#	par( oma = c( 1, 3, 1, 3 ),mar = par()$mar+c(-5,-4.1,-4,-2.1), xpd=T )
+	par( oma = c( 1, 3, 1, 3 ),mar = c(0.1, 0.1, 0.1, 0.1), xpd=T )
 	for(period in 1:periods){
 		timeseries<-ts(t(values[[period]]))
 		plot.ts(timeseries, plot.type = "single",  col = cl,
@@ -534,10 +519,6 @@
 		legend(0, 1, legendNames, col = cl[1:effectNumber], lwd = 2,
 				lty = lineTypes, ncol = legendColumns, bty = "n",cex=cex.legend)
 	}
-	if(createPdf)
-	{
-		dev.off()
-	}
 	invisible(cl)
 }
 

Modified: pkg/RSiena/R/sienaTimeTest.r
===================================================================
--- pkg/RSiena/R/sienaTimeTest.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/sienaTimeTest.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -314,24 +314,28 @@
 			excludedNumber <- sum(extraExclusions)
 			if (excludedNumber <= 1)
 			{
-				cat(" effect",which(extraExclusions),".\n")
+				cat(" effect",":\n")
+				cat(paste(row(fitEffects)[baseInFit,][extraExclusions,][1],'.',
+				fitEffects$effectName[baseInFit][which(extraExclusions)],"\n "))
 			}
 			else
 			{
-				cat("\neffects ", which(extraExclusions)[1],
-					paste(", ",which(extraExclusions)[2:excludedNumber],sep=""),
-					".\n", sep="")
+				cat(" effects:\n")
+				cat(paste(row(fitEffects)[baseInFit,][extraExclusions,][,1],'.',
+				fitEffects$effectName[baseInFit][which(extraExclusions)],"\n "))
 			}
 			rankSigma <- qr(sigma)$rank
 			if (rankSigma < dim(sigma)[1])
 			{
 		cat("After these exclusions, there still are linear dependencies.\n")
+		cat("Advice: use sienaTimeTest with a smaller set of effects.\n\n")
 		stop("Please rerun sienaTimeTest with appropriate excluded effects.")
 			}
 		}
 		else
 		{
 			cat("Automatic discovery of dependencies had no effect.\n")
+			cat("Advice: use sienaTimeTest with a smaller set of effects.\n\n")
 		stop("Please rerun sienaTimeTest with appropriate excluded effects.")
 		}
 	}

Modified: pkg/RSiena/R/sienaeffects.r
===================================================================
--- pkg/RSiena/R/sienaeffects.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/sienaeffects.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -37,6 +37,10 @@
 	{
 		effectNames <- dots
 	}
+	if ("AltsAvAlt" %in% effectNames)
+	{
+		stop("Effect AltsAvAlt now is called avXAlt. Use the new name please.")
+	}
 	use <- myeff$shortName %in% effectNames &
 	myeff$type==type &
 	myeff$name==name &
@@ -233,6 +237,10 @@
 	{
 		shortName <- deparse(substitute(shortName))
 	}
+	if (shortName=="AltsAvAlt")
+	{
+		stop("Effect AltsAvAlt renamed to avXAlt.")
+	}
 	use <- myeff$shortName == shortName &
 	myeff$name == name &
 	myeff$type == type &

Modified: pkg/RSiena/R/sienaprint.r
===================================================================
--- pkg/RSiena/R/sienaprint.r	2014-07-24 10:00:52 UTC (rev 278)
+++ pkg/RSiena/R/sienaprint.r	2014-11-13 22:29:47 UTC (rev 279)
@@ -24,6 +24,12 @@
 	# with named columns, and rows indicating periods.
 		textattr <- deparse(substitute(attrib),  backtick=FALSE)
 		uponlys <- as.matrix(sapply(x$depvars, function(y){attr(y,attrib)}))
+		if (x$observations == 2)
+		# only one period
+		{
+			uponlys <- t(uponlys)
+		}
+		# now rows are periods; columns are dependent variables
 		for (j in 1:dim(uponlys)[2])
 		{
 			if (any(uponlys[,j]))
@@ -385,6 +391,8 @@
 		cat(c('   c = ',sprintf("%8.4f", x$testresOverall),
 			  '   d.f. = ',j,'   p-value '), sep='')
 		pvalue <- 1 - pchisq(x$testresOverall, j)
+		if (!is.na(pvalue))
+		{
         if (pvalue < 0.0001)
 		{
             cat('< 0.0001\n')
@@ -393,6 +401,11 @@
 		{
             cat(c('= ', sprintf("%8.4f\n", pvalue)), sep = '')
 		}
+		}
+		else
+		{
+				Report('  NA  ',outf)
+		}
         if (testn==1)
 		{
             cat(c('\n   one-sided (normal variate): ',
@@ -409,6 +422,8 @@
                 cat(c('  c = ', sprintf("%8.4f", x$testresult[k]),
                          '   d.f. = 1  p-value '), sep = '')
                 pvalue<- 1-pchisq(x$testresult[k],1)
+				if (!is.na(pvalue))
+				{
                 if (pvalue < 0.0001)
 				{
                     cat('< 0.0001\n')
@@ -417,6 +432,11 @@
 				{
                     cat(c('= ', sprintf("%8.4f", pvalue), '\n'), sep = '')
 				}
+				}
+				else
+				{
+					Report('  NA  ',outf)
+				}
                 cat(c(' - one-sided (normal variate): ',
 					  sprintf("%8.4f", x$testresulto[k])), sep = '')
                 if (k < j)
@@ -468,24 +488,31 @@
 	cat(' Siena Algorithm specification.\n')
     cat(' Project name:', x$projname, '\n')
     cat(' Use standard initial values:', x$useStdInits, '\n')
-    cat(' Random seed:', x$randomSeed,'\n')
+    cat(' Random seed:', objectOrNull(x$randomSeed),'\n')
+	if (x$simOnly)
+	{
+		cat(' Simulation only', '\n')
+	}
+	else
+	{
     cat(' Starting value of gain parameter:', x$firstg, '\n')
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/rsiena -r 279


More information about the Rsiena-commits mailing list