sym.predict {RSDA}R Documentation

Predict method to CM and CRM regression model

Description

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

Usage

sym.predict(model, ...)

## S3 method for class 'symbolic_lm_cm'
sym.predict(model, new.sym.data, ...)

## S3 method for class 'symbolic_lm_crm'
sym.predict(model, new.sym.data, ...)

## S3 method for class 'symbolic_glm_cm'
sym.predict(model, new.sym.data, response, ...)

## S3 method for class 'symbolic_glm_crm'
sym.predict(model, new.sym.data, response, ...)

Arguments

model

The output of lm method.

...

additional arguments affecting the predictions produced.

new.sym.data

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

response

The number of the column where is the response variable in the interval data table.

Value

sym.predict 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'

Author(s)

Oldemar Rodriguez Rojas

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

data(int_prost_train)
data(int_prost_test)
model <- sym.lm(lpsa ~ ., sym.data = int_prost_train, method = "cm")
pred.cm <- sym.predict(model, int_prost_test)
pred.cm

[Package RSDA version 3.2.1 Index]