Tutorial by Examples

Statistical functions in R make heavy use of the so-called Wilkinson-Rogers formula notation1 . When running model functions like lm for the Linear Regressions, they need a formula. This formula specifies which regression coefficients shall be estimated. my_formula1 <- formula(mpg ~ wt) class(...
y ~ . : Here . is interpreted as all variables except y in the data frame used in fitting the model. It is equivalent to the linear combinations of predictor variables. For example y ~ var1 + var2 + var3+...+var15 y ~ . ^ 2 will give all linear (main effects) and second order interaction terms of t...

Page 1 of 1