Learn R Programming

boolean3 (version 3.1.6)

boolprof: Calculate estimated likelihood-profiles.

Description

This function calculates log-likelihood profiles for the selected variables. Despite the function name, these are not true profile likelihoods as they hold all other coefficients fixed at their MLE.

Usage

boolprof(obj, method = names(obj$model.fit)[1], vars = 1:obj$k, k = 50, as.table = TRUE, scales = list(x = list(relation = "free")), between = list(x = 1, y = 1), main = "Estimated likelihood profiles", xlab = "beta", ylab = "Log-likelihood", ...)

Arguments

obj
object of boolean-class containing a fit boolean model.
method
estimation method to use
vars
numeric vector selecting a set of covariates from the fitted model
k
integer indicating the number of points at which the log-likelihood should be calculated.
as.table
logical (default TRUE), to be passed to xyplot.
scales
list of settings for the scales argument passed to xyplot.
between
numeric specifying the space between panels.
main
string, plot title
xlab
string, the x-axis label.
ylab
string, the y-axis label.
...
Additional arguments to pass to xyplot. See that cumentation for details.

Value

Returns an object of boolprof-class, the default action being to present the default plot.

Examples

Run this code
## Not run: 
# 
# ## Note: This example assumes a boolean model has already been fit.
# 
# ## Display the contours of the likelihood given a change the value of
# ## the coefficients.
# (prof <- boolprof(fit))
# 
# ## Extract the plots for x1_a and x4_b.
# plot(prof, y = c("x1_a", "x4_b"))
# plot(prof, y = c(1, 3), scales = list(y = list(relation = "free")))
# 
# ## You can also use variable or index matching with boolprof to select
# ## particular covariates of interest.
# boolprof(fit, vars = c(1, 3))
# boolprof(fit, vars = c("x1_a", "x4_b"))
# ## End(Not run)

Run the code above in your browser using DataLab