简体   繁体   中英

R survey logistic regression with multiple levels in response/dependent variable

I have been using the R survey package to run multivariable logistic regressions (multiple independent variables, both categorical and continuous, with some of the categorical variables having multiple levels).

I am using the svyglm function.

Is it possible to use the same method if the dependent variable has multiple levels that are ordered, ie A < B < C < D < E? What about unordered? Right now, my dependent variable only has two levels (ie 0 and 1). If ordered is possible, do I need to convert them into integers?

Thank you!

For an ordered polychotomous DV, you would want ordinal logistic regression , which is available in the MASS package (see MASS::polr() ). For an unordered DV, you'd want multinomial regression , available in the .net package (see .net::multinom() ).

And no, you wouldn't convert your ordered DV to integers; you would create an ordered factor like this:

df$var1 <- ordered(df$var1, levels = c("A", "B", "C", "D", "E"))

For dependent variables that are categorical where order matters (for example, trying to predict what star rating a movie will receive on a 5-star scale where 1 is the worst and 5 is the best), you will want to run an Oridinal Logistic Regression model - also sometimes called a Proportional Odds model.

Keith McNulty has written a great explanation of this, with tutorials in R, It has a walkthrough example of how to set up your model: as well as how to interpret the results: https://peopleanalytics-regression-book.org/ord-reg.html

When the dependent variable is unordered and there are more than two possible outcomes, you will want to run a mulitnomial regression model, found here: https://peopleanalytics-regression-book.org/multinomial-logistic-regression-for-nominal-category-outcomes.html

If your categories are unordered but you ONLY have two possible outcomes, you will want to run a binary logistic regression: https://peopleanalytics-regression-book.org/bin-log-reg.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM