sym.lm: CM and CRM Linear regression model.

View source: R/sym_lm.R

sym.lmR Documentation

CM and CRM Linear regression model.

Description

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

Usage

sym.lm(formula, sym.data, method = c('cm', 'crm'))

Arguments

formula

An object of class 'formula' (or one that can be coerced to that class): a symbolic description of the model to be fitted.

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.

Details

Models for lm 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 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.

Value

sym.lm returns an object of class 'lm' or for multiple responses of class c('mlm', 'lm')

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.

Examples

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

RSDA documentation built on Nov. 10, 2023, 5:06 p.m.