Last chance! 50% off unlimited learning
Sale ends in
coef
method for class "block_aov
".
# S3 method for block_aov
coef(object, num = NULL, ...)
An object of class "block_aov
", usually, a result of a
call to build_model
.
Numeric vector with the index of model(s) from which to return the coefficients.
Further arguments passed to or from other methods.
The coefficients of block(s) `num`, or if `num` is NULL, a list of coefficients from all blocks.
build_model
, fitted.block_aov
,
residuals.block_aov
# NOT RUN {
# 2 blocks: Petal.Length; Petal.Length + Petal.Width
model1 <- build_model(Sepal.Length, Petal.Length, Petal.Width, data=iris, model='lm')
summary(model1)
coef(model1) # returns both blocks 1 and 2
# 2 blocks: Species; Species + Petal.Length + Petal.Width + Petal.Length:Petal.Width
model2 <- build_model(Sepal.Length, Species, c(Petal.Length * Petal.Width), data=iris, model='lm')
summary(model2)
coef(model2, num=2) # returns second block
# }
Run the code above in your browser using DataLab