Learn R Programming

RSDA (version 2.0.8)

deter.coefficient: Compute the determination cosfficient

Description

The determination coefficient represents a goodness-of-fit measure commonly used in regression analysis to capture the adjustment quality of a model.

Usage

deter.coefficient(sym.var, prediction)

Arguments

sym.var

Variable that was predicted.

prediction

The prediction given by the model.

Value

Return the determination cosfficient.

References

LIMA-NETO, E.A., DE CARVALHO, F.A.T., (2008). Centre and range method to fitting a linear regression model on symbolic interval data. Computational Statistics and Data Analysis 52, 1500-1515.

LIMA-NETO, E.A., DE CARVALHO, F.A.T., (2010). Constrained linear regression models for symbolic interval-valued variables. Computational Statistics and Data Analysis 54, 333-347.

See Also

sym.glm

Examples

Run this code
# NOT RUN {
data(int_prost_test)
data(int_prost_train)
res.cm <- sym.lm(lpsa~., sym.data=int_prost_train, method='cm')
pred.cm <- predictsym.lm(res.cm,int_prost_test,method='cm')
deter.coefficient(sym.var(int_prost_test,9),pred.cm$Fitted)

res.cm.lasso <- sym.glm(sym.data=int_prost_train,response=9,method='cm',
                      alpha=1,nfolds=10,grouped=TRUE)
pred.cm.lasso <- predictsym.glm(res.cm.lasso,response=9,int_prost_test,method='cm')
deter.coefficient(sym.var(int_prost_test,9),pred.cm.lasso)
# }

Run the code above in your browser using DataLab