A ML version of FRAN
A function to be called as "FRAN". All in R. very slow. work in progress.
maxlikefn(z, x, INIT = FALSE, TERM = FALSE, data, effects = NULL, nstart = 1000, pinsdel = 0.6, pperm = 0.3, prelins = 0.1, multfactor=2, promul = 0.1, promul0 = 0.5, pdiaginsdel = 0.1, fromFiniteDiff = FALSE, noSamples = 1, sampInterval = 50, int = 1)
z |
control object, passed in automatically in siena07 |
x |
model object, passed in automatically in siena07 |
INIT |
if TRUE, do initial processing. May be required to set up z |
TERM |
if TRUE, do end processing. |
data |
A siena object |
effects |
list of data frames as returned by getEffects |
nstart |
Number of MH steps at the start, after making the chain |
pinsdel |
Probability of insert/delete step |
pperm |
Probability of permutation step. (set to zero in startup phase.) |
prelins |
Insertion probability in InsDelPermute |
multfactor |
Factor controlling number of MH steps. Will be read from the model in preference, and that is easier to alter! But I don"t want to alter that program yet.. |
promul |
Probability of choosing a random single multiple in InsDelPermute in start up phase. |
promul0 |
Probability of choosing a random single multiple in InsDelPermute not in startup phase |
pdiaginsdel |
Probability of insertion or deletion of a diagonal link. |
fromFiniteDiff |
Should always be FALSE |
noSamples |
Number of chains to be returned |
sampInterval |
If multiple chains are returned, the number of steps between each |
int |
Number of parallel MCMC chains to pursue. |
This can be used for the element FRAN of the model object.
The arguments with no defaults must be passed in on the call to
siena07.
Also you must set the option maxlike=TRUE
in the call to
sienaAlgorithmCreate()
Depends on the call. If INIT
or initC
or
TERM
are true, returns z
, the control object. Otherwise,
returns a list containing:
fra |
Simulated scores |
dff |
2nd deriv, not phase 2 |
OK |
could be set to FALSE if serious error has occurred |
Ruth Ripley
## Not run: mynet1 <- sienaDependent(array(c(tmp3, tmp4), dim=c(32, 32, 2))) mydata <- sienaDataCreate(mynet1) myeff<- getEffects(mydata) myalgor<- sienaAlgorithmCreate(nsub=2, n3=100, maxlike=TRUE) ans<- siena07(myalgor, data=mydata, effects=myeff, batch=TRUE) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.