[Rsiena-commits] r256 - pkg/RSienaTest/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Mar 14 13:19:48 CET 2014


Author: natalie
Date: 2014-03-14 13:19:48 +0100 (Fri, 14 Mar 2014)
New Revision: 256

Modified:
   pkg/RSienaTest/R/initializeFRAN.r
   pkg/RSienaTest/R/simstatsc.r
Log:
Lots of things, see changeLog

Modified: pkg/RSienaTest/R/initializeFRAN.r
===================================================================
--- pkg/RSienaTest/R/initializeFRAN.r	2014-03-14 12:18:26 UTC (rev 255)
+++ pkg/RSienaTest/R/initializeFRAN.r	2014-03-14 12:19:48 UTC (rev 256)
@@ -479,7 +479,7 @@
     if (!initC)
     {
         ans <- .Call("getTargets", PACKAGE=pkgname, pData, pModel, myeffects,
-					 z$parallelTesting)
+					 z$parallelTesting, returnActorStatistics=FALSE, returnStaticChangeContributions=FALSE)
 		##stop("done")
 		## create a grid of periods with group names in case want to
 		## parallelize using this or to access chains easily

Modified: pkg/RSienaTest/R/simstatsc.r
===================================================================
--- pkg/RSienaTest/R/simstatsc.r	2014-03-14 12:18:26 UTC (rev 255)
+++ pkg/RSienaTest/R/simstatsc.r	2014-03-14 12:19:48 UTC (rev 256)
@@ -33,6 +33,14 @@
     {
         returnDeps <- z$returnDeps
     }
+    if (is.null(z$returnActorStatistics))
+	{
+		z$returnActorStatistics <- FALSE
+	}
+	if (is.null(z$returnChangeContributions))
+	{
+		z$returnChangeContributions <- FALSE
+	}
     if (is.null(f$seeds))
     {
         seeds <- NULL
@@ -77,7 +85,8 @@
 				 fromFiniteDiff, f$pModel, f$myeffects, z$theta,
 				 randomseed2, returnDeps, z$FinDiff.method,
 				 !is.null(z$cl) && useStreams, z$addChainToStore,
-				  z$returnChains, returnLoglik)
+				  z$returnChains, returnLoglik, 
+				  z$returnActorStatistics, z$returnChangeContributions)
     if (!fromFiniteDiff)
     {
         if (z$FinDiff.method)
@@ -119,6 +128,22 @@
 	{
 		loglik <- NULL
 	}
+	if(z$returnChangeContributions)
+	{	
+		changeContributions <- ans[[9]]
+	}
+	else
+	{
+		changeContributions <- NULL
+	}
+	if(z$returnActorStatistics)
+	{
+		actorStatistics <- ans[[10]]
+	}
+	else
+	{
+		actorStatistics <- NULL
+	}
     if (returnDeps)
     {
         ## attach the names
@@ -137,7 +162,8 @@
     }
 		 ## browser()
     list(sc = sc, fra = fra, ntim0 = ntim, feasible = TRUE, OK = TRUE,
-         sims=sims, f$seeds, chain=chain, loglik=loglik)
+         sims=sims, f$seeds, chain=chain, loglik=loglik,
+		 actorStatistics = actorStatistics, changeContributions = changeContributions)
 }
 
 ##@clearData siena07 Finalizer to clear Data object in C++



More information about the Rsiena-commits mailing list