[Rsiena-commits] r199 - in pkg: RSiena RSiena/man RSienaTest RSienaTest/R RSienaTest/man RSienaTest/src/model/variables
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Feb 7 13:36:47 CET 2012
Author: cgreenan
Date: 2012-02-07 13:36:47 +0100 (Tue, 07 Feb 2012)
New Revision: 199
Modified:
pkg/RSiena/DESCRIPTION
pkg/RSiena/changeLog
pkg/RSiena/man/RSiena-package.Rd
pkg/RSienaTest/DESCRIPTION
pkg/RSienaTest/R/sienatable.r
pkg/RSienaTest/changeLog
pkg/RSienaTest/man/RSiena-package.Rd
pkg/RSienaTest/src/model/variables/DependentVariable.cpp
pkg/RSienaTest/src/model/variables/DiffusionEffectValueTable.cpp
pkg/RSienaTest/src/model/variables/DiffusionEffectValueTable.h
pkg/RSienaTest/src/model/variables/EffectValueTable.h
Log:
Modified: pkg/RSiena/DESCRIPTION
===================================================================
--- pkg/RSiena/DESCRIPTION 2012-01-29 17:03:31 UTC (rev 198)
+++ pkg/RSiena/DESCRIPTION 2012-02-07 12:36:47 UTC (rev 199)
@@ -1,8 +1,8 @@
Package: RSiena
Type: Package
Title: Siena - Simulation Investigation for Empirical Network Analysis
-Version: 1.0.12.198
-Date: 2012-01-29
+Version: 1.0.12.199
+Date: 2012-02-07
Author: Various
Depends: R (>= 2.10.0)
Imports: Matrix
Modified: pkg/RSiena/changeLog
===================================================================
--- pkg/RSiena/changeLog 2012-01-29 17:03:31 UTC (rev 198)
+++ pkg/RSiena/changeLog 2012-02-07 12:36:47 UTC (rev 199)
@@ -1,3 +1,16 @@
+2012-02-07 R-forge revision 199 (RSienaTest only)
+ * src/model/variables/DependentVariable.cpp,
+ src/model/variables/EffectValueTable.h,
+ src/model/variables/DiffusionEffectValueTable.h: removing
+ backslashes from within comments.
+ * src/model/variables/DependentVariable.cpp: removing
+ networkVariable conditions so score sum terms are calculated for
+ behaviour rate effects.
+ * src/model/variables/DependentVariable.cpp,
+ src/model/variables/DiffusionEffectValueTable.cpp: correction
+ calculation of average exposure diffusion rate effect.
+ * R/sienatable.r: removal of superfluous variables.
+
2012-01-29 R-forge revision 198
* src/siena07internals.cpp: fix a bug causing initialisation of ML
Modified: pkg/RSiena/man/RSiena-package.Rd
===================================================================
--- pkg/RSiena/man/RSiena-package.Rd 2012-01-29 17:03:31 UTC (rev 198)
+++ pkg/RSiena/man/RSiena-package.Rd 2012-02-07 12:36:47 UTC (rev 199)
@@ -30,8 +30,8 @@
\tabular{ll}{
Package: \tab RSiena\cr
Type: \tab Package\cr
-Version: \tab 1.0.12.198\cr
-Date: \tab 2012-01-29\cr
+Version: \tab 1.0.12.199\cr
+Date: \tab 2012-02-07\cr
License: \tab GPL-2 \cr
LazyLoad: \tab yes\cr
}
Modified: pkg/RSienaTest/DESCRIPTION
===================================================================
--- pkg/RSienaTest/DESCRIPTION 2012-01-29 17:03:31 UTC (rev 198)
+++ pkg/RSienaTest/DESCRIPTION 2012-02-07 12:36:47 UTC (rev 199)
@@ -1,8 +1,8 @@
Package: RSienaTest
Type: Package
Title: Siena - Simulation Investigation for Empirical Network Analysis
-Version: 1.0.12.198
-Date: 2012-01-29
+Version: 1.0.12.199
+Date: 2012-02-07
Author: Various
Depends: R (>= 2.10.0)
Imports: Matrix
Modified: pkg/RSienaTest/R/sienatable.r
===================================================================
--- pkg/RSienaTest/R/sienatable.r 2012-01-29 17:03:31 UTC (rev 198)
+++ pkg/RSienaTest/R/sienatable.r 2012-02-07 12:36:47 UTC (rev 199)
@@ -27,15 +27,12 @@
condrates <- length(x$rate)
}
- pp <- p + condrates
- test <- x$test
- fixed <- x$fixed
theta <- x$theta
theta[diag(x$covtheta) < 0.0 | x$fixed] <- NA
ses <- sqrt(diag(x$covtheta))
ses[x$fixed] <- NA
max.t1 <- max(abs(x$tstat[!x$fixed]))
- max.t <- round(max.t1,d=d)
+ max.t <- round(max.t1, digits = d)
if (max.t < max.t1)
{
@@ -451,7 +448,6 @@
sections <- 0
for (i in 1:nNetworks)
{
- thisNetEff <- netEffects[netEffects$name == netNames[i]]
sections <- sections+1
thisNetTable <- mainLatex(c(1:p)[effects$name == netNames[i]],sections)
table <- rbind(table,thisNetTable)
@@ -470,7 +466,6 @@
for (i in 1:nBehavs)
{
- thisBehEff <- behEffects[behEffects$name == behNames[i]]
sections <- sections+1
thisBehTable <- mainLatex(c(1:p)[effects$name == behNames[i]],sections)
table <- rbind(table,thisBehTable)
Modified: pkg/RSienaTest/changeLog
===================================================================
--- pkg/RSienaTest/changeLog 2012-01-29 17:03:31 UTC (rev 198)
+++ pkg/RSienaTest/changeLog 2012-02-07 12:36:47 UTC (rev 199)
@@ -1,3 +1,16 @@
+2012-02-07 R-forge revision 199 (RSienaTest only)
+ * src/model/variables/DependentVariable.cpp,
+ src/model/variables/EffectValueTable.h,
+ src/model/variables/DiffusionEffectValueTable.h: removing
+ backslashes from within comments.
+ * src/model/variables/DependentVariable.cpp: removing
+ networkVariable conditions so score sum terms are calculated for
+ behaviour rate effects.
+ * src/model/variables/DependentVariable.cpp,
+ src/model/variables/DiffusionEffectValueTable.cpp: correction
+ calculation of average exposure diffusion rate effect.
+ * R/sienatable.r: removal of superfluous variables.
+
2012-01-29 R-forge revision 198
* src/siena07internals.cpp: fix a bug causing initialisation of ML
Modified: pkg/RSienaTest/man/RSiena-package.Rd
===================================================================
--- pkg/RSienaTest/man/RSiena-package.Rd 2012-01-29 17:03:31 UTC (rev 198)
+++ pkg/RSienaTest/man/RSiena-package.Rd 2012-02-07 12:36:47 UTC (rev 199)
@@ -30,8 +30,8 @@
\tabular{ll}{
Package: \tab RSiena\cr
Type: \tab Package\cr
-Version: \tab 1.0.12.198\cr
-Date: \tab 2012-01-29\cr
+Version: \tab 1.0.12.199\cr
+Date: \tab 2012-02-07\cr
License: \tab GPL-2 \cr
LazyLoad: \tab yes\cr
}
Modified: pkg/RSienaTest/src/model/variables/DependentVariable.cpp
===================================================================
--- pkg/RSienaTest/src/model/variables/DependentVariable.cpp 2012-01-29 17:03:31 UTC (rev 198)
+++ pkg/RSienaTest/src/model/variables/DependentVariable.cpp 2012-02-07 12:36:47 UTC (rev 199)
@@ -493,21 +493,20 @@
sumRatesSquared += this->lrate[i] * this->lrate[i];
}
- if (networkVariable())
- {
- if (this->pSimulation()->pModel()->needScores())
- {
- this->calculateScoreSumTerms();
- }
- if(this->symmetric() && this->pSimulation()->pModel()->modelTypeB())
- {
- this->ltotalRate = this->totalRate() * this->totalRate() -
- sumRatesSquared;
- }
- }
+
+ if (this->pSimulation()->pModel()->needScores())
+ {
+ this->calculateScoreSumTerms();
+ }
+ if(this->symmetric() && this->pSimulation()->pModel()->modelTypeB())
+ {
+ this->ltotalRate = this->totalRate() * this->totalRate() -
+ sumRatesSquared;
+ }
+
this->lvalidRates = true;
}
-
+
}
@@ -594,7 +593,7 @@
// Add the contributions of each constant covariate with non-zero parameter
// for the rate functions. The contribution of a constant covariate v to
- // the rate function of an actor i is exp(\alpha v[i]), where \alpha is
+ // the rate function of an actor i is exp(alpha v[i]), where alpha is
// the corresponding parameter. The calculation of the exponentials is
// postponed, though.
@@ -614,7 +613,7 @@
// Add the contributions of each changing covariate with non-zero parameter
// for the rate functions. The contribution of a changing covariate v to
- // the rate function of an actor i is exp(\alpha v[i][h]), where \alpha is
+ // the rate function of an actor i is exp(alpha v[i][h]), where alpha is
// the corresponding parameter, and h is the current period.
// Again, the calculation of the exponentials is postponed.
@@ -634,7 +633,7 @@
// Add the contributions of each behavior variable with non-zero parameter
// for the rate functions. The contribution of a behavior variable v to
- // the rate function of an actor i is exp(\alpha v[i]), where \alpha is
+ // the rate function of an actor i is exp(alpha v[i]), where alpha is
// the corresponding parameter.
// Again, the calculation of the exponentials is postponed.
@@ -703,7 +702,7 @@
{
// Add the contributions of each behavior variable with non-zero parameter
// for the rate functions. The contribution of a behavior variable v to
- // the rate function of an actor i is exp(\alpha v[i]), where \alpha is
+ // the rate function of an actor i is exp(alpha v[i]), where alpha is
// the corresponding parameter.
double rate = 0;
@@ -879,7 +878,7 @@
pBehaviorVariable = dynamic_cast<const BehaviorVariable *>(pSelectedVariable);
if (this == pSelectedVariable)
{
- int totalAlterValue = 0;
+ double totalAlterValue = 0;
double averageAlterValue = 0;
if (pNetwork->outDegree(selectedActor) > 0)
{
@@ -1203,7 +1202,7 @@
double timesRate = 0;
for (int i = 0; i < this->n(); i++)
{
- int totalAlterValue = 0;
+ double totalAlterValue = 0;
double averageAlterValue = 0;
if (pNetwork->outDegree(i) > 0)
{
Modified: pkg/RSienaTest/src/model/variables/DiffusionEffectValueTable.cpp
===================================================================
--- pkg/RSienaTest/src/model/variables/DiffusionEffectValueTable.cpp 2012-01-29 17:03:31 UTC (rev 198)
+++ pkg/RSienaTest/src/model/variables/DiffusionEffectValueTable.cpp 2012-02-07 12:36:47 UTC (rev 199)
@@ -78,7 +78,7 @@
double DiffusionEffectValueTable::value(int numerator, int denominator)
{
int arrayIndex = ((numerator - 1) * this->ldenominatorRange) +
- (denominator - 1);
+ (denominator - 1);
if (this->lparameterValues[arrayIndex] != this->lparameter)
{
@@ -86,7 +86,7 @@
// parameter, hence we must recalculate the value.
this->lvalues[arrayIndex] = exp(this->lparameter *
- numerator / denominator);
+ (double)numerator / (double)denominator);
this->lparameterValues[arrayIndex] = this->lparameter;
}
Modified: pkg/RSienaTest/src/model/variables/DiffusionEffectValueTable.h
===================================================================
--- pkg/RSienaTest/src/model/variables/DiffusionEffectValueTable.h 2012-01-29 17:03:31 UTC (rev 198)
+++ pkg/RSienaTest/src/model/variables/DiffusionEffectValueTable.h 2012-02-07 12:36:47 UTC (rev 199)
@@ -19,7 +19,7 @@
* This class provides a look-up table supporting effective calculation of
* diffusion effects on rate functions. The value of the effect for an
* argument <i>i</i> in [0, <i>n</i>) is defined as
- * exp(\alpha <i>f</i>(<i>i</i>)), where \alpha is a parameter associated
+ * exp(alpha <i>f</i>(<i>i</i>)), where alpha is a parameter associated
* with this effect and <i>f</i> is an arbitrary function. Since calculating
* exponentials is expensive, the values are stored for each <i>i</i> for
* later reuse as long as the parameter remains unchanged.
Modified: pkg/RSienaTest/src/model/variables/EffectValueTable.h
===================================================================
--- pkg/RSienaTest/src/model/variables/EffectValueTable.h 2012-01-29 17:03:31 UTC (rev 198)
+++ pkg/RSienaTest/src/model/variables/EffectValueTable.h 2012-02-07 12:36:47 UTC (rev 199)
@@ -19,7 +19,7 @@
* This class provides a look-up table supporting effective calculation of
* structural effects on rate functions. The value of the effect for an
* argument <i>i</i> in [0, <i>n</i>) is defined as
- * exp(\alpha <i>f</i>(<i>i</i>)), where \alpha is a parameter associated
+ * exp(alpha <i>f</i>(<i>i</i>)), where alpha is a parameter associated
* with this effect and <i>f</i> is an arbitrary function. Since calculating
* exponentials is expensive, the values are stored for each <i>i</i> for
* later reuse as long as the parameter remains unchanged.
More information about the Rsiena-commits
mailing list