Home » Data » General Data Questions » Calculating fixed and random effects
Calculating fixed and random effects [message #14875] |
Thu, 10 May 2018 14:30 |
Ghose
Messages: 17 Registered: May 2018
|
Member |
|
|
Dear forum members,
I am approaching with regard to Nepal DHS (2016) data that I am using to measure the prevalence of diarrhea in six regions. I'd like to calculate the random effects accounting for the differences across regions. Can anyone kindly mention the process or share the commands to execute this in STATA.
The variables are as follows:
(DV)Diarrhea
(IVs) mother's_age region religion education wealth child's_age sex
Thanks in advance for your help
Best regards
Ghose
|
|
|
|
|
Re: Calculating fixed and random effects [message #14913 is a reply to message #14890] |
Mon, 14 May 2018 14:26 |
Bridgette-DHS
Messages: 3199 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS Stata Specialist, Tom Pullum:
DHS always advises that you make three adjustments for the survey design, with svyset and svy if you are using Stata. In order of importance, these are the sample weights, to eliminate a bias toward the over-sampled strata; an adjustment for the clusters, to account for intra-class correlation within the PSUs or clusters; and an adjustment for stratification. The full svyset command is this: "svyset v001 [pweight=v005], strata(stratmid) singleunit(centered)". Where I have put "centered" you could instead put "scaled" or "uncertainty" with little difference. Where I have put v001 you could put v021 (usually, v001=v021). "stratumid" is v022 or v023 in most surveys. There have been many postings about svyset.
The position for v001 within this command, which identifies it as the primary sampling unit, actually specifies that there is to be a random effect for v001. You do not need a separate specification of a random effect for clusters.
Because you have only 5 countries, you should have fixed effects, rather than random effects, for countries. On the right hand side of the model you would have something like "i.country", where country takes the values 1, 2, 3, 4, 5, say.
Having said this, I strongly advise against pooling countries this way. It makes much more sense to do a separate analysis for each country and then present the results side by side. If you pool the countries, you will be describing an "average" for the five countries, with complexities about whether the countries are weighted by sample size or population size, etc. Wouldn't be more interesting to do separate analyses and see how they are similar and how they are different. Even within a country, particularly within India, there is huge variation. You can do statistical tests of whether coefficients, means, proportions, etc. in one country are significantly different from the corresponding terms in another country.
|
|
|
Re: Calculating fixed and random effects [message #15126 is a reply to message #14913] |
Wed, 06 June 2018 11:27 |
Hassen
Messages: 121 Registered: April 2018 Location: Ethiopia,Africa
|
Senior Member |
|
|
Dear Bridgette and Dr.Tom Pullum Thank you very much!! I have learned a lot from your always fruitful posts.
With Best Wishes,Hassen
Hassen Ali(Chief Public Health Professional Specialist)
|
|
|
|
|
|
|
|
Re: Calculating fixed and random effects [message #26377 is a reply to message #26363] |
Tue, 14 March 2023 13:28 |
Bridgette-DHS
Messages: 3199 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS staff member, Tom Pullum:
With a fixed effects model, Stata will run into problems with the sample size in the districts. The omitted districts didn't have cases in all combinations of the covariates. I believe that if you rerun with "asis" included as an option after the comma, it may work. Otherwise, a random effects model would be ok. A very rough rule of thumb is that a random effects model is ok if there are more than 30 units (and you have 80).
|
|
|
Goto Forum:
Current Time: Sat Nov 23 05:54:09 Coordinated Universal Time 2024
|