giftpoints.blogg.se

Update rstudio
Update rstudio




update rstudio
  1. #Update rstudio update#
  2. #Update rstudio software#

Lm(formula = log(perm) ~ area + peri + shape + area:peri, data = rock) This fitted model is now: > summary(rock.mod2) The first function argument is the name of the model we fitted previously and the periods indicate that we want to use the same response variable and to start with the whole formula but add an interaction term between area and perimeter – the colon is used to specify an interaction term by itself. In the case of adding an interaction term our call would be: > rock.mod2 = update(rock.mod1. The new formula can use the period as short hand for keep everything on either the left or right hand side of the formula and the plus or minus sign used to add or remove terms to the model.

#Update rstudio update#

The update function has various options and the simplest case is to specfiy a model object and a new formula. Given this model, saved as an object rock.mod1, we might be interested in considering adding an interaction term between the area and perimeter measurements. Residual standard error: 0.8521 on 44 degrees of freedom Lm(formula = log(perm) ~ area + peri + shape, data = rock) One model that can be used as a starting point is a linear model with additive terms for the three variables: > rock.mod1 = lm(log(perm) ~ area + peri + shape, data = rock)

update rstudio

#Update rstudio software#

When fitting statistical models to data where there are multiple variables we are often interested in adding or removing terms from our model and in cases where there are a large number of terms it can be quicker to use the update function to start with a formula from a model that we have already fitted and to specify the terms that we want to add or remove as opposed to a copy and paste and manually editing the formula to our needs.Ĭonsider the oil-bearing rocks data set that is available with the R software which is used extensively as an example by many authors.






Update rstudio