predict.afex_aov | R Documentation |
afex_aov
objectsPredicted values based on afex_aov
objects.
## S3 method for class 'afex_aov'
predict(object, newdata, append = FALSE, colname_predict = ".predict", ...)
object |
|
newdata |
An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used. |
append |
If set to |
colname_predict |
Name of the appended column when |
... |
Not used. |
A vector of predicted values corresponding to the data in
object$data$long
or to newdata
, or if append = TRUE
a
data frame with an additional column of predicted values.
Mattan S. Ben-Shachar
data(obk.long, package = "afex")
# estimate mixed ANOVA on the full design:
fit <- aov_ez("id", "value", obk.long, between = c("treatment", "gender"),
within = c("phase", "hour"), observed = "gender")
new_data <- expand.grid(
treatment = "A",
gender = "F",
phase = c("pre", "post"),
hour = c(1, 5)
)
predict(fit, newdata = new_data)
predict(fit, newdata = new_data, append = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.