est.max.like {dse2} | R Documentation |
Maximum likelihood estimation.
est.max.like(obj, ...) est.max.like(obj, data, algorithm="optim", algorithm.args=list(method="BFGS", upper=Inf, lower=-Inf, hessian=TRUE)) est.max.like(obj, data=TSdata(obj), ...) est.max.like(obj, model, ...)
obj |
An object of class TSmodel, TSdata or TSestModel |
data |
A TSdata object. |
model |
A TSmodel object. |
algorithm |
The algorithm ('optim', 'nlm' or 'nlmin') to use for maximization. |
algorithm.args |
Arguments for the optimization algorithm. |
Shape is used to specify both the initial parameter values and the model
structure (the placement of the parameters
in the various arrays of the TSmodel). Estimation attempts to minimimize the
negative log likelihood (as returned by l
) of the given model structure by adjusting the
parameter values. A TSmodel can also have constant values in some array
elements, and these are not changed.
The value returned is an object of class TSestModel with additional
elements est$converged
, which is T or F indicating convergence,
and est$results
. The hessian and gradient in results could potentially
be used for restarting in the case of non-convergence, but that has not
yet been implemented.
optim
nlm
est.VARX.ls
bft
TSmodel
l
true.model <- ARMA(A=c(1, 0.5), B=1) est.model <- est.max.like(true.model, simulate(true.model)) summary(est.model) est.model tfplot(est.model)