0

If there are three x variables, how do ID which one is the reference? When I run:

enter image description here How can I tell which is my reference group? is it just the first one, normal?

sam.cold
  • 17
  • 6
  • Hi - we need to know a lot more before we can help you. You say there are three variables, from what? Reference for what? A linear or logistic model? What is the structure of your data? Please edit your question to provide more detail and code. – jpsmith Dec 09 '21 at 03:24
  • Hi! sorry, really new to this. Updated! – sam.cold Dec 09 '21 at 03:34
  • 1
    The reference group is the first group. If you have not defined a factor and set the order of the categories, R uses alphabetical. From your output picture it seems that `bpcat` is a factor with levels Normal, Elevated, Hypertension in that order. See the output from `levels(ii$bpcat)`. In your example, the reference level is represented by `(Intercept)` and the other two levels are adjustments to that base, e.g. for Elevated, `(Intercept) + bpcat$Elevated`. – dcarlson Dec 09 '21 at 03:37
  • The default is always the first level. See the dup for how you can set which ever reference level you want to use. – MrFlick Dec 09 '21 at 03:45
  • Awesome! thank you! and also, is the intercept then always using the reference as the x=0? – sam.cold Dec 09 '21 at 05:13
  • @MrFlick so if there is a dummy variabel coded 1=women and 0=men then the reference group is men=0? – rr19 Dec 04 '22 at 18:02

0 Answers0