Learn R Programming

msm (version 0.7.6)

surface.msm: Explore the likelihood surface

Description

Plot the log-likelihood surface with respect to two parameters.

Usage

surface.msm(x, params=c(1,2), np=10, type=c("contour","filled.contour","persp","image"),
                        point=NULL, xrange=NULL, yrange=NULL,...)

Arguments

x
Output from msm, representing a fitted msm model.
params
Integer vector with two elements, giving the indices of the parameters to vary. All other parameters will be fixed. Defaults to c(1,2), representing the first two log transition intensities. See the fixedpars argument t
np
Number of grid points to use in each direction, by default 10. An np x np grid will be used to evaluate the likelihood surface. If 100 likelihood function evaluations is slow, then reduce this.
type
Character string specifying the type of plot to produce. ll{ "contour" Contour plot, using the R function contour. "filled.contour" Solid-color contour plot, using the R fu
point
Vector of length n, where n is the number of parameters in the model, including the parameters that will be varied here. This specifies the point at which to fix the likelihood. By default, this is the maximum likel
xrange
Range to plot for the first varied parameter. Defaults to plus and minus two standard errors, obtained from the Hessian at the maximum likelihood estimate.
yrange
Range to plot for the second varied parameter. Defaults to plus and minus two standard errors, obtained from the Hessian at the maximum likelihood estimate.
...
Further arguments to be passed to the plotting function.

Details

Draws a contour or perspective plot. Useful for diagnosing irregularities in the likelihood surface. If you want to use these plots before running the maximum likelihood estimation, then just run msm with all estimates fixed at their initial values.

contour.msm just calls surface.msm with type = "persp".

persp.msm just calls surface.msm with type = "persp".

image.msm just calls surface.msm with type = "persp".

As these three functions are methods of the generic functions contour, persp and image, they can be invoked as contour(x), persp(x) or image(x), where x is a fitted msm object.

See Also

msm, contour, filled.contour, persp, image.