lm: Linear Regression.

Description Usage Arguments Details Value Constraints See Also Examples

Description

lm performs linear regression on FLTable objects.

Usage

1

Arguments

formula

A symbolic description of model to be fitted

data

An object of class FLTable or FLTableMD

catToDummy

Transform categorical variables to numerical values either using dummy variables or by using Empirical Logit. If the value is 1, transformation is done using dummy variables, else if the value is 0, transformation is done using Empirical Logit.

performNorm

0/1 indicating whether to perform standardization of data.

performVarReduc

0/1. If the value is 1, the stored procedure eliminates variables based on standard deviation and correlation.

makeDataSparse

If 0,Retains zeroes and NULL values from the input table. If 1, Removes zeroes and NULL. If 2,Removes zeroes but retains NULL values.

minStdDev

Minimum acceptable standard deviation for elimination of variables. Any variable that has a standard deviation below this threshold is eliminated. This parameter is only consequential if the parameter PerformVarReduc = 1. Must be >0.

maxCorrel

Maximum acceptable absolute correlation between a pair of columns for eliminating variables. If the absolute value of the correlation exceeds this threshold, one of the columns is not transformed. Again, this parameter is only consequential if the parameter PerformVarReduc = 1. Must be >0 and <=1.

classSpec

list describing the categorical dummy variables.

whereconditions

takes the where_clause as a string.

Details

The DB Lytix function called is FLLinRegr. Performs Linear Regression and stores the results in predefined tables.

Value

lm returns an object of class FLLinRegr

Constraints

The anova method is not yet available for FLLinRegr If data is FLTableMD, only single formula is accepted. So input deeptable or deeptable produced after data preparation should have same VarIDs'. For FLTableMD data object, only coefficients and summary methods are defined.Predict method on FLTableMD newdata is not supported. Properties like print(x),model,plot might take time as they have to fetch data

See Also

lm for R reference implementation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
widetable  <- FLTable(getTestTableName("tblAbaloneWide"), "ObsID")
lmfit <- lm(Rings~Height+Diameter,widetable)
lmfit$coefficients
lmfit$fitted.values
plot(lmfit)
mu <- predict(lmfit,newdata=widetable)
deeptable <- FLTable(getTestTableName("myLinRegrSmall"),"ObsID","VarID","Num_Val")
lmfit <- lm(NULL,deeptable)
summary(lmfit)
flMDObject <- FLTableMD(table=getTestTableName("tblAutoMPGMD"),
                      group_id_colname="GroupID",
                      obs_id_colname="ObsID",group_id = c(2,4))
vformula <- MPG~HorsePower+Displacement+Weight+Acceleration
lmfit <- lm(vformula,
           data=flMDObject)
coeffList <- coef(lmfit)
summaryList <- summary(lmfit)

Fuzzy-Logix/AdapteR documentation built on May 6, 2019, 5:07 p.m.