given the outcome variable in a dataframe is a factored variable, when regressing the DV onto a set of IVs, what is the model predicting? The probability that the DV is the first level of the factor? Or the second?
A related question - I know that given a numerical column of 1s and 0s, a logistic regression would model the probability of the higher order variable (i.e., value=1), so I have been attempting to recode the factor "character" variable into numerical. I am coming from a SAS background, so I am entirely to used to if var = "yes" then var_num = 1; else var_num=0;
That's clearly wrong. What's the most efficient way you have found to recode such variables?