sym.lm | R Documentation |
To execute the Center Method (CR) and Center and Range Method (CRM) to Linear regression.
sym.lm(formula, sym.data, method = c('cm', 'crm'))
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. |
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.
sym.lm returns an object of class 'lm' or for multiple responses of class c('mlm', 'lm')
Oldemar Rodriguez Rojas
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.
data(int_prost_train)
data(int_prost_test)
res.cm <- sym.lm(lpsa ~ ., sym.data = int_prost_train, method = "cm")
res.cm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.