Learn R Programming

RSiena (version 1.1-212)

simstats0c: Versions of FRAN

Description

The functions to be called as 'FRAN' by siena07. They call compiled C++.

Usage

simstats0c(z, x, data=NULL, effects=NULL, fromFiniteDiff=FALSE,
           returnDeps=FALSE, returnChains=FALSE, byWave=FALSE,
           returnDataFrame=FALSE, returnLoglik=FALSE)
maxlikec(z, x, data=NULL, effects=NULL,
           returnChains=FALSE, byGroup = FALSE, byWave=FALSE,
           returnDataFrame=FALSE, returnLoglik=FALSE,
           onlyLoglik=FALSE)
initializeFRAN(z, x, data, effects, prevAns = NULL, initC,
           profileData = FALSE, returnDeps = FALSE, returnChains =
           FALSE, byGroup = FALSE, returnDataFrame = FALSE,
           byWave = FALSE, returnLoglik = FALSE,  onlyLoglik = FALSE)
terminateFRAN(z, x)

Arguments

Value

simstats0c returns a list containing:fraSimulated statistics.scScores with which to calculate the derivative (not phase 2 or if using finite differences or maximum likelihood).dffContributions to the derivative if finite differencesntimFor conditional processing, time taken.feasibleCurrently set to TRUE.OKCould be set to FALSE if serious error has occurred.simsA list of simulation results, one for each period. Each list consists of a list for each data object, each of which consists of a list for each network, each of which consists of a list for each period, each component of which is an edgelist in matrix form (the columns are from, to, value) (or vector for behavior variables). Only if returnDeps is TRUE.maxlikec returns a list containing:fraSimulated scores.dffSimulated Hessians: stored as lower triangular matricesntimNULL, compatibility onlyfeasibleCurrently set to TRUE.OKCould be set to FALSE if serious error has occurred.dffSimulated HessiansimsNULL, for compatibility onlychainA list of sampled chains, one for each period. Each list consists of a list for each data object, each of which consists of a list for each network, each of which consists of a list for each period, each component of which is a list or a data frame depending on the value of returnDataFrame. Only if returnChainss is TRUE.acceptsNumber of accepted MH steps by dependent variable (permute steps are counted under first dependent variable)rejectsNumber of rejected MH steps by dependent variable (permute steps are counted under first dependent variable)abortsNumber of aborted MH steps counted under first dependent variable.loglikLoglikelihood of the simulations. Only if returnLoglik is TRUE. If onlyLoglik is TRUE, only loglik, accepts,rejects and aborts are returned.initializeFRAN and terminateFRAN return the control object z.

Details

The name of simstats0c or maxlikec should be used for the element FRAN of the model object, the former when using estimation by forward simulation, the latter for maximum likelihood estimation. The arguments with no defaults must be passed in on the call to siena07. initializeFRAN and terminateFRAN are called in both cases. initializeFRAN is also called in bayes

References

See http://www.stats.ox.ac.uk/~snijders/siena/

See Also

siena07

Examples

Run this code
mynet1 <- sienaNet(array(c(tmp3, tmp4), dim=c(32, 32, 2)))
mydata <- sienaDataCreate(mynet1)
myeff <- getEffects(mydata)
myeff <- includeEffects(myeff, transTrip)
mymodel <- sienaModelCreate(nsub=2, n3=100)
ans <- siena07(mymodel, data=mydata, effects=myeff,  batch=TRUE)

Run the code above in your browser using DataLab