Learn R Programming

RSiena (version 1.1-212)

siena07: Function to estimate parameters in a Siena model

Description

Estimates parameters in a Siena model using method of moments, based on direct simulation, conditional or otherwise, or on MCMC simulation. Estimation is done using a Robbins-Monro algorithm. Note that the data and particular model to be used must be passed in using named arguments as the ..., and the specification for the algorithm must be passed on as x, which is a sienaModel object as produced by sienaModelCreate (see examples).

Usage

siena07(x, batch=FALSE, verbose=FALSE, silent=FALSE,
        useCluster=FALSE, nbrNodes=2, initC=TRUE,
        clusterString=rep("localhost", nbrNodes), tt=NULL,
        parallelTesting=FALSE, clusterIter=!x$maxlike,
        clusterType=c("PSOCK", "FORK"), ...)

Arguments

Value

Returns an object of class "sienaFit", some parts of which are:OKBoolean indicating successful terminationterminationCharacter string, values: "OK", "Error", or "UserInterrupt". "UserInterrupt" indicates that the user asked for early termination before phase 3.thetaFitted value of theta.covthetaEstimated covariance matrix of theta.dfraMatrix of estimated derivatives.sfMatrix of deviations from target in phase 3.sf2Array of statistics from simulations in phase 3.targetsObserved statistics.targets2Observed statistics for each wave.sscScore function contributions for each wave for each simulation in phase 3. Zero if finite difference method is usedsimsList of simulated networks. Each a list of edgelists, one for each period.Phase3nitsNumber of iterations actually performed in phase 3.Writes text output to the file named "projname.out", where projname is defined in the sienaModel object x.

Details

Runs a Robbins-Monro algorithm for parameter estimation using the three-phase implementation in Snijders (2001) and Snijders, Steglich and Schweinberger (2007), with derivative estimation as in Schweinberger and Snijders (2007). Phase 1 does a few iterations to estimate the derivative matrix of the targets with respect to the parameter vector. Phase 2 does the estimation. Phase 3 runs a simulation to estimate standard errors and check convergence of the model. The simulation function is called once for each iteration in these phases and also once to initialise the model fitting and once to complete it. Unless in batch mode, displays a tcl/tk screen to allow interruption and to show progress.

References

  • Schweinberger, M., and Snijders, T.A.B., (2007). Markov models for digraph panel data: Monte Carlo-based derivative estimation. Computational Statistics and Data Analysis 51, 4465-4483.
  • Snijders, Tom A.B., The statistical evaluation of social network dynamics. Pp. 361-395 in Sociological Methodology - 2001, edited by M.E. Sobel and M.P. Becker. Boston and London: Basil Blackwell.
  • Snijders, Tom A.B., Steglich, Christian E.G., and Schweinberger, Michael, Modeling the co-evolution of networks and behavior. Pp. 41-71 in Longitudinal models in the behavioral and related sciences, edited by Kees van Montfort, Han Oud and Albert Satorra; Lawrence Erlbaum, 2007.
  • Further seehttp://www.stats.ox.ac.uk/~snijders/siena/.

See Also

There are print, summary and xtable methods for sienaFit objects sienaModelCreate, print.sienaFit

Examples

Run this code
mymodel <- sienaModelCreate(fn=simstats0c, nsub=2, n3=100)
# nsub=2 and n3=100 is used here for having a brief computation, not for practice.
mynet1 <- sienaNet(array(c(tmp3, tmp4), dim=c(32, 32, 2)))
mydata <- sienaDataCreate(mynet1)
myeff <- getEffects(mydata)
ans <- siena07(mymodel, data=mydata, effects=myeff, batch=TRUE)

# or for conditional estimation
mymodel$condname <- 'mynet1'
mymodel$cconditional <- TRUE
ans <- siena07(mymodel, data=mydata, effects=myeff, batch=TRUE)

# or if a previous 'on track' result ans was obtained
ans1 <- siena07(mymodel, data=mydata, effects=myeff, prevAns=ans)

Run the code above in your browser using DataLab