Description Usage Arguments Details Value Author(s) References Examples
The Mallows Cp is evaluated for each submodel.
1 2 |
formula |
a symbolic description of the model to be fit. The details of model specification are given below. |
data |
an optional data frame containing the variables
in the model. By default the variables are taken from
the environment which |
model, x, y |
logicals. If |
var.full |
the value of variance to be used in the denominator of the Mallows Cp, if 0 the variance estimated from the full model is used. |
contrasts |
an optional list. See the |
verbose |
if |
Models for 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.
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:
cp |
Mallows Cp for each submodels |
coefficients |
the parameters estimator, one row vector for eac submodel. |
scale |
an estimation of the error scale, one value for each submodel. |
residuals |
the residuals from the estimated model, one column vector for each submodel. |
call |
the match.call(). |
contrasts |
|
xlevels |
|
terms |
the model frame. |
model |
if |
x |
if |
y |
if |
info |
not well working yet, if 0 no error occurred. |
Claudio Agostinelli
Mallows, C.L., (1973) Some comments on Cp, Technometrics, 15, 661-675.
1 2 3 4 5 6 7 8 9 10 11 |
Loading required package: circular
Attaching package: 'circular'
The following objects are masked from 'package:stats':
sd, var
[,1] [,2] [,3] [,4] [,5]
[1,] 1.0000000 0.7307175 0.8162526 -0.5346707 -0.8213050
[2,] 0.7307175 1.0000000 0.2285795 -0.8241338 -0.2454451
[3,] 0.8162526 0.2285795 1.0000000 -0.1392424 -0.9729550
[4,] -0.5346707 -0.8241338 -0.1392424 1.0000000 0.0295370
[5,] -0.8213050 -0.2454451 -0.9729550 0.0295370 1.0000000
Call:
mle.cp(formula = y.hald ~ x.hald)
Mallows Cp:
(Intercept) x.hald1 x.hald2 x.hald3 x.hald4 cp
[1,] 1 1 1 0 0 2.678
[2,] 1 1 1 0 1 3.018
[3,] 1 1 1 1 0 3.041
[4,] 1 1 0 1 1 3.497
[5,] 0 1 1 1 1 3.793
[6,] 1 1 1 1 1 5.000
Printed the first 6 best models
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.