Hello all,
I am trying to replicate code from SAS to Stata, and I am also struggling with specifying weights. Here is the SAS code, for example:
1- any suggestion how this code can be written in Stata with the menl command? I guess it would be like this, but please correct me if wrong.
2- My concern is about the "replicate ipw" above, which weights the data to account for sampling (pweights).
Many thanks for your time and help. I very much appreciate it.
Best,
Walid
I am trying to replicate code from SAS to Stata, and I am also struggling with specifying weights. Here is the SAS code, for example:
Code:
proc nlmixed data= mydata; odds= exp(b0)*(1+b1*A + b2*B + b3*A*B); model y ~ binary(odds/(1+odds)); replicate ipw; run;
Code:
menl y= {odds:}/(1+{odds:}), define(odds:exp({b0})*(1+ {b1}*A + {b2}*B + {b3}* A*B))
Many thanks for your time and help. I very much appreciate it.
Best,
Walid
Comment