Learn R Programming

RSDA (version 2.0.8)

predictsym.lm: Predict method to CM and CRM Linear regression model

Description

To execute predict method the Center Method (CR) and Center and Range Method (CRM) to Linear regression.

Usage

predictsym.lm(model, new.sym.data, method = c('cm', 'crm'))

Arguments

model

The output of lm method.

new.sym.data

Should be a symbolic data table read with the function read.sym.table(...).

method

'cm' to Center Method and 'crm' to Center and Range Method.

Value

predictsym.lm produces a vector of predictions or a matrix of predictions and bounds with column names fit, lwr, and upr if interval is set. For type = 'terms' this is a matrix with a column per term and may have an attribute 'constant'

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_train)
data(int_prost_test)
res.cm <- sym.lm(lpsa~.,sym.data=int_prost_train,method='cm')
pred.cm <- predictsym.lm(res.cm,int_prost_test,method='cm')

# }

Run the code above in your browser using DataLab