earth.object | R Documentation |
The object returned by the earth
function.
This is an S3
model of class
"earth"
.
It is a list with the components listed below.
Term refers to a term created during the
forward pass (each line of the output from format.earth
is a term).
Term number 1 is always the intercept.
rss |
Residual sum-of-squares (RSS) of the model (summed over all responses,
if |
rsq |
|
gcv |
Generalized Cross Validation (GCV) of the model (summed over all responses).
The GCV is calculated using the |
grsq |
|
bx |
Matrix of basis functions applied to (Intercept) h(Girth-12.9) h(12.9-Girth) h(Girth-12.9)*h(... [1,] 1 0.0 4.6 0 [2,] 1 0.0 4.3 0 [3,] 1 0.0 4.1 0 ... |
dirs |
Matrix with one row per MARS term, and with with ij-th element equal to
This matrix includes all terms generated by the forward pass,
including those not in Girth Height (Intercept) 0 0 # intercept h(12.9-Girth) -1 0 # 2nd term uses Girth h(Girth-12.9) 1 0 # 3rd term uses Girth h(Girth-12.9)*h(Height-76) 1 1 # 4th term uses Girth and Height ... |
cuts |
Matrix with ij-th element equal to the cut point (hinge value)
for predictor j in term i.
This matrix includes all terms generated by the forward pass,
including those not in Girth Height (Intercept) 0 0 # intercept, no cuts h(12.9-Girth) 12.9 0 # 2nd term has cut at 12.9 h(Girth-12.9) 12.9 0 # 3rd term has cut at 12.9 h(Girth-12.9)*h(Height-76) 12.9 76 # 4th term has two cuts ... |
prune.terms |
A matrix specifying which terms appear in which pruning pass subsets.
The row index of Example [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 0 0 0 0 0 0 # intercept-only model [2,] 1 2 0 0 0 0 0 # best 2 term model uses terms 1,2 [3,] 1 2 4 0 0 0 0 # best 3 term model uses terms 1,2,4 [4,] 1 2 6 9 0 0 0 # and so on ... |
selected.terms |
Vector of term numbers in the selected model.
Can be used as a row index vector into |
fitted.values |
Fitted values.
A matrix with dimensions |
residuals |
Residuals.
A matrix with dimensions |
coefficients |
Regression coefficients.
A matrix with dimensions |
rss.per.response |
A vector of the RSS for each response.
Length is the number of responses, i.e., |
rsq.per.response |
A vector of the R-Squared for each response
(where R-Squared is calculated using the |
gcv.per.response |
A vector of the GCV for each response.
Length is the number of responses.
The |
grsq.per.response |
A vector of the GRSq for each response
(calculated using the |
rss.per.subset |
A vector of the RSS
for each model subset generated by the pruning pass.
Length is |
gcv.per.subset |
A vector of the GCV for each model in |
leverages |
Diagonal of the hat matrix (from the linear regression of the response on |
penalty,nk,thresh |
Copies of the corresponding arguments to |
pmethod,nprune |
Copies of the corresponding arguments to |
weights,wp |
Copies of the corresponding arguments to |
termcond |
Reason the forward pass terminated (an integer). |
call |
The call used to invoke |
terms |
Model frame terms.
This component exists only if the model was built using |
modvars |
A matrix specifying which input variables
are used in each column of the model matrix.
(This field is new in earth 5.2.0.) For example, the formula: survived ~ age + pclass + sqrt(age) - sex results in:
age pclass sqrt(age) survived 0 0 0 # the response will be dropped age 1 0 0 pclass 0 1 0 sqrt(age) 0 0 1 # sqrt(age) will be merged with age sex 0 0 0 # sex is unused and will be dropped
age pclass2nd pclass3rd sqrt(age) age 1 0 0 1 # age and sqrt(age) use "age" pclass 0 1 1 0 # pclass2nd and pclass3rd use "pclass" Note that for models built with |
namesx |
Variable names in the input data. Deprecated (subsumed by |
xlevels |
This component exists only if the model was built using |
levels |
This component exists only if the model was built using |
x ,y ,data ,subset |
Copies of the corresponding arguments to |
glm.list |
List of GLM models. Each element is the value returned by |
glm.coefficients |
GLM regression coefficients.
Analogous to the |
glm.stats |
GLM summary statistics such as |
glm.bpairs |
Is |
cv.list |
List of |
cv.nterms |
Vector of length |
cv.nvars |
Vector of length |
cv.groups |
Specifies which cases went into which folds.
Matrix with two columns and number of rows equal to the the number of cases |
cv.rsq.tab |
Matrix with y mean fold1 0.909 0.909 fold2 0.869 0.869 fold3 0.952 0.952 fold4 0.157 0.157 fold5 0.961 0.961 mean 0.769 0.769 Example for a multiple response model: y1 y2 y3 mean fold1 0.915 0.951 0.944 0.937 fold2 0.962 0.970 0.970 0.968 fold3 0.914 0.940 0.942 0.932 fold4 0.907 0.929 0.925 0.920 fold5 0.947 0.987 0.979 0.971 mean 0.929 0.955 0.952 0.946 |
cv.class.rate.tab |
Like |
cv.maxerr.tab |
Like |
cv.auc.tab |
Like |
cv.cor.tab |
Like |
cv.deviance.tab |
Like |
cv.calib.int.tab |
Like |
cv.calib.slope.tab |
Like |
cv.oof.rsq.tab |
Generated only if |
cv.infold.rsq.tab |
Generated only if |
cv.oof.fit.tab |
Generated only if the |
varmod |
An object of class |
earth
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.