maxlikefn: A ML version of FRAN

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/maxlike.r

Description

A function to be called as "FRAN". All in R. very slow. work in progress.

Usage

1
2
3
4
5
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)

Arguments

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.

Details

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()

Value

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

Author(s)

Ruth Ripley

References

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

See Also

siena07

Examples

1
2
3
4
5
6
7
8
## 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)

RSiena documentation built on Sept. 24, 2020, 3 p.m.