R package for estimating probit with ordinal independent variables? -


I want to estimate a regression model where the dependent variable is a dummy (coded 0/1) and I have five Or six consecutive independent variables (I will be dummy out), as well as a bunch of other things. Can someone suggest a package that will dummy-out with at least nuisance or otherwise handle sequential RHS variables? Thank you

You can do all this with the built in glm function, In addition, proper use of factor around variables in your formula should be done in the dummy variable.

Example:

  R> Y & lt; - Rbbnnom (100, 1, .5) R & gt; X1 & lt; - Sample (1: 5, 100, Replace = TRUE) R & gt; X2 & lt; - Sample (1: 5, 100, Replace = TRUE) R & gt; M1 and LT; - Glam (y ~ factor (x1) + factor (x2), family = binomial (link = "check"))> R & gt; M1 call: GLM (formula = yector = factor (x1) + factor (x2), family = binomial (link = "check") coefficient: (blocking) factor (x1) 2 factor (x1) 3 factor (x1) 4 factor (x1) 5 factor (x2) 2 0.335 -0.72 9 -0.670 -0.639 -0.740 0.327 factor (x2) factor 3 (x2) factor 4 (x2) 5 -0.106 0.624 0.483 degrees of independence: 99 total (i.e. null); 91 Residual faucet Devines: 138 residual frightening: 129AIC: 147  

You may want to take a look at the dummies package.


Comments