View source: R/extract_estimates.R
extract_estimates | R Documentation |
Extracts and sums the LS estimates for a given factor combination
from an object of class hdanova
. If add_residuals
is TRUE
,
the residuals are added to the LS estimates. If substract
is TRUE
,
the returned matrix is the data with chosen estimates subtracted.
extract_estimates(object, factors, subtract = FALSE, add_residuals = FALSE)
object |
|
factors |
|
subtract |
|
add_residuals |
|
A matrix of the extracted estimates.
# Load candies data
data(candies)
# Basic HDANOVA model with two factors and interaction
mod <- hdanova(assessment ~ candy * assessor, data=candies)
# Extract estimates for the interaction
inter <- extract_estimates(mod, c("assessor:candy"))
# Visualize the interaction effect
image(t(inter), main="Interaction effect", xlab="Attribute", ylab="Sample")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.