Generation

generate functionTue, 18 Apr 2023

> table(indvar_FODs$categorical_FOD_FODs) ascending descending identity 1683 1432 206 > table(indvar_FODs$Condition_FODs) A B C D 880 880 880 880 > table(indvar_FODs$Language_used_FODs) English German Hungarian Italian Turkish 880 160 160 160 2160 categorical_FOD_FODs is the dependent variable. how can I apply multinomial logistic regression with interaction effect Treat each level of the Condition_FODs variable (4 levels) and Language_used_FODs variable (5 levels) equally. include the interaction effect of variables in the analysis.

## create a design matrix FODs_design <- model.matrix(~Language_used_FODs*Condition_FODs , data=indvar_FODs) FODs_design <- FODs_design[,-1] head(FODs_design) attach(indvar_FODs) FODs_model <- multinom(categorical_FOD_FODs ~ Language_used_FODs*Condition_FODs , data=indvar_FODs, Hess=TRUE) summary(FODs_model) summary(FODs_model)$coefficients aic(FODs_model) anova(FODs_model, type="Chisq") Analysis of Deviance Table Model: multinom(formula = categorical_FOD_FODs ~ Language_used_FODs * Condition_FODs, data = indvar_FODs, Hess = TRUE) Terms added sequentially (

Questions about programming?Chat with your personal AI assistant