[Rsiena-commits] r252 - in pkg: RSiena RSiena/man RSiena/src/model/effects RSienaTest RSienaTest/R RSienaTest/inst/doc RSienaTest/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Feb 15 16:16:04 CET 2014


Author: tomsnijders
Date: 2014-02-15 16:16:03 +0100 (Sat, 15 Feb 2014)
New Revision: 252

Modified:
   pkg/RSiena/DESCRIPTION
   pkg/RSiena/changeLog
   pkg/RSiena/man/siena01Gui.Rd
   pkg/RSiena/src/model/effects/HomCovariateTransitiveTripletseffect.cpp
   pkg/RSiena/src/model/effects/HomCovariateTransitiveTripletseffect.h
   pkg/RSienaTest/DESCRIPTION
   pkg/RSienaTest/R/sienaBayes.r
   pkg/RSienaTest/changeLog
   pkg/RSienaTest/inst/doc/RSiena.bib
   pkg/RSienaTest/man/siena01Gui.Rd
Log:
Version 1.1-252. The previous version (251) did not build on R-Forge; my only possible diagnosis was the lack of eoln-native property on HomCovariateTransitiveTripletsEffect.h and .cpp.

Modified: pkg/RSiena/DESCRIPTION
===================================================================
--- pkg/RSiena/DESCRIPTION	2014-02-13 23:03:20 UTC (rev 251)
+++ pkg/RSiena/DESCRIPTION	2014-02-15 15:16:03 UTC (rev 252)
@@ -1,8 +1,8 @@
 Package: RSiena
 Type: Package
 Title: Siena - Simulation Investigation for Empirical Network Analysis
-Version: 1.1-251
-Date: 2014-02-13
+Version: 1.1-252
+Date: 2014-02-15
 Author: Ruth Ripley, Krists Boitmanis, Tom A.B. Snijders
 Depends: R (>= 2.15.0)
 Imports: Matrix

Modified: pkg/RSiena/changeLog
===================================================================
--- pkg/RSiena/changeLog	2014-02-13 23:03:20 UTC (rev 251)
+++ pkg/RSiena/changeLog	2014-02-15 15:16:03 UTC (rev 252)
@@ -1,3 +1,10 @@
+2014-02-15 R-Forge Revision 252
+Changes in RSiena:
+   * Set eoln property to "native" for HomCovariateTransitiveTripletsEffect.h
+     and HomCovariateTransitiveTripletsEffect.cpp.
+Changes in RSienaTest:
+   * Small change to sienaBayes (mustUpdate).
+
 2014-02-13 R-Forge Revision 251
 Changes in RSiena and RSienaTest:
    * Also cater for behavior user-specified interactions in includeInteraction
@@ -25,7 +32,8 @@
      by maximum likelihood estimation.
 Changes in RSiena:
    * Ported effects outRateLog and outTrunc2 from RSienaTest.
-   * Ported changes (new folders and files) in \src\network\ from RSienaTest.
+   * Ported changes (new folders and files: \layers, \iterators, etc.)#
+     in \src\network\ from RSienaTest.
 Changes in RSienaTest:
    * Major changes to sienaBayes and print.sienaBayes,
      to permit estimation of multilevel stochastic actor-oriented model with

Modified: pkg/RSiena/man/siena01Gui.Rd
===================================================================
--- pkg/RSiena/man/siena01Gui.Rd	2014-02-13 23:03:20 UTC (rev 251)
+++ pkg/RSiena/man/siena01Gui.Rd	2014-02-15 15:16:03 UTC (rev 252)
@@ -13,9 +13,12 @@
 }
 \details{
 
-  This function provides a graphical user interface for fitting Siena
+  This function provides a graphical user interface (gui) for fitting Siena
   models.
-  Note that this is less flexible and has fewer possibilities than
+  More documentation can be obtained by requesting 
+  \code{RShowDoc("rsiena01gui", package="RSiena")}.
+  
+  Note that this gui is less flexible and has fewer possibilities than
   creating data objects from matrices and
   vectors using \code{\link{sienaDependent}}, \code{\link{coCovar}} etc.,
   and finally \code{\link{sienaDataCreate}}.
@@ -58,7 +61,8 @@
   None, although various objects made will still be in the directory if you
   are using this within an R session.
 }
-\references{See \url{http://www.stats.ox.ac.uk/~snijders/siena/}}
+\references{See \url{http://www.stats.ox.ac.uk/~snijders/siena/}
+ or \code{RShowDoc("rsiena01gui", package="RSiena")}.}
 \author{Ruth Ripley}
 \seealso{    \code{\link{sienaDataCreateFromSession}},
     \code{\link{sienaDataCreate}}.}

Modified: pkg/RSiena/src/model/effects/HomCovariateTransitiveTripletseffect.cpp
===================================================================
--- pkg/RSiena/src/model/effects/HomCovariateTransitiveTripletseffect.cpp	2014-02-13 23:03:20 UTC (rev 251)
+++ pkg/RSiena/src/model/effects/HomCovariateTransitiveTripletseffect.cpp	2014-02-15 15:16:03 UTC (rev 252)
@@ -1,137 +1,137 @@
-/******************************************************************************
- * SIENA: Simulation Investigation for Empirical Network Analysis
- *
- * Web: http://www.stats.ox.ac.uk/~snijders/siena/
- *
- * File: HomCovariateTransitiveTripletsEffect.cpp
- *
- * Description: This file contains the implementation of the class
- * HomCovariateTransitiveTripletsEffect.
- *****************************************************************************/
-#include <cmath>
-
-#include "HomCovariateTransitiveTripletsEffect.h"
-#include "utils/Utils.h"
-#include "network/Network.h"
-#include "network/IncidentTieIterator.h"
-#include "network/CommonNeighborIterator.h"
-#include "network/OneModeNetwork.h"
-#include "network/TieIterator.h"
-#include "model/variables/NetworkVariable.h"
-#include "model/tables/ConfigurationTable.h"
-
-namespace siena
-{
-
-/**
- * Constructor.
- */
-
-HomCovariateTransitiveTripletsEffect::HomCovariateTransitiveTripletsEffect(
-									const EffectInfo * pEffectInfo, bool reciprocal) :
-	CovariateDependentNetworkEffect(pEffectInfo)
-{
-// currently not used:
-	{
-		this->lreciprocal = reciprocal;
-	}
-}
-
-/**
- * Calculates the contribution of a tie flip to the given actor.
- */
-double HomCovariateTransitiveTripletsEffect::calculateContribution(
-                                              int alter) const
-{
-	// If we are introducing a tie from the ego i to the alter j, then each
-	// two-path from i to j via h with v_i = v_h != v_j contributes one unit;
-   // in addition, each in-star i -> h <- j with v_i = v_j != v_h
-   // also contributes one unit.
-   // This number is not stored in a table and is calculated from scratch.
-
-	int contribution1 = 0;
-	const Network * pNetwork = this->pNetwork();
-
-	// The following probably can be done more efficiently
-	// using CommonNeighborIterator.
-	// Iterate over ego's outgoing ties
-	if (fabs(this->value(alter) - this->value(this->ego())) < EPSILON)
-	{
-		for (IncidentTieIterator iter = pNetwork->outTies(this->ego());
-			iter.valid();
-			iter.next())
-			{
-
-// HERE THE COVAR OF THE MEDIATING ACTOR IS IDENTIFIED!!!!
-
-				// Get the receiver of the outgoing tie.
-				int h = iter.actor();
-				// in 2-stars:
-				if (fabs(  this->value(h) - this->value( this->ego() )     ) < EPSILON &&
-				pNetwork->tieValue(alter, h) >= 1)
-				{
-					contribution1++ ;
-				}
-			}
-	}
-	else
-	{
-		for (IncidentTieIterator iter = pNetwork->outTies(this->ego());
-			iter.valid();
-			iter.next())
-			{
-				// Get the receiver of the outgoing tie.
-				int h = iter.actor();
-				// 2-paths:
-				if (fabs(this->value(h) - this->value(this->ego())) < EPSILON &&
-				pNetwork->tieValue(h, alter) >= 1)
-				{
-					contribution1++ ;
-				}
-			}
-	}
-
-
-
-
-
-
-	return contribution1;
-}
-
-
-/**
- * The contribution of the tie from the implicit ego to the given alter
- * to the statistic. It is assumed that preprocessEgo(ego) has been
- * called before.
- */
-double HomCovariateTransitiveTripletsEffect::tieStatistic(int alter)
-{
-
-	int statistic = 0;
-	const Network * pNetwork = this->pNetwork();
-
-	if (!this->missing(this->ego()) && !this->missing(alter) &&
-		fabs(this->value(alter) - this->value(this->ego())) < EPSILON)
-	{
-	// The following probably can be done more efficiently
-	// using CommonNeighborIterator.
-	// Iterate over ego's outgoing ties
-		for (IncidentTieIterator iter = pNetwork->outTies(this->ego());
-			iter.valid();
-			iter.next())
-			{
-				// Get the receiver of the outgoing tie.
-				int h = iter.actor();
-				// 2-paths:
-				if (fabs(this->value(h) - this->value(this->ego())) < EPSILON &&
-				pNetwork->tieValue(h, alter) >= 1)
-				{
-					statistic++ ;
-				}
-			}
-	}
-	return statistic;
-}
-
-}
+/******************************************************************************
+ * SIENA: Simulation Investigation for Empirical Network Analysis
+ *
+ * Web: http://www.stats.ox.ac.uk/~snijders/siena/
+ *
+ * File: HomCovariateTransitiveTripletsEffect.cpp
+ *
+ * Description: This file contains the implementation of the class
+ * HomCovariateTransitiveTripletsEffect.
+ *****************************************************************************/
+#include <cmath>
+
+#include "HomCovariateTransitiveTripletsEffect.h"
+#include "utils/Utils.h"
+#include "network/Network.h"
+#include "network/IncidentTieIterator.h"
+#include "network/CommonNeighborIterator.h"
+#include "network/OneModeNetwork.h"
+#include "network/TieIterator.h"
+#include "model/variables/NetworkVariable.h"
+#include "model/tables/ConfigurationTable.h"
+
+namespace siena
+{
+
+/**
+ * Constructor.
+ */
+
+HomCovariateTransitiveTripletsEffect::HomCovariateTransitiveTripletsEffect(
+									const EffectInfo * pEffectInfo, bool reciprocal) :
+	CovariateDependentNetworkEffect(pEffectInfo)
+{
+// currently not used:
+	{
+		this->lreciprocal = reciprocal;
+	}
+}
+
+/**
+ * Calculates the contribution of a tie flip to the given actor.
+ */
+double HomCovariateTransitiveTripletsEffect::calculateContribution(
+                                              int alter) const
+{
+	// If we are introducing a tie from the ego i to the alter j, then each
+	// two-path from i to j via h with v_i = v_h != v_j contributes one unit;
+   // in addition, each in-star i -> h <- j with v_i = v_j != v_h
+   // also contributes one unit.
+   // This number is not stored in a table and is calculated from scratch.
+
+	int contribution1 = 0;
+	const Network * pNetwork = this->pNetwork();
+
+	// The following probably can be done more efficiently
+	// using CommonNeighborIterator.
+	// Iterate over ego's outgoing ties
+	if (fabs(this->value(alter) - this->value(this->ego())) < EPSILON)
+	{
+		for (IncidentTieIterator iter = pNetwork->outTies(this->ego());
+			iter.valid();
+			iter.next())
+			{
+
+// HERE THE COVAR OF THE MEDIATING ACTOR IS IDENTIFIED!!!!
+
+				// Get the receiver of the outgoing tie.
+				int h = iter.actor();
+				// in 2-stars:
+				if (fabs(  this->value(h) - this->value( this->ego() )     ) < EPSILON &&
+				pNetwork->tieValue(alter, h) >= 1)
+				{
+					contribution1++ ;
+				}
+			}
+	}
+	else
+	{
+		for (IncidentTieIterator iter = pNetwork->outTies(this->ego());
+			iter.valid();
+			iter.next())
+			{
+				// Get the receiver of the outgoing tie.
+				int h = iter.actor();
+				// 2-paths:
+				if (fabs(this->value(h) - this->value(this->ego())) < EPSILON &&
+				pNetwork->tieValue(h, alter) >= 1)
+				{
+					contribution1++ ;
+				}
+			}
+	}
+
+
+
+
+
+
+	return contribution1;
+}
+
+
+/**
+ * The contribution of the tie from the implicit ego to the given alter
+ * to the statistic. It is assumed that preprocessEgo(ego) has been
+ * called before.
+ */
+double HomCovariateTransitiveTripletsEffect::tieStatistic(int alter)
+{
+
+	int statistic = 0;
+	const Network * pNetwork = this->pNetwork();
+
+	if (!this->missing(this->ego()) && !this->missing(alter) &&
+		fabs(this->value(alter) - this->value(this->ego())) < EPSILON)
+	{
+	// The following probably can be done more efficiently
+	// using CommonNeighborIterator.
+	// Iterate over ego's outgoing ties
+		for (IncidentTieIterator iter = pNetwork->outTies(this->ego());
+			iter.valid();
+			iter.next())
+			{
+				// Get the receiver of the outgoing tie.
+				int h = iter.actor();
+				// 2-paths:
+				if (fabs(this->value(h) - this->value(this->ego())) < EPSILON &&
+				pNetwork->tieValue(h, alter) >= 1)
+				{
+					statistic++ ;
+				}
+			}
+	}
+	return statistic;
+}
+
+}


Property changes on: pkg/RSiena/src/model/effects/HomCovariateTransitiveTripletseffect.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: pkg/RSiena/src/model/effects/HomCovariateTransitiveTripletseffect.h
===================================================================
--- pkg/RSiena/src/model/effects/HomCovariateTransitiveTripletseffect.h	2014-02-13 23:03:20 UTC (rev 251)
+++ pkg/RSiena/src/model/effects/HomCovariateTransitiveTripletseffect.h	2014-02-15 15:16:03 UTC (rev 252)
@@ -1,42 +1,42 @@
-/******************************************************************************
- * SIENA: Simulation Investigation for Empirical Network Analysis
- *
- * Web: http://www.stats.ox.ac.uk/~snijders/siena/
- *
- * File: HomCovariateTransitiveTripletsEffect.h
- *
- * Description: This file contains the declaration of the class
- * HomCovariateTransitiveTripletsEffect.
- * Contributed by Robert Hellpap.
- *****************************************************************************/
-
-#ifndef HOMCOVARIATETRANSITIVETRIPLETSEFFECT_H_
-#define HOMCOVARIATETRANSITIVETRIPLETSEFFECT_H_
-
-#include "model/effects/NetworkEffect.h"
-#include "CovariateDependentNetworkEffect.h"
-
-namespace siena
-{
-
-class HomCovariateTransitiveTripletsEffect :
-                   public CovariateDependentNetworkEffect
-{
-public:
-	HomCovariateTransitiveTripletsEffect(
-                   const EffectInfo * pEffectInfo, bool reciprocal);
-	virtual double calculateContribution(int alter) const;
-
-protected:
-	virtual double tieStatistic(int alter);
-
-private:
-	// Indicates if a reciprocal version of the effect is required;
-   // currently not implemented.
-
-	bool lreciprocal;
-};
-
-}
-
-#endif /*HOMCOVARIATETRANSITIVETRIPLETSEFFECT_H_*/
+/******************************************************************************
+ * SIENA: Simulation Investigation for Empirical Network Analysis
+ *
+ * Web: http://www.stats.ox.ac.uk/~snijders/siena/
+ *
+ * File: HomCovariateTransitiveTripletsEffect.h
+ *
+ * Description: This file contains the declaration of the class
+ * HomCovariateTransitiveTripletsEffect.
+ * Contributed by Robert Hellpap.
+ *****************************************************************************/
+
+#ifndef HOMCOVARIATETRANSITIVETRIPLETSEFFECT_H_
+#define HOMCOVARIATETRANSITIVETRIPLETSEFFECT_H_
+
+#include "model/effects/NetworkEffect.h"
+#include "CovariateDependentNetworkEffect.h"
+
+namespace siena
+{
+
+class HomCovariateTransitiveTripletsEffect :
+                   public CovariateDependentNetworkEffect
+{
+public:
+	HomCovariateTransitiveTripletsEffect(
+                   const EffectInfo * pEffectInfo, bool reciprocal);
+	virtual double calculateContribution(int alter) const;
+
+protected:
+	virtual double tieStatistic(int alter);
+
+private:
+	// Indicates if a reciprocal version of the effect is required;
+   // currently not implemented.
+
+	bool lreciprocal;
+};
+
+}
+
+#endif /*HOMCOVARIATETRANSITIVETRIPLETSEFFECT_H_*/


Property changes on: pkg/RSiena/src/model/effects/HomCovariateTransitiveTripletseffect.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: pkg/RSienaTest/DESCRIPTION
===================================================================
--- pkg/RSienaTest/DESCRIPTION	2014-02-13 23:03:20 UTC (rev 251)
+++ pkg/RSienaTest/DESCRIPTION	2014-02-15 15:16:03 UTC (rev 252)
@@ -1,8 +1,8 @@
 Package: RSienaTest
 Type: Package
 Title: Siena - Simulation Investigation for Empirical Network Analysis
-Version: 1.1-251
-Date: 2014-02-13
+Version: 1.1-252
+Date: 2014-02-15
 Author: Ruth Ripley, Krists Boitmanis, Tom A.B. Snijders
 Depends: R (>= 2.15.0)
 Imports: Matrix

Modified: pkg/RSienaTest/R/sienaBayes.r
===================================================================
--- pkg/RSienaTest/R/sienaBayes.r	2014-02-13 23:03:20 UTC (rev 251)
+++ pkg/RSienaTest/R/sienaBayes.r	2014-02-15 15:16:03 UTC (rev 252)
@@ -164,7 +164,8 @@
             mustUpdate <- (number < 3)
 			if (any(is.na(mustUpdate)))
 			{
-				stop("is.na(mustUpdate) in improveMH")
+				cat("is.na(mustUpdate) in improveMH\n")
+				mustUpdate[is.na(mustUpdate)] <- FALSE
 # Can happen in case of divergence: logLik = -Infty
 			}
             z$scaleFactors[mustUpdate[groups]] <<-

Modified: pkg/RSienaTest/changeLog
===================================================================
--- pkg/RSienaTest/changeLog	2014-02-13 23:03:20 UTC (rev 251)
+++ pkg/RSienaTest/changeLog	2014-02-15 15:16:03 UTC (rev 252)
@@ -1,3 +1,10 @@
+2014-02-15 R-Forge Revision 252
+Changes in RSiena:
+   * Set eoln property to "native" for HomCovariateTransitiveTripletsEffect.h
+     and HomCovariateTransitiveTripletsEffect.cpp.
+Changes in RSienaTest:
+   * Small change to sienaBayes (mustUpdate).
+
 2014-02-13 R-Forge Revision 251
 Changes in RSiena and RSienaTest:
    * Also cater for behavior user-specified interactions in includeInteraction
@@ -25,7 +32,8 @@
      by maximum likelihood estimation.
 Changes in RSiena:
    * Ported effects outRateLog and outTrunc2 from RSienaTest.
-   * Ported changes (new folders and files) in \src\network\ from RSienaTest.
+   * Ported changes (new folders and files: \layers, \iterators, etc.)#
+     in \src\network\ from RSienaTest.
 Changes in RSienaTest:
    * Major changes to sienaBayes and print.sienaBayes,
      to permit estimation of multilevel stochastic actor-oriented model with

Modified: pkg/RSienaTest/inst/doc/RSiena.bib
===================================================================
--- pkg/RSienaTest/inst/doc/RSiena.bib	2014-02-13 23:03:20 UTC (rev 251)
+++ pkg/RSienaTest/inst/doc/RSiena.bib	2014-02-15 15:16:03 UTC (rev 252)
@@ -1649,6 +1649,15 @@
 pages ={109 -- 137}}
 
 
+ at ARTICLE{HollandLeinhardt1970,
+  AUTHOR = "Paul W. {Holland} and Samuel {Leinhardt}",
+  TITLE = "A method for detecting structure in sociometric data",
+  YEAR = "1970",
+  JOURNAL = "American Journal of Sociology",
+  VOLUME = "70",
+  PAGES = "492 -- 513" }
+
+
 @ARTICLE{HollandLeinhardt1971,
   AUTHOR = "Paul W. {Holland} and Samuel {Leinhardt}",
   TITLE = "Transitivity in structural models of small groups",

Modified: pkg/RSienaTest/man/siena01Gui.Rd
===================================================================
--- pkg/RSienaTest/man/siena01Gui.Rd	2014-02-13 23:03:20 UTC (rev 251)
+++ pkg/RSienaTest/man/siena01Gui.Rd	2014-02-15 15:16:03 UTC (rev 252)
@@ -13,9 +13,12 @@
 }
 \details{
 
-  This function provides a graphical user interface for fitting Siena
+  This function provides a graphical user interface (gui) for fitting Siena
   models.
-  Note that this is less flexible and has fewer possibilities than
+  More documentation can be obtained by requesting 
+  \code{RShowDoc("rsiena01gui", package="RSienaTest")}.
+  
+  Note that this gui is less flexible and has fewer possibilities than
   creating data objects from matrices and
   vectors using \code{\link{sienaDependent}}, \code{\link{coCovar}} etc.,
   and finally \code{\link{sienaDataCreate}}.
@@ -58,7 +61,8 @@
   None, although various objects made will still be in the directory if you
   are using this within an R session.
 }
-\references{See \url{http://www.stats.ox.ac.uk/~snijders/siena/}}
+\references{See \url{http://www.stats.ox.ac.uk/~snijders/siena/}
+ or \code{RShowDoc("rsiena01gui", package="RSienaTest")}.}
 \author{Ruth Ripley}
 \seealso{    \code{\link{sienaDataCreateFromSession}},
     \code{\link{sienaDataCreate}}.}



More information about the Rsiena-commits mailing list