[Rsiena-commits] r171 - in pkg: RSiena RSiena/R RSiena/inst/doc RSiena/man RSienaTest RSienaTest/R RSienaTest/doc RSienaTest/inst/doc RSienaTest/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Sep 7 18:10:08 CEST 2011
Author: ripleyrm
Date: 2011-09-07 18:10:08 +0200 (Wed, 07 Sep 2011)
New Revision: 171
Modified:
pkg/RSiena/DESCRIPTION
pkg/RSiena/R/globals.r
pkg/RSiena/R/print07Report.r
pkg/RSiena/R/printDataReport.r
pkg/RSiena/R/printInitialDescription.r
pkg/RSiena/R/robmon.r
pkg/RSiena/R/siena07gui.r
pkg/RSiena/R/siena08.r
pkg/RSiena/R/sienaprint.r
pkg/RSiena/changeLog
pkg/RSiena/inst/doc/RSiena_Manual.pdf
pkg/RSiena/man/siena08.Rd
pkg/RSiena/man/simstats0c.Rd
pkg/RSienaTest/DESCRIPTION
pkg/RSienaTest/R/globals.r
pkg/RSienaTest/R/initializeFRAN.r
pkg/RSienaTest/R/printInitialDescription.r
pkg/RSienaTest/R/siena08.r
pkg/RSienaTest/changeLog
pkg/RSienaTest/doc/RSiena_Manual.tex
pkg/RSienaTest/inst/doc/RSiena_Manual.pdf
pkg/RSienaTest/man/RSiena-package.Rd
pkg/RSienaTest/man/siena08.Rd
Log:
siena08 bugs, other minor changes.
Modified: pkg/RSiena/DESCRIPTION
===================================================================
--- pkg/RSiena/DESCRIPTION 2011-08-22 10:35:09 UTC (rev 170)
+++ pkg/RSiena/DESCRIPTION 2011-09-07 16:10:08 UTC (rev 171)
@@ -1,8 +1,8 @@
Package: RSiena
Type: Package
Title: Siena - Simulation Investigation for Empirical Network Analysis
-Version: 1.0.12.170
-Date: 2011-08-22
+Version: 1.0.12.171
+Date: 2011-09-07
Author: Various
Depends: R (>= 2.10.0)
Imports: Matrix
Modified: pkg/RSiena/R/globals.r
===================================================================
--- pkg/RSiena/R/globals.r 2011-08-22 10:35:09 UTC (rev 170)
+++ pkg/RSiena/R/globals.r 2011-09-07 16:10:08 UTC (rev 171)
@@ -33,6 +33,7 @@
type <- match.arg(type)
beverbose <<- verbose
besilent <<- silent
+ noReportFile <<- FALSE
if (type =='w')
{
x$outf <<- file(paste(projname, ".out", sep=""), open="w")
@@ -166,14 +167,16 @@
##@PrtOutMat Reporting
PrtOutMat<- function(mat, dest)
{
+ testing <- Sys.getenv("RSIENATESTING")
+ testing <- testing != ""
if (missing(dest))
{
- Report(format(t(mat), scientific=FALSE),
+ Report(format(t(mat), scientific=testing),
sep=c(rep.int(" ", ncol(mat) - 1), "\n"))
}
else
{
- Report(format(t(mat), scientific=FALSE),
+ Report(format(t(mat), scientific=testing),
sep=c(rep.int(" ", ncol(mat) - 1), "\n"),
hdest=deparse(substitute(dest)))
Report("\n", hdest=deparse(substitute(dest)))
Modified: pkg/RSiena/R/print07Report.r
===================================================================
--- pkg/RSiena/R/print07Report.r 2011-08-22 10:35:09 UTC (rev 170)
+++ pkg/RSiena/R/print07Report.r 2011-09-07 16:10:08 UTC (rev 171)
@@ -162,8 +162,8 @@
Report(c("covariance/correlation matrix of X can be found using\n",
"summary(ans) within R,",
" or by using the 'verbose' option in Siena07.\n "), sep = "", outf)
- Report(c('Derivative matrix of expected statistics X by',
- 'parameters:\n\n '), lf)
+ Report(c("Derivative matrix of expected statistics X by",
+ "parameters:\n\n"), lf)
PrtOutMat(z$dfrac, lf)
Report('Covariance matrix of X (correlations below the diagonal):\n',
lf)
Modified: pkg/RSiena/R/printDataReport.r
===================================================================
--- pkg/RSiena/R/printDataReport.r 2011-08-22 10:35:09 UTC (rev 170)
+++ pkg/RSiena/R/printDataReport.r 2011-09-07 16:10:08 UTC (rev 171)
@@ -11,6 +11,13 @@
##@DataReport siena07 Print report
DataReport <- function(z, x, f)
{
+ if (z$maxlike)
+ {
+ Report(c(z$nrunMH,
+ "MCMC steps per RM step (multiplication factor =",
+ x$mult), outf)
+ Report(")\n", outf)
+ }
## f could be a group, but has attributes like a group even if not!
oneMode <- attr(f, "types") == "oneMode"
bipartite <- attr(f, "types") == "bipartite"
@@ -88,7 +95,7 @@
width = 4), '.\n'),sep='', outf)
}
}
- else
+ else if (!z$maxlike)
{
Report("unconditional moment estimation.\n", outf)
@@ -107,6 +114,10 @@
}
Report('is 1.0.\n', outf)
}
+ else
+ {
+ Report("Maximum likelihood estimation\n", outf)
+ }
if (z$FinDiff.method)
{
Report(c('Standard errors are estimated with the finite difference',
Modified: pkg/RSiena/R/printInitialDescription.r
===================================================================
--- pkg/RSiena/R/printInitialDescription.r 2011-08-22 10:35:09 UTC (rev 170)
+++ pkg/RSiena/R/printInitialDescription.r 2011-09-07 16:10:08 UTC (rev 171)
@@ -72,7 +72,7 @@
{
nties <- nties / 2
}
- periodFromStart <- data[[group]]$observations
+ periodFromStart <- periodFromStart + data[[group]]$observations
}
## now do the format
tmp <- rbind(format(round(density, 3), nsmall=3, width=7),
Modified: pkg/RSiena/R/robmon.r
===================================================================
--- pkg/RSiena/R/robmon.r 2011-08-22 10:35:09 UTC (rev 170)
+++ pkg/RSiena/R/robmon.r 2011-09-07 16:10:08 UTC (rev 171)
@@ -18,7 +18,7 @@
z$FinDiff.method<- x$FinDiff.method
z$n <- 0
z$OK <- TRUE
- z$error<- FALSE
+ z$error <- FALSE
z$restarted <- FALSE
z$DerivativeProblem <- FALSE
z$ForceFinDifPhase1 <- FALSE
@@ -28,6 +28,10 @@
z$gain <- x$firstg
z$haveDfra <- FALSE
z$maxlike <- x$maxlike
+ if (z$maxlike && !is.batch())
+ {
+ tkconfigure(z$tkvars$phaselabel, text="MCMC Burnin")
+ }
#######################################################
##do initial setup call of FRAN
#######################################################
@@ -36,6 +40,10 @@
x$FRAN <- getFromNamespace(x$FRANname, pos=grep("RSiena", search())[1])
}
z <- x$FRAN(z, x, INIT=TRUE, initC=FALSE, ...)
+ if (z$maxlike && !is.batch())
+ {
+ tkconfigure(z$tkvars$phaselabel, text="Phase")
+ }
##
##if conditional, FRAN changes z$theta etc
#######################################################
@@ -52,7 +60,8 @@
cl <- makeCluster(clusterString, type = "SOCK",
outfile = "cluster.out")
clusterCall(cl, library, pkgname, character.only = TRUE)
- clusterSetupRNG(cl, seed = as.integer(runif(6, max=.Machine$integer.max)))
+ clusterSetupRNG(cl, seed = as.integer(runif(6,
+ max=.Machine$integer.max)))
clusterCall(cl, storeinFRANstore, FRANstore())
if (initC)
{
@@ -66,7 +75,10 @@
}
z$newFixed <- rep(FALSE, z$pp)
z$AllNowFixed <- FALSE
- z$dinv <- matrix(NA, nrow = z$pp, ncol = z$pp)
+ if (!z$haveDfra)
+ {
+ z$dinv <- matrix(NA, nrow = z$pp, ncol = z$pp)
+ }
z$scale <- rep(0.1, z$pp)
Report('\n', outf)
Report('\nStochastic approximation algorithm.\n', cf)
@@ -79,13 +91,15 @@
}
Report(c('Initial value for gain parameter = ', format(z$gain),
'.\nStart of the algorithm.\n'), cf, sep='')
- Report('Target function values are \n', cf)
- ftargets <- format(z$targets, width = 10, nsmall = 4)
- fnum<- format(1 : z$pp, width = 3)
+ Report('Observed function values are \n', cf)
+ targets <- if (!z$maxlike) z$targets else z$maxlikeTargets
+ ftargets <- format(targets, width = 10, nsmall = 4)
+ fnum <- format(1 : z$pp, width = 3)
Report(c(paste(fnum, '. ', ftargets, sep = '')), cf, fill=80)
z$epsilon<- pmin(0.1,z$scale)
- z$epsilon[z$posj]<- 0.1 * z$theta[z$posj]
- z$theta0<- z$theta ## store starting value without any conditioning variables
+ z$epsilon[z$posj] <- 0.1 * z$theta[z$posj]
+ z$theta0 <- z$theta
+ ## store starting value without any conditioning variables
z$anyposj <- any(z$posj)
z$resist <- rep(1, z$pp)
z$n1 <- 7 + 3 * z$pp
Modified: pkg/RSiena/R/siena07gui.r
===================================================================
--- pkg/RSiena/R/siena07gui.r 2011-08-22 10:35:09 UTC (rev 170)
+++ pkg/RSiena/R/siena07gui.r 2011-09-07 16:10:08 UTC (rev 171)
@@ -95,7 +95,8 @@
# cat('here\n')
list(tt=tt, pb=progressbar, earlyEndPhase2=button2, current=text1,
quasi=text2, deviations=text3, phase=phase, subphase=subphase,
- iteration=iteration, subphaselabel=subphaselabel)
+ iteration=iteration, subphaselabel=subphaselabel,
+ phaselabel=phaselabel)
}
Modified: pkg/RSiena/R/siena08.r
===================================================================
--- pkg/RSiena/R/siena08.r 2011-08-22 10:35:09 UTC (rev 170)
+++ pkg/RSiena/R/siena08.r 2011-09-07 16:10:08 UTC (rev 171)
@@ -9,7 +9,7 @@
# * collection of Siena fits.
# *****************************************************************************/
##@siena08 siena08
-siena08 <- function(..., projname="sienaMeta", bound=5, alpha=0.05)
+siena08 <- function(..., projname="sienaMeta", bound=5, alpha=0.05, maxit=20)
{
dots <- as.list(substitute(list(...)))[-1] ##first entry is the word 'list'
if (length(dots) == 0)
@@ -62,9 +62,9 @@
projname=rep(projnames[i], n),
theta=x$theta,
effects=
- paste(format(x$effects$type,
+ paste(format(x$requestedEffects$type,
width=5),
- x$effects$effectName,
+ x$requestedEffects$effectName,
sep=": "),
tconv=x$tconv,
version=rep(x$version, n),
@@ -102,7 +102,7 @@
method="no correlation test")
}
regfit <- iwlsm(theta ~ 1, psi=psi.iwlsm, data=x1,
- ses=x1$se^2)
+ ses=x1$se^2, maxit=maxit)
regfit$terms <- NA
regfit$model <- NULL
regfit$psi <- NULL
Modified: pkg/RSiena/R/sienaprint.r
===================================================================
--- pkg/RSiena/R/sienaprint.r 2011-08-22 10:35:09 UTC (rev 170)
+++ pkg/RSiena/R/sienaprint.r 2011-09-07 16:10:08 UTC (rev 171)
@@ -12,211 +12,236 @@
##@print.siena Methods
print.siena <- function(x, ...)
{
- if (!inherits(x, "siena"))
+ if (!inherits(x, "siena"))
+ {
stop("not a legitimate Siena data object")
- cat('Dependent variables: ', paste(names(x$depvars), collapse=", "), "\n")
- cat('Number of waves:', x$observations, "\n")
- if (!is.null(x$nodesets))
- {
- tmp <- cbind(c('Nodesets',
- paste(names(x$nodesets), collapse=", ")),
- c('Number of nodes', sapply(x$nodesets, length)))
- print(tmp)
- }
- if (length(x$cCovars) > 0)
- {
- cat('Constant covariates: ', paste(names(x$cCovars), collapse=", "), "\n")
- }
- if (length(x$vCovars) > 0)
- {
- cat('Changing covariates: ',
- paste(names(x$vCovars), collapse = ", "), "\n")
- }
- if (length(x$dycCovars) > 0)
- {
- cat('Constant dyadic covariates: ',
- paste(names(x$dycCovars), collapse=", "), "\n")
- }
- if (length(x$dyvCovars) > 0)
- {
- cat('Changing dyadic covariates: ',
- paste(names(x$dyvCovars), collapse=", "), "\n")
- }
- attrs <- attributes(x)
- highers <- attrs[["higher"]]
- disjoints <- attrs[["disjoint"]]
- atleastones <- attrs[["atLeastOne"]]
- if (any(highers))
- {
- cat("Higher: ", names(highers)[highers], "\n")
- }
- if (any(disjoints))
- {
- cat("Disjoint: ", names(disjoints)[disjoints], "\n")
- }
- if (any(atleastones))
- {
- cat("atLeatOne: ", names(atleastones)[atleastones], "\n")
- }
- invisible(x)
+ }
+ cat('Dependent variables: ', paste(names(x$depvars), collapse=", "), "\n")
+ cat('Number of waves:', x$observations, "\n")
+ if (!is.null(x$nodesets))
+ {
+ tmp <- cbind(c('Nodesets',
+ paste(names(x$nodesets), collapse=", ")),
+ c('Number of nodes', sapply(x$nodesets, length)))
+ print(tmp)
+ }
+ if (length(x$cCovars) > 0)
+ {
+ cat('Constant covariates: ', paste(names(x$cCovars), collapse=", "), "\n")
+ }
+ if (length(x$vCovars) > 0)
+ {
+ cat('Changing covariates: ',
+ paste(names(x$vCovars), collapse = ", "), "\n")
+ }
+ if (length(x$dycCovars) > 0)
+ {
+ cat('Constant dyadic covariates: ',
+ paste(names(x$dycCovars), collapse=", "), "\n")
+ }
+ if (length(x$dyvCovars) > 0)
+ {
+ cat('Changing dyadic covariates: ',
+ paste(names(x$dyvCovars), collapse=", "), "\n")
+ }
+ attrs <- attributes(x)
+ highers <- attrs[["higher"]]
+ disjoints <- attrs[["disjoint"]]
+ atleastones <- attrs[["atLeastOne"]]
+ if (any(highers))
+ {
+ cat("Higher: ", names(highers)[highers], "\n")
+ }
+ if (any(disjoints))
+ {
+ cat("Disjoint: ", names(disjoints)[disjoints], "\n")
+ }
+ if (any(atleastones))
+ {
+ cat("atLeatOne: ", names(atleastones)[atleastones], "\n")
+ }
+ invisible(x)
}
##@print.sienaGroup Methods
print.sienaGroup <- function(x, ...)
{
- if (!inherits(x, "sienaGroup"))
+ if (!inherits(x, "sienaGroup"))
+ {
stop("not a legitimate Siena group data object")
- att <- attributes(x)
- cat('Dependent variables: \n')
- cat(paste(att$netnames, ":", att$types),'\n')
- cat('Total number of periods:', att$observations)
- cat("\nmore to be added!\n")
- invisible(x)
+ }
+ att <- attributes(x)
+ cat('Dependent variables: \n')
+ cat(paste(att$netnames, ":", att$types),'\n')
+ cat('Total number of periods:', att$observations)
+ cat("\nmore to be added!\n")
+ invisible(x)
}
##@print.sienafit Methods
print.sienaFit <- function(x, tstat=TRUE, ...)
{
- if (!inherits(x, "sienaFit"))
+ if (!inherits(x, "sienaFit"))
+ {
stop("not a legitimate Siena model fit")
- if (!x$OK)
- {
- cat("Error end of estimation algorithm\n")
- }
- else if (x$termination == "UserInterrupt")
- {
- cat("User interrupted run, object possibly incomplete\n")
- }
- else
- {
- cat(c("Estimates, standard errors and t-statistics for",
- "convergence\n\n"))
- tmp <- sienaFitThetaTable(x, tstat=tstat)
- mydf <- tmp$mydf
- mymat <- as.matrix(mydf)
- mymat[, 'value'] <- format(round(mydf$value, digits=4))
- mymat[, 'se'] <- format(round(mydf$se, digits=4))
- mymat[, 'tstat'] <- format(round(mydf$tstat, digits=4))
- mymat[is.na(mydf$tstat), 'tstat'] <- ' '
- mymat[, 'type'] <- format(mymat[, 'type'])
- mymat[, 'text'] <- format(mymat[, 'text'])
- mymat[mydf$row < 1, 'row'] <-
- format(mydf[mydf$row < 1, 'row'])
- mymat[mydf[,'row'] >= 1, 'row'] <-
- paste(format(mydf[mydf$row >= 1, 'row']), '.', sep='')
- mymat <- rbind(c(rep("", 4), "Estimate", "", "Standard", "",
- "t statistic"),
- c(rep("", 6), " Error", "", ""), mymat)
- mymat <- apply(mymat, 2, format)
- tmp1 <- apply(mymat, 1, function(x) paste(x, collapse=" "))
- addtorow <- tmp$addtorow
- for (i in 1:length(tmp1))
- {
- if (length(addtorow$command) > 0)
- {
- for (j in 1:length(addtorow$command))
- {
- ii <- match(i-1, addtorow$pos[[j]])
- if (!is.na(ii))
- if (i == 2 | addtorow$command[j] == 'Network Dynamics')
- cat( addtorow$command[j], '\n')
- else
- cat('\n', addtorow$command[j], '\n', sep='')
- }
- }
- cat(tmp1[i], '\n')
- }
+ }
+ if (!x$OK)
+ {
+ cat("Error end of estimation algorithm\n")
+ }
+ else if (x$termination == "UserInterrupt")
+ {
+ cat("User interrupted run, object possibly incomplete\n")
+ }
+ else
+ {
+ cat("Estimates, standard errors and convergence t-ratios\n\n")
+ tmp <- sienaFitThetaTable(x, tstat=tstat)
+ mydf <- tmp$mydf
+ mymat <- as.matrix(mydf)
+ mymat[, 'value'] <- format(round(mydf$value, digits=4))
+ mymat[, 'se'] <- format(round(mydf$se, digits=4))
+ mymat[, 'tstat'] <- paste(" ", format(round(mydf$tstat, digits=4)))
+ mymat[is.na(mydf$tstat), 'tstat'] <- ' '
+ mymat[, 'type'] <- format(mymat[, 'type'])
+ mymat[, 'text'] <- format(mymat[, 'text'])
+ mymat[mydf$row < 1, 'row'] <-
+ format(mydf[mydf$row < 1, 'row'])
+ mymat[mydf[,'row'] >= 1, 'row'] <-
+ paste(format(mydf[mydf$row >= 1, 'row']), '.', sep='')
+ mymat <- rbind(c(rep("", 4), "Estimate", "", "Standard", "",
+ "Convergence"),
+ c(rep("", 6), " Error", "", " t-ratio"), mymat)
+ mymat <- apply(mymat, 2, format)
+ tmp1 <- apply(mymat, 1, function(x) paste(x, collapse=" "))
+ addtorow <- tmp$addtorow
+ for (i in 1:length(tmp1))
+ {
+ if (length(addtorow$command) > 0)
+ {
+ for (j in 1:length(addtorow$command))
+ {
+ ii <- match(i-1, addtorow$pos[[j]])
+ if (!is.na(ii))
+ if (i == 2 | addtorow$command[j] == 'Network Dynamics')
+ cat( addtorow$command[j], '\n')
+ else
+ cat('\n', addtorow$command[j], '\n', sep='')
+ }
+ }
+ cat(tmp1[i], '\n')
+ }
- cat("\nTotal of", x$n, "iteration steps.\n\n")
- if (x$termination == "UserInterrupt")
- cat(" \n*** Warning ***",
- "Estimation terminated early at user request.\n")
- }
- invisible(x)
+ cat("\nTotal of", x$n, "iteration steps.\n\n")
+ if (x$termination == "UserInterrupt")
+ cat(" \n*** Warning ***",
+ "Estimation terminated early at user request.\n")
+ }
+ invisible(x)
}
##@summary.sienaFit Methods
summary.sienaFit <- function(object, ...)
{
if (!inherits(object, "sienaFit"))
+ {
stop("not a legitimate Siena model fit")
+ }
class(object) <- c("summary.sienaFit", class(object))
object
}
##@print.summary.sienaFit Methods
print.summary.sienaFit <- function(x, ...)
{
- if (!inherits(x, "summary.sienaFit"))
+ if (!inherits(x, "summary.sienaFit"))
+ {
stop("not a legitimate summary of a Siena model fit")
- print.sienaFit(x)
- if (sum(x$test) > 0) ## we have some score tests
- {
- testn <- sum(x$test)
- if (x$maxlike)
- {
- cat("Score test <c>\n\n")
- }
- else
- {
- cat("Generalised score test <c>\n\n")
- }
- cat("Testing the goodness-of-fit of the model restricted by\n")
- j <- 0
- for (k in 1:x$pp)
- if (x$test[k])
- {
- j <- j+1
- cat(c(" (",j,") ",
- format(paste(x$requestedEffects$type[k], ": ",
- x$requestedEffects$effectName[k],
- sep=""),
- width=50), " = ",
- sprintf("%8.4f", x$theta[k]),"\n"),
- sep = "")
- }
- cat("_________________________________________________\n")
- cat(" ")
- cat(" \n")
- if (testn > 1)
- cat('Joint test:\n-----------\n')
- cat(c(' c = ',sprintf("%8.4f", x$testresOverall),
- ' d.f. = ',j,' p-value '), sep='')
- pvalue <- 1 - pchisq(x$testresOverall, j)
+ }
+ print.sienaFit(x)
+ if (sum(x$test) > 0) ## we have some score tests
+ {
+ testn <- sum(x$test)
+ if (x$maxlike)
+ {
+ cat("Score test <c>\n\n")
+ }
+ else
+ {
+ cat("Generalised score test <c>\n\n")
+ }
+ cat("Testing the goodness-of-fit of the model restricted by\n")
+ j <- 0
+ for (k in 1:x$pp)
+ {
+ if (x$test[k])
+ {
+ j <- j + 1
+ cat(c(" (", j, ") ",
+ format(paste(x$requestedEffects$type[k], ": ",
+ x$requestedEffects$effectName[k],
+ sep=""),
+ width=50), " = ",
+ sprintf("%8.4f", x$theta[k]),"\n"),
+ sep = "")
+ }
+ }
+ cat("_________________________________________________\n")
+ cat(" ")
+ cat(" \n")
+ if (testn > 1)
+ {
+ cat('Joint test:\n-----------\n')
+ }
+ cat(c(' c = ',sprintf("%8.4f", x$testresOverall),
+ ' d.f. = ',j,' p-value '), sep='')
+ pvalue <- 1 - pchisq(x$testresOverall, j)
if (pvalue < 0.0001)
+ {
cat('< 0.0001\n')
+ }
else
+ {
cat(c('= ', sprintf("%8.4f\n", pvalue)), sep = '')
+ }
if (testn==1)
+ {
cat(c('\n one-sided (normal variate): ',
- sprintf("%8.4f",x$testresulto[1])), sep = '')
+ sprintf("%8.4f", x$testresulto[1])), sep = '')
+ }
if (testn> 1)
{
cat('\n\n')
for (k in 1:j)
{
- cat(c('(',k,') tested separately:\n'),sep='')
+ cat(c('(', k, ') tested separately:\n'), sep='')
cat('-----------------------\n')
cat(' - two-sided:\n')
cat(c(' c = ', sprintf("%8.4f", x$testresult[k]),
' d.f. = 1 p-value '), sep = '')
pvalue<- 1-pchisq(x$testresult[k],1)
if (pvalue < 0.0001)
+ {
cat('< 0.0001\n')
+ }
else
+ {
cat(c('= ', sprintf("%8.4f", pvalue), '\n'), sep = '')
+ }
cat(c(' - one-sided (normal variate): ',
- sprintf("%8.4f", x$testresulto[k])), sep = '')
- if (k<j)
+ sprintf("%8.4f", x$testresulto[k])), sep = '')
+ if (k < j)
+ {
cat('\n\n')
+ }
}
}
cat(' \n_________________________________________________\n\n')
cat('One-step estimates: \n\n')
for (i in 1 : x$pp)
{
- onestepest<- x$oneStep[i]+x$theta[i]
- cat(c(format(paste(x$requestedEffects$type[i],': ',
- x$requestedEffects$effectName[i], sep = ''),
- width=50),
+ onestepest <- x$oneStep[i] + x$theta[i]
+ cat(c(format(paste(x$requestedEffects$type[i], ': ',
+ x$requestedEffects$effectName[i], sep = ''),
+ width=50),
sprintf("%8.4f", onestepest), '\n'), sep = "")
}
cat('\n')
@@ -225,7 +250,7 @@
{
cat("Covariance matrix of estimates (correlations below diagonal)\n\n")
covcor <- x$covtheta
- correl <- x$covtheta/sqrt(diag(x$covtheta))[row(x$covtheta)]/
+ correl <- x$covtheta / sqrt(diag(x$covtheta))[row(x$covtheta)] /
sqrt(diag(x$covtheta))[col(x$covtheta)]
covcor[lower.tri(covcor)] <- correl[lower.tri(correl)]
printMatrix(format(round(t(covcor),digits=3),width=12))
@@ -233,7 +258,8 @@
printMatrix(format(round(x$dfra,digits=3),width=12))
cat("\nCovariance matrix of X (correlations below diagonal):\n\n")
covcor <- x$msf
- correl <- x$msf/sqrt(diag(x$msf))[row(x$msf)]/sqrt(diag(x$msf))[col(x$msf)]
+ correl <- x$msf / sqrt(diag(x$msf))[row(x$msf)] /
+ sqrt(diag(x$msf))[col(x$msf)]
covcor[lower.tri(covcor)] <- correl[lower.tri(correl)]
printMatrix(format(round(t(covcor),digits=3),width=12))
}
@@ -270,10 +296,16 @@
{
cat(" Conditional simulation:")
if (x$condname != '')
- cat('conditioned on', x$condname,'\n')
+ {
+ cat('conditioned on', x$condname, '\n')
+ }
else
+ {
if (x$condvarno > 0)
+ {
cat('conditioned on First variable')
+ }
+ }
}
cat(" Model Type:", ModelTypeStrings[x$modelType], "\n")
invisible(x)
@@ -442,12 +474,12 @@
}
else ##html
{
- # use <- addtorow$command != 'Network Dynamics'
+ ## use <- addtorow$command != 'Network Dynamics'
addtorow$command <- paste("<TR> <TD colspan=9 align=left>",
addtorow$command,
"</TD> </TR> <TR> </TR> \n")
- # use[1] <- FALSE
- # addtorow$command[use] <- paste('\\\\ ', addtorow$command[use])
+ ## use[1] <- FALSE
+ ## addtorow$command[use] <- paste('\\\\ ', addtorow$command[use])
}
}
else
@@ -459,7 +491,8 @@
mydf[mydf[,'row'] >= 1, 'row'] <- paste(format(mydf[mydf$row >= 1,
'row']), '.', sep='')
tmp <- list(xtable::xtable(mydf, caption=caption, label=label, align=align,
- digits=digits, display=display), add.to.row=addtorow,
+ digits=digits, display=display),
+ add.to.row=addtorow,
include.colnames=FALSE, include.rownames=FALSE, ...)
class(tmp) <- c("xtable.sienaFit", "xtable")
tmp
Modified: pkg/RSiena/changeLog
===================================================================
--- pkg/RSiena/changeLog 2011-08-22 10:35:09 UTC (rev 170)
+++ pkg/RSiena/changeLog 2011-09-07 16:10:08 UTC (rev 171)
@@ -1,3 +1,21 @@
+2011-09-07 R-forge revision 171
+
+ * R/globals.r, R/siena08.r, man/siena08.Rd: fix bugs in siena08 which was
+ using out of date effects object which included unselected underlying
+ effects from interactions, and report would not print if it had
+ previously been displayed. New parameter to control maximum numnber of
+ iterations.
+ * R/printInitialDescription.r: fix bug in description of more than two
+ groups.
+ * R/initializeFRAN.r: (RSienaTest only) add some validation to
+ updateTheta.
+ * R/globals.r: (To Rsiena also now) allow format of printed matrices to
+ be controlled by an environment variable. Designed for use in testing as
+ there are rounding incompatibilities between platforms.
+ * man/simstats0c.Rd: (RSiena only) updated page.
+ * R/sienaprint.r, R/printDataReport.r, R/print07report.r, R/robmon.r,
+ R/siena07Gui.r: (RSiena only) as for revision 168 in RSienatest.
+
2011-08-22 R-forge revision 170
* doc/RSiena_manual.tex: changes mainly for non-directed models
Modified: pkg/RSiena/inst/doc/RSiena_Manual.pdf
===================================================================
--- pkg/RSiena/inst/doc/RSiena_Manual.pdf 2011-08-22 10:35:09 UTC (rev 170)
+++ pkg/RSiena/inst/doc/RSiena_Manual.pdf 2011-09-07 16:10:08 UTC (rev 171)
@@ -49,15 +49,19 @@
endstream
endobj
439 0 obj <<
-/Length 1161
+/Length 1168
/Filter /FlateDecode
>>
stream
-xÚµVKsÛ6¾ëWðÍ ÙÄIÓ©ÝÔROIK¨ùPù°«þúî "ÚòdÜfD<v?ì.¾Ý¶>ÎØw¾o³7x I³<ãÑò.LQ&y¤£2Zn¢/äZ×s¡È Ëy0AîvþÇògÐÌO59WTÁóZ·kjí%¸¤TcUP%²ÀhÂyúÀÃ9׿¹µûÒ s¢ ¬ZÎsAÊË^Ò·Ôk/jûçÆ´×ã)Í*~JÖ9ÏY[½iüìf?AÂüóÍvN4õ¶æ
-mÏ©JSø{mµ=ª¹óß_ÿm~Ç2IÉ{³×m_ûSÁ,zÝÛ9'Ý<æ°Ç]w?úá+ãʯñ®)K³5ÎK.2/*ò6]Û¡ðB\xÁ8GgD¸ZÎ8ÀÕg)U8ÊBEëjö×,qþß-ÒaáÍGïÙoð{=Æ#r|ít+h¡rÌ92KRGçͪë[½îÏ â æ*8À9<§<OW7þFóá(9û¥ìÈî (/¨ ¹
®ª©!®ROõéz»=.e$sÖï_U{ÛÚµK ÞÇGðb÷~ã²Ö塳Ýs;Z;¹× YwöÓuSíÞc÷mû<¹ iñTö(ÛVcúäô;ÝûÑZ·5g¤úqßøAO½+°nW£Û¨rç×+È&pl6HæÒ³E0ÀSTóà"Q#NÈî¥óËkd"ÙÞà "M^¯!ßl½õÓ¾ _<O¤lµ®ìzî6nÀëQz³ñ룦ôs°È²j\ø2j·Ñ³µÛ³è;ê´ ëöRǶWbB3þ\¼Þ°Ò§@H«×eÌyOî'P̹K& \ûê>.ÿÇXdç]¥àD××úoìÿ3³sfCS©"Ë
-g_Ç[TÚ5
-×%KÈùR°zòÙ><©(9Íø±¢¸ ò¸´ Öï|ÙH Ë¥ÓÕ%¦dR°%~²rÉbüªCi6gLË¡äű¾Xs8-¹ÒÕU h*óÏj|Ú¶v5¸ÜÅŽv^ÜÏ!z¬êݾìÀ`ZÌpáÐõ¦:c7D £)Üà$·ÏmWT&r4_$RÂ
ây2\Î}íd¥;g8}÷H°`t[Z_ÏÃýç#|áþ4É¿ä${!È\ø9äµÃh¸¶uxdA-¦ÁÜࢯ@ÙÇÖö½©¿=$Ý ôL]ùjäH]k×'aõ§Áv F²\#g3²Ó&<Pþ3À»Ì:ÐÀÑvkÚ JÄÓªõn×"/4$ð*3Û2äÅ´
-`L9£+ü»,${)TxØNË5<´þÓö
+xÚµVKsÛ6¾ëWðÎ $ØÄIÓ©ÝÔROIK¨ùPIÊ®úë»hËqg:ñØý°»øv,ÚD,ú8cßù¾]ÌÞ|àE$$-TÁ£Å]$XNäQ3*£Å:úB®uìu')ä®íâ??¦:Õä<§9,1¯u;·¦Ñ^P²KÊ\ `4E`4å<ï-ÀÃ9׿¹µ»Ê JÍPAV-b%H[{ÙKúzíycÿ\®÷z<£E.§cPÐûÊuNåsgVV¯[?û¥ÝÅ H¾ÙÎieÞöQ£íæYæoì±vÀÁÁCµwþûëß²õq"Ó¼7;Ý
+µiPp8,È|Ð9éãÃ'vÕÿè·nö_ÏMµöïÚª2ã¼ÄÀg*/K¥¥·inv©ñ¥w§óÅ
Ç>Gg´¸ZÌ8ÀñÍ0üLE«zö×,uþß-ÒaáÍGïÛÙoð{=&#rríøä+iÜѱ ®(ä¤ê|»\öC§WÃYã@ $<OÎárØ6ÿtuséïW§DùÈà¯,cG®O at yIð!ÈÍm½¯àâÚB+sò©y0ý`7Ç¥R&t~ÿªÞÙή\:ÁôÆ8Î<¢»÷®½íÛ)ÀÐRØɽȺ㴮Úz·L8v×µÏ
+¡Í
+ #vîQ6ÆdR9¶zð£î:kT¤Ýã¾ñé
+zW`Ý®G·Qåί×[àØgÚç8`§¨æÁE¢Ú8!?@¸o![+ç .<l0*D²»D½ZAöÙfã§C¾xÈ$Y]ÛÕ(<´]Ò×
+¢fí×GLåç`#e%T¼ð/eÔm¢gk·gÑwÔiq:Öíem¯Ä$fü ¹x½aeOV¯+ó29w?ÎõD2Ià¢ÜWWôi,pù?Æ¢8ïB"'ºY¿Ö´äxcÿÙ3ÚYåd±µáìñëxZ»âÚ²d)9_ªRVB>Û'EÑ+ [H`ýÖz^6½Q]aJ¦¥ kPòà'K,ÆO :Tf}Æ4
+@Ç*úbIVpZr¥Û¬« .ÑTæ+Õú´íìrïrwÚyqC<õ&X5»}ÙÁ´á¡ÇúÜn@A3¸ÁI(nÛSÊÑt|H çÉtr}8÷µ[¥îá0ôÝ#
+6ÂÑ]e}=÷¯F ùÂý.hª¾ä´x!È^ø9äµÃh¸¶MxrA-§Íer/¾e;;¦ùö¬tÐX:uæËc u]Õö¶I4)r-ÈVð\ûÎ /!ë@G»éf(O«Ö»m¼ÐhfÂÍlªÓ*1å¬ôïaì²ì ¤ä!Ór
+hH×
endstream
endobj
429 0 obj <<
@@ -229,33 +233,25 @@
/Type /ObjStm
/N 100
/First 899
-/Length 2808
+/Length 2805
/Filter /FlateDecode
>>
stream
-xÚÅ[ÛÇ}çWô£
-$Í®ª®êîÀ0 kbÀ
-Ëz vGÒÚkRØåÊßçÔ°)Y]ìûaÑ3äðÌéêªS]³9IH!§0ÔP9d¢@$9ú¨jÃhsÆØ
-~
ÏYhZeÎA`¸à8RñcMÁ£ÿ·ªÀÊ¡)¾ r
-Ä|$*«,¸µ²_k¬à+|MÕÙe°¬ãÏK pß~ YD}&OÌo
ë¸dçR×J«¬-HbüÊ|æDægĹdóù3+àMÔâ_4ù$¸aüÀgl
-&ñ9g§«
-Eü ×Õâ4ä ¤~ Ay¼ØºIr)AÕüÔZ]åÒVq´`Óú1[cÌ)W &Ír0?Ð`æ««TB°ÑòµË¯2oaV-
"Å(%·*bêJiêÄCinI>ܯ»¾Æ£Åä²ÁÖÀj¡4ã
-CiÂcOÀPø^£ì94®~ ¡¹[i2¸ùA Í ¯ðÍV³
Öªà àNãI¨»lr?Vr§ÒûÁÌÌáÝháÈÜåÌà=+qï#wpÅL° jY)¸Ö °/
-óçɹ+³Vÿ÷à+Ðý÷`1?Â=Øg©ìnð-<kÜã/ÂúIXÿ}÷ý.¬Ï®³ýÅnÉ>_~¹ú7ºsqy~±}ñp±½Þo./q6Ûópör8ûÙOö/ðjsöóæÅðùí¥#ð¯íùp¨íùjsÞÃðü9~ðgo"±"
G¯7¿¼ºþvq6û«íÙf?ÝÍþ¯çëa¸zóêÕ *¯ã½ê½ðõÅõ>ìÇ@ñ[^cêá+°öO½Înüã; î î/7ÛÃu8ÛýòjsBû]6WÀú/¬àèwà<8à<ß
-Ï«a{6W¯ÖßÿïÕÖßÂä«õÝv?l÷×
-õ»Õú»ázws
Ç 5~ôÏáübs÷:ü/`Å^3ÅÚ®ô=bGG¸·Ýîøã8ñÉ8#÷Q#üépû¨}´q|ºÂñß<û ö>ׯ~ñH}ø!¾^{µ;{2ìq»õ·û÷Ø·¿=Ìvä´Z?¹y¶Ï¿¾Øþ¼Zßßùg®ÿ±þjý ' ûÔíþ(%EÏ%Ôj¬Q9Y¬XHL)V©¸î^xÿ ]ìød{ñ»j:øÛ,dà"{ú8¹ö'ÞÑåS¸è\L£ç©7\jÌÓÉ<ºÊ|ty#W¡F±Á6ÞNÇJ¬ùWtjÅäÏ¢ÃT£!épåèyçèPÚÌȧÖèI·Óø±ßNç¡/CZÿðïÿ@=ÄÌ^£íÍååÓ[¯mkáA äk#VT»ÊX(¤,ýÄEhÎÇrAw<êÊÖOü'åMýux}<×vkxý~x½?¸¾JZù 4ý©D{jPëcécO!z ìªø0öc=åXO9ÖSu<ëxÖñ¬ãYÇ+¯t¼ÒñJÇ+¯t¼ÒñJÇ+¯t¼ÚñjÇ«¯v¼ÚñjÇ«¯v¼ÚñjÇk¯u¼ÖñÚÏ5ï;©ôS×
-'ǵ⮩j5EsF6ô'bp[n_+o¤×ïY±g
-£§CB@µ(I?Êj¿fd`//eL@R¾Ó<)9xHÕ«!µÓx«yN¹(â&g¯²KÒZ>ÍeN»°F,EHG(ÆQ¼ìiÅt+wÈÌjN§ä(¸R°Z¼¬ÃÓ¢[2Ì|0Á.Icõ:²@MRHG槣)fT¡ "Õ· vËTóäùùH
ÀéùÁ¦zÎO-ú L+áq ÖM5-°Ð)Gõêþ£H
-9Ó}×%K9HÆ\!´y'ÙFXéÈÊþQ¥¥¾uDªh"ùW:TH4ߣSÅÒRWQóTûÈü¾Ù
|éJ!á ¢Ö ¾à¢9È/§ê»¹(&Mø4]¸zá*9otªD+vËë;gÈ\áoC¤¦Ó\Ê\P36:óâÖì%ì»Ô¸ !4Q7z×Õ5M0K]}
-ŸaÃBA*Â
-Ëí秤m¨Æ÷áI;K»S Ëü,¸ÆGC8Ç8æùàNDL()"êæ
-ZÅÓÀ)×Èd 1ó pí[`
Ô3À6ðað@É"D¼^jé,P11*Xo1ìD#?ò$púQ-Á¥÷ õÀi.$fÖp
By|ë°L0Ë« EdLeZhF¬²@Zfßh»ÉQßå~³ fY -3jûæ?ìÁ6¾exËiQÛc!ú§11A*d>Íe´<&Ahn¶ìA¹¡Ó\æÏËT ³ÝýÍcµHå׬â ÄÒ¸O¹bíEtðO
-YàÎZPÄBk¡P³)ñ_gNGGÛ@!øÞ¯z«) c&Øf~ Ex<Þ e¢8vë¥FßO¤âfo äZïè:üúâc×JPÉßÒu_bHØ[ø
-ýÍô4ÿÞþA;ì«ëáñeÃxÜ'ïß'í£õ±ô±ö±ÿR©:u<êxÔñ¨ãQÇ£Ç;w<îxÜñ¸ãqÇã×;âÚ[7Ú[ïÚ[ïÚ[ïÚ[ïÚ[îÚ[îÚ[î*¯7¥T:^îx¹ãõööÎÓÓygAäd<ãò,ÏT:½&æ¯-Ê*ôS))!¯ØJåÍ>)Þg þV{¤yë2O0ËòÌ<»xÅW¶°j¡î42ù¾¿Ý§ðx3d:9MeyfÙ3wµ3<fAü墧¹, ÏLÀ%Ìâ/AZFãÓTêìùߨD}"þp]L'åÿº1Tèê¯KJ7
-Ùòuô.^¢i&àa²¡bÖ ^ÓàR)ú{¹HHÅÒ=· zÒd¬Eó÷cêQFQ·k¢açoöz¨xÚØû÷:î6Ù²~¾|¶Ø¸]=¾19Àhh²Äj¾ÏÇ *` °lU5dßõ}»xmXÒX2+ª.,ì¯é¦Xæ²D»e|GÏmþfv«±äÓTò( A
Qùkä¨KÕI³Ä6iPH^à#½'íÚÌ[µ¿.2¾ÐÛdëÌßVÍÐäÿuÍÞCd"<{ü͵:¤y7
3ßËü½¿Å·0$Å
-SºÅÛ]ÞëñZ!x® ø/
åd®K]ñçÿè.
-zSªD:½k¼KcrÎ(×
-s/O'Øeþå#¹F¯×Uï©K]êÌo%m#ÕE8*X¦1KæÓ;êuV$ÿo*·Q£Hµ .ó¦zü?.
+xÚÅ[Û·}¯à£
+$V«H]lXàDÐÃx·%µvgåïsª#Y²v§ewÛ²§»OuaqsBN%¡©¡rÈDHÐr õVÕÖç¶.2'¼
ßYhZeÎA`¸à8Rñ¾¦`ÀÈÖßç*°²phû"RC'×@ÁGr ©²ÊO+û³È
+ná6UgÁ²¯@-á»
+ü0²*úH¿
+ÏqÉÎ¥®VY[ÄxË|æ
+" ã3â\²ùÀ|DpɦAjñ[ M>H+.ïøh²A$>æìtµ° ¢wð\-Þ ¼zGòø°uäRªù/5¨µºÊ¥â)hÁ¢õb´ÆS®Lwr0ïh0sÎÕU*N!Ø(ùZCäWÓ[Ø窥P¤xBQr©r(¦ÞPJS'Jsi4èKòáà{\pSÁe*)¤!ÕAiÆ3ÒiOÀPè^£ìWïhh®VªaÞ)¡àºÙjv±µÐZµ4!ÃiRb̺Ê&×c%W*ÍøÄLÉÞ9zæ*gÞöDÚG®à`Ô²Rp!¬a_æóÁ¹+£V¿opÈèÄÌÞÃ7XÌ{øû(]Ã
+º
¹F¯à_|ÖOÂúï»ïwaý0|v=í/vÛHöyøòËÕgøÐýËóí¿íõ~sy~ØlÏÃÙËáì_ì_áõæìÕæÅðùí¥#ð¯íùp¨íùjsÞ»axþ/|ææÇwHX£7__;8ýÕÍöl³ÎÃîfÿ×óáÅÕ0Ü
+½yýz 7ñÞõ^øúâzvÏÃc ø'¯1ôðÍXû¯Þg7þóP÷P÷Ãíá:í~~½¹¡ý.«Ë`ýRpô;ppïçÃÕ°=ƧWëïÿ÷zëo!òÕúÁn»¶ûkúÝjýÝp½»¹Âãúçp~±¹¿{¦àX#c±×L±¶g+ }ÛÑîm·; >
+'~
+ç¡åÞÊ¡
>®soµ·6¶ÏV3þáüõ«ÝR^Äíõ·W»³'Ã[ûð±ßÇÀ¼{÷0ÚÓjýäæÇýxýõÅöÕj}ç3*=[ÿcýÕú.@öË|*%E÷%Ôj¬îÅ
Ä"l »>³ýl/~rUM}
\dwG2" ×þ$2bÑýÂ[2Z£|
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/rsiena -r 171
More information about the Rsiena-commits
mailing list