Displaying 1 result from an estimated 1 matches for "main_effects_model".
2024 Jun 06
2
R Shiny Help - Trouble passing user input columns to emmeans after ANOVA analysis
...d <- cols$random
lmer(dep ~ indep1 * indep2 + (1|rand), data = data)
})
# Run two-way ANOVA model with interaction
output$model_summary <- renderPrint({
req(interaction_model())
Anova(interaction_model(), type = c("III"))
})
# Build main effects ANOVA model
main_effects_model <- reactive({
cols <- selected_columns()
req(cols)
data <- data()
data$dep <- cols$dependent
data$indep1 <- cols$independent1
data$indep2 <- cols$independent2
data$rand <- cols$random
lmer(dep ~ indep1 + indep2 + (1|rand), data = data)
})
#...