I just have a quick question. I am running an ordered probit regression in R. I have classified my variables into numeric or factor accordingly, but I am having issues with one of the independent variables that has only one level. The variable consists on selecting if you work in a Private Company. There is a separate variable to select if you work in a Non-private Company. How can I merge them into a variable with two levels?

Thank you in advance!

  • $\begingroup$ Have you thought of merging them into a variable with two levels? $\endgroup$ – mdewey Sep 3 '16 at 14:09
  • $\begingroup$ How can I do that? $\endgroup$ – A.P. Sep 3 '16 at 14:11
  • $\begingroup$ Try typing ?ifelse at the terminal for instructions. $\endgroup$ – mdewey Sep 3 '16 at 14:22
  • $\begingroup$ I cant find a merging code with ?ifelse. $\endgroup$ – A.P. Sep 3 '16 at 14:36
  • $\begingroup$ Try asking on R-Help or StackOverflow with a reproducible example as this is not really a statistical question now. $\endgroup$ – mdewey Sep 3 '16 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.