Hello everyone, im testing over dispersion in a count variable. I'm using Hilbe's book "Negative binomial regression" for the analysis. He used the formula LR = −2(LP − LNB), but calculate it by hand and then used chiprob(1, result)/2. All my independent variables are presence or ausence of drug consumption, that means i have to adjust models separately.
local sus binoh bintab binmar bincoc binpas
foreach var of local sus {
poisson num_psex `var' sexo i.or_sexual i.tramo_etario edad_inicio nse
estimates store m1
nbreg num_psex `var' sexo i.or_sexual i.tramo_etario edad_inicio nse
estimates store m2
lrtest m1 m2
}
test involves different estimators: nbreg vs. poisson
this is what i got. And it make sense because im not using the same function. I need to store the log likelihood of my models and then use the formula, but i dont know how to make it efficient.
Please, i need some ideas. Thank you very much.
Related Posts with LRTEST poisson vs negative binomial loop
Conducting a Cross Sectional studyI am conducting a cross-sectional study of 99 UK firms in 2017. I aim to find a positive/negative re…
Transform data set to sub-periods with corresponding averages of all other variablesDear Statalist,
After been using the advices here for several years without being a member, it is n…
Marginal Estimate in Binary logisticHello, I am writing my masters thesis and I am using SPSS to run binary logistic regression analysis…
DID issue-----how to add industry and fixed effect to diff commandHi,
Does any one know how to add year and industry fixed effect (sum of Year fixed effecti,t) as co…
Model fit indices and standardized estimates after multiple imputation and mi estimate, cmdok: semHi all,
Could someone tell me how I get model fit indices and standardized estimates after having d…
Subscribe to:
Post Comments (Atom)
0 Response to LRTEST poisson vs negative binomial loop
Post a Comment