Learn R Programming

moc (version 2.0)

confint.moc: Parameter and profiles confidence intervals and likelihood profiling of MOC models.

Description

confint.moc computes confidence intervals (CI) of specified function of the parameters based on crude Wald asymptotics. More precise CI for the original parameters are obtained through profiling of the likelihood function (that is evaluation of the likelihood over a wide range of values in the parameter space). When profiling is requested the deviance over different parameters' values is also returned.

profiles.postCI computes data values for which the empirical probability of observing such subject values, given mixture group, lies between the confidence bounds (see details).

density.moc computes the estimated mixture density at data points along some factor and optionally plot it.

Usage

# S3 method for moc
confint(object, parm = list(), level = 0.95,
        profiling = c("none","simple","complete"), …)

profiles.postCI(object, data = NULL, level = 0.95, interpolate = TRUE)

# S3 method for moc density(x, var = NULL, along = NULL, plot = c("none","pp-plot","density","pq-plot"), type = "l", …)

Arguments

object, x

A fitted moc object.

parm

A list of formulas beginning with ~ or expressions of the parameters denoted \(p1,p2,\ldots\) for which confidence intervals are requested.

For example, parm = list(~p1,~exp(p2)/(1+exp(p1+p3))).

level

Alpha level in the interval \((0,1)\) for the confidence bounds \([(1-level)/2,(1+level)/2]\). In profiles.postCI, you can also directly specify the bounds like level = c(0.02,0.98).

profiling

A string that specifies the desired type of likelihood profiling. This can be one of

none:

(default) no profiling.

simple:

evaluate the likelihood on a grid of values, one parameters at a time holding the other parameters fixed.

complete:

fix one parameter at a time over a grid of values and re-estimate the other parameters.

data

An optional data.frame, matrix or vector of length nsubject containing the values for which the confidence limits are requested. The default is to take the original response profile.

interpolate

A logical value indicating whether interpolation of data values must be performed to achieve the probability limits. When "FALSE", the data points with the probabilities nearest to the given bounds are taken (thus using the corresponding step function).

var

A vector of integer values specifying the response variables for density evaluation.

along

A factor used to split the density estimator.

plot

A string that specifies the kind of desired plot. Allowed values are

none:

the default.

pp-plot:

plot the estimated mixture cumulative probability (CDF) against its empirical counterpart.

pq-plot:

plot the estimated CDF against the quintiles.

density:

plot the estimated mixture distribution at observed data points.

type

The type of lines in the plot, see plot for details.

Used in density.moc to pass arguments directly to the plotting function. In confint.moc iterlim will be passed to update.moc and offscal will change the profiling parameters search range.

Value

confint.moc returns a list containing a list of arrays with likelihood deviance for each parameters configuration of the requested profiling, a function ellip corresponding to the asymptotic elliptic distance $$ellip(p)=(p-\hat{p})\hat{\Sigma}^{-1}(p-\hat{p})$$ where \(\hat{p}\) is the maximum likelihood estimator of the parameters and \(\hat{\Sigma}\) its asymptotic covariance matrix. It also returns univariate, joint conditional and likelihood rejection confidence intervals for the parameters (when profiling has been requested).

profiles.postCI returns a list of array with upper and lower bounds on data profiles for each mixture group.

density.moc returns nothing when a plot is requested, otherwise an array with mixture density estimate and data points is returned.

Details

The methods included here primarily exploit the empirical estimators of the conditional expectation given mixture group for some appropriately chosen function of the data \(g()\), that is $$\hat{g}_k=\frac{\sum_i wt_i\,\hat{\tau}_{i,k}\,g(y_i)}{\sum_i wt_i\,\hat{\tau}_{i,k}}.$$ Profiles confidence intervals and density estimates are defined by choosing \(g()\) as the indicator function over appropriate sets. See print.moc and residuals.moc.

See Also

moc, print.moc, residuals.moc, post.moc, loglike.moc, profilesplot