Hi, trying to run an LR test but getting an error. Any way to run this with the type of models I'm using? Or is there a different method to compare models like these?
Code:
. glm cv dep if include==1, fam(poisson) link(log) nolog vce(robust) eform Generalized linear models No. of obs = 1,246 Optimization : ML Residual df = 1,244 Scale parameter = 1 Deviance = 711.1348832 (1/df) Deviance = .5716518 Pearson = 969.8694409 (1/df) Pearson = .7796378 Variance function: V(u) = u [Poisson] Link function : g(u) = ln(u) [Log] AIC = .9543619 Log pseudolikelihood = -592.5674416 BIC = -8155.716 ------------------------------------------------------------------------------ | Robust cv | IRR Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- dep | 1.326143 .0272457 13.74 0.000 1.273803 1.380633 _cons | .1137594 .0091845 -26.92 0.000 .09711 .1332632 ------------------------------------------------------------------------------ Note: _cons estimates baseline incidence rate. . estimates store m1 . glm cv i.binary dep if include==1, fam(poisson) link(log) nolog vce(robust) eform Generalized linear models No. of obs = 1,246 Optimization : ML Residual df = 1,243 Scale parameter = 1 Deviance = 707.9852305 (1/df) Deviance = .5695778 Pearson = 969.663448 (1/df) Pearson = .7800993 Variance function: V(u) = u [Poisson] Link function : g(u) = ln(u) [Log] AIC = .9534392 Log pseudolikelihood = -590.9926153 BIC = -8151.738 ----------------------------------------------------------------------------------- | Robust cv | IRR Std. Err. z P>|z| [95% Conf. Interval] ------------------+---------------------------------------------------------------- 1.binary | 1.369277 .2226052 1.93 0.053 .995658 1.883095 dep | 1.320781 .0273566 13.43 0.000 1.268237 1.375502 _cons | .0884578 .0140422 -15.28 0.000 .0648056 .1207424 ----------------------------------------------------------------------------------- Note: _cons estimates baseline incidence rate. . estimates store m2 . lrtest m1 m2 LR test likely invalid for models with robust vce r(498);
Comment