Lab 5 uploaded

Lab 5 uploaded

by Mark Pletcher -
Number of replies: 2

Lab 5 is up on the syllabus.  It's one of our longer labs.

In reply to Mark Pletcher

Re: Lab 5 uploaded

by Mariya Samoylova -

Regarding (13), 

mhodds outcomevar predictorvar [adjustvar1 adjustvar2…], by(stratavar)

works better for me as

mhodds outcomevar predictorvar (adjustvar1 adjustvar2…), by(stratavar)

unless I specify a weight kind for my adjustment variables. Does () vs. [] automatically weight a certain way, or does it do something different?

 

Thanks,

Mariya

In reply to Mariya Samoylova

Re: Lab 5 uploaded

by Mark Pletcher -

This is one of those times that it's hard to interpret the actual written text when I try to give you the syntax of a Stata command.  What I am trying to get across with the [ ]'s is that that part of the command (the adjustment variables) is OPTIONAL.  actually the by(stratavar) is also optional.  Here are some examples that should make it clearer:

mhodds heartattack diabetes                      // heartattack is the outcome, diabetes the primary predictor

mhodds heartattack diabetes age male      // same, except now adjusting for age and male

mhodds heartattack diabetes age male, by(htn)   // same, except now ALSO stratifying by htn

You mentioned weights - I was not intending to do anything with weights here.  But you're right that weights are one of the only times that Stata actually wants you to type in brackets [ ].  Don't worry about that yet though.