Creates an object with specifications for the algorithm for parameter
estimation in RSiena.
sienaAlgorithmCreate()
and sienaModelCreate()
are identical functions; the second name was
used from the start of the RSiena
package, but the first name
indicates more precisely the purpose of this function.
sienaAlgorithmCreate(fn, projname = "Siena", MaxDegree = 0,
useStdInits = FALSE, n3 = 1000, nsub = 4,
dolby=TRUE, maxlike = FALSE, diagonalize=1.0*!maxlike,
condvarno = 0, condname = "", firstg = 0.2,
cond = NA, findiff = FALSE, seed = NULL, pridg=0.05,
prcdg=0.05, prper=0.2, pripr=0.3, prdpr=0.3, prirms=0.05,
prdrms=0.05, maximumPermutationLength=40,
minimumPermutationLength=2, initialPermutationLength=20,
modelType=1, mult=5, simOnly=FALSE)sienaModelCreate(fn, projname = "Siena", MaxDegree = 0,
useStdInits = FALSE, n3 = 1000, nsub = 4,
dolby=TRUE, maxlike = FALSE, diagonalize=1.0*!maxlike,
condvarno = 0, condname = "", firstg = 0.2,
cond = NA, findiff = FALSE, seed = NULL, pridg=0.05,
prcdg=0.05, prper=0.2, pripr=0.3, prdpr=0.3, prirms=0.05,
prdrms=0.05, maximumPermutationLength=40,
minimumPermutationLength=2, initialPermutationLength=20,
modelType=1, mult=5, simOnly=FALSE)
Function to do one simulation in the Robbins-Monro algorithm. Not to be touched.
Character string name of project; the output file will be called projname.out. No embedded spaces!!!
Named vector of maximum degree values for corresponding networks. Allows to restrict the model to networks with degrees not higher than this maximum.
Boolean. If TRUE, the initial values in the effects object will be ignored and default values used instead. If FALSE, the initial values in the effects object will be used.
Number of iterations in phase 3.
Number of subphases in phase 2.
Boolean. Should there be noise reduction by regression on augmented data score. In most cases dolby=TRUE yields better convergence; if convergence is problematic, however, dolby=FALSE may be tried. Just use whatever works best.
Whether to use maximum likelihood method or Method of Moments estimation.
Number between 0 and 1 (bounds included), values outside this interval will be truncated; for diagonalize=0 the complete estimated derivative matrix will be used for updates in the Robbins-Monro procedure; for diagonalize=1 only the diagonal entries will be used; for values between 0 and 1, the weighted average will be used with weight diagonalize for the diagonalized matrix. Has no effect for ML estimation. Higher values are more stable, lower values potentially more efficient. Default: for ML estimation, diagonalize=0; for MoM estimation, diagonalize = 1.0.
If cond
(conditional simulation), the
sequential number of the network
or behavior variable on which to condition.
If conditional, the name of the dependent variable on
which to condition. Use one or other of condname
or
condvarno
to specify the variable.
Initial value of scaling ('gain') parameter for updates in the Robbins-Monro procedure.
Boolean. Only relevant for Method of Moments
simulation/estimation.
If TRUE, use conditional simulation; if FALSE, unconditional simulation.
If missing, decision is deferred until siena07
,
when it is set to TRUE if there is only one dependent variable,
FALSE otherwise.
Boolean: If TRUE, estimate derivatives using finite differences. If FALSE, use scores.
Integer. Starting value of random seed. Not used if parallel testing.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Maximum length of permutation in steps in ML estimation
Minimum length of permutation in steps in ML estimation
Initial length of permutation in steps in ML estimation
Type of model to be fitted: 1=directed, 2:6 for symmetric networks: 2=forcing, 3=Initiative model, 4=Pairwise forcing model, 5=Pairwise mutual model, 6=Pairwise joint model
Multiplication factor for maximum likelihood. Number of
steps per iteration is set to this multiple of the total distance
between the observations at start and finish of the wave.
Decreasing mult
below a certain value has no further effect.
Logical: If TRUE, then the calculation of the covariance matrix and standard errors of the estimates at the end of Phase 3 of the estimation algorithm in function siena07 is skipped. This is suitable if nsub=0 and siena07 is used only for the purpose of simulation.
Returns an object of class sienaAlgorithm
containing:
String value of name of project.
Boolean, see above.
Boolean, set to TRUE: report time in the phases or not.
number of iterations in Phase 3
Initial value of the scaling ('gain') parameter in the Robbins-Monro algorithm.
Value used to control the maximum size of the jumps.
Value used to control the maximum size of the jumps.
Boolean: is FRAN using maximum likelihood?
Name of simulation function FRAN. Is derived by
sienaModelCreate
from fn
and maxlike
.
Boolean: is FRAN using conditional estimation?
Number of dependent variable on which to condition.
Name of dependent variable on which to condition.
Boolean: are derivatives calculated using finite differences?
Number of subphases in phase 2.
Boolean: use only the diagonal of the derivative matrix?
Type of model to be fitted: 1=directed, 2:6 for symmetric networks: 2=forcing, 3=Initiative model, 4=Pairwise forcing model, 5=Pairwise mutual model, 6=Pairwise joint model
Named vector of maximum degree values, or NULL.
Integer. Starting value of random seed. Not present unless given in call.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Real number. Probability used in Metropolis-Hastings routine in ML estimation.
Maximum length of permutation in steps in ML estimation
Minimum length of permutation in steps in ML estimation
Initial length of permutation in steps in ML estimation
Multiplication factor for maximum likelihood. Number of steps per iteration is set to this multiple of the total distance between the observations at start and finish of the wave.
Logical, indicating whether output of covariance matrix
by siena07
is to be skipped.
Model specification is done via this object for
siena07
.
This function creates an object with the elements required to control the
Robbins-Monro algorithm. Those not
available as arguments can be changed manually where desired.
# NOT RUN {
myAlgorithm <- sienaAlgorithmCreate(projname="NetworkDyn")
StdAlgorithm <- sienaAlgorithmCreate(projname="NetworkDyn", useStdInits=TRUE)
CondAlgorithm <- sienaAlgorithmCreate(projname="NetworkDyn", condvarno=1, cond=TRUE)
Max10Algorithm <- sienaAlgorithmCreate(projname="NetworkDyn", MaxDegree=c(mynet=10))
# where mynet is the name of the network object created by sienaDependent().
# }
Run the code above in your browser using DataLab