mle.cp(formula, data=list(), model=TRUE, x=FALSE, y=FALSE, var.full=0, contrasts=NULL, verbose=FALSE)
mle.cp
is called from.TRUE
the corresponding components of the fit (the model frame, the model matrix, the
response).contrasts.arg
of model.matrix.default
.TRUE
warnings are printed.mle.cp
returns an object of class
"mle.cp"
.The function summary
is used to obtain and print a summary of the results, only models below the bisector are reported.
The generic accessor functions coefficients
and residuals
extract coefficients and residuals returned by mle.cp
.
The object returned by mle.cp
are:model=TRUE
a matrix with first column the dependent variable and the remain column the explanatory variables for the full model.x=TRUE
a matrix with the explanatory variables for the full model.y=TRUE
a vector with the dependent variable.mle.cp
are specified symbolically. A typical model has the form response ~ terms
where response
is the (numeric) response vector and terms
is a series of terms which specifies a linear predictor for response
. A terms specification of the form first+second
indicates all the terms in first
together with all the terms in second
with duplicates removed. A specification of the form first:second
indicates the the set of terms obtained by taking the interactions of all terms in first
with all terms in second
. The specification first*second
indicates the cross of first
and second
. This is the same as first+second+first:second
.
library(wle)
data(hald)
cor(hald)
result <- mle.cp(y.hald~x.hald)
summary(result)
plot(result)
Run the code above in your browser using DataLab