In a randomised trial of a new treatment (treat 0,1), the primary outcome is the number of hours of illness (hours); hours is log-normal (lnhours). Rather than 'regress lnhours', Charles Huber suggests using 'gsem' so that the SE of the variance of the errors is calculated (and he then discusses the use of 'poisson'). Using Stata 16.1 in Windows 10:
Code:
gsem lnhours <- i.treat i.x2 i.x3
Code:
display exp(_b[1.treat])
Code:
margins, expression(exp(predict(eta))*(exp((_b[/var(e.lhours)])/2)))at(treat=(0 1))
But how do I calculate the correct 95% CI for the ratio of 0.65596214 (treat=1/treat=0)?
I'd be grateful for advice..
Frank Shann
0 Response to Unbiased 95% CI of an x variable in y units after gsem ln(y)
Post a Comment