profileLikelihoods: Function to calculate profile likelihood for a Siena model

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

View source: R/algorithms.r

Description

Calculates the profile likelihood for a Siena model for one or two parameters

Usage

1
2
3
    profileLikelihoods(resp, x, data, effects, i, j = NULL,
    gridl = c(0.8, 1.2), seqlen = 5, maxit = 2, method = "BFGS",
    trace = 0, nIter = 100, ...)

Arguments

resp

Value returned from a call to algorithms or a list containing a set of parameter values, in a vector called theta.

x

A sienaAlgorithm object

data

A siena data object

effects

A sienaEffects object

i

Required. Index of parameter to maximise over.

j

Optional. Index of second parameter to maximise over.

gridl

Multiplier used to create grid for evaluation

seqlen

Number of points for evaluation.

maxit

Number of iterations of the optimizer optim.

method

Method for optim

trace

trace argument for optim

nIter

Number of samples to use

...

Other arguments to be passed to the initialize call.

Value

A sienaFit object, with added component zz containing the points used for the plot. Produces a plot.

Note

Not for general use

Author(s)

Ruth Ripley

References

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

See Also

algorithms

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)
profileLikelihoods(list(theta=c(5,-2, 2)), sienaModelCreate(maxlike=TRUE),
   mydata, myeff, i=1)

## End(Not run)

RSienaTest documentation built on July 14, 2021, 3 a.m.