getYhat | R Documentation |
Get predicted value from object of class "lm"
getYhat(fit, group = "D", mode = 1)
fit |
Object of class "lm" |
group |
names of dummy variables in formula |
mode |
Numeric. One of 1:4. 1= simple indicator coding, 2= sequential coding, 3= Helmert coding, 4= effect coding |
iris1=addCatVars(iris,c("Species")) iris3=addCatVars(iris,c("Species"),mode=3) fit1=lm(Sepal.Length~Sepal.Width+D1+D2,data=iris1) getYhat(fit1) fit1=lm(Sepal.Length~D2*Sepal.Width+Sepal.Width*D1+Petal.Width,data=iris1) getYhat(fit1) fit3=lm(Sepal.Length~D2*Sepal.Width+Sepal.Width*D1+Petal.Width*D1+Petal.Width*D2,data=iris3) getYhat(fit3,mode=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.