> multinomial <- function(link) + { + switch(link, identity = "multinomial.identity", logit = "multinomial.logit", probit = "multinomial.probit", + cauchit = "multinomial.cauchit") + } > glm(categorical_FOD_FODs ~ Condition_FODs + Language_used_FODs + Condition_FODs*Language_used_FODs, + family = multinomial("identity"), data = indvar_FODs) Error in get(family, mode = "function", envir = parent.frame()) : object 'multinomial.identity' of mode 'function' was not found edit the code to run without error
multinomial <- function(link) { switch(link, identity = "multinomial.identity", logit = "multinomial.logit", probit = "multinomial.probit", cauchit = "multinomial.cauchit") } glm(categorical_FOD_FODs ~ Condition_FODs + Language_used_FODs + Condition_FODs*Language_used_FODs, family = multinomial("identity"), data = indvar_FODs)