I just want to double check my work if possible:
I am trying to reproduce one model produced in the following manuscript:
Forecasting imbalances in the global health labor market and devising policy responses | Human Resources for Health | Full Text (biomedcentral.com)
Model #2 (Demand), under "Regression equations used to estimate need, demand, and supply". It is quoted below but better visualized above:
In this case I am not trying to extrapolate predicted values, just to predict the residuals for the values in the dataset. Here is what I did:
I am trying to reproduce one model produced in the following manuscript:
Forecasting imbalances in the global health labor market and devising policy responses | Human Resources for Health | Full Text (biomedcentral.com)
Model #2 (Demand), under "Regression equations used to estimate need, demand, and supply". It is quoted below but better visualized above:
ln(physicians per 1000 population it)=β0+β1∗ln(GDP per capita it−1)+β2∗ln(GDP per capita it−4)+β3∗ln(GDP per capita it−5)+β4∗ln(OOPPC it−2)+β5∗ln(Pop65 it−3)+μi+ξit
where μ i represents a vector of country fixed effects, ξ it is the disturbance term, and β coefficients are unknown parameters to be estimated from the model. A generalized linear model (GLM) with a normal distribution and identity link function was used to fit a linear regression using a maximum likelihood estimator. Predicted values of logged physician densities from this model were then transformed with an antilog and multiplied by a correction factor e^(σ^2)/2 to account for the skewed distribution.
where μ i represents a vector of country fixed effects, ξ it is the disturbance term, and β coefficients are unknown parameters to be estimated from the model. A generalized linear model (GLM) with a normal distribution and identity link function was used to fit a linear regression using a maximum likelihood estimator. Predicted values of logged physician densities from this model were then transformed with an antilog and multiplied by a correction factor e^(σ^2)/2 to account for the skewed distribution.
Code:
glm ln_physiciansper1000peoples_i L.ln_gdppercap2017 L4.ln_gdppercap2017 L5.ln_gdppercap2017 L2.ln_ooppercap L3.ln_pop65overcount i.countrycode1, family (gaussian) link(identity) ml vce(cluster countrycode1) predict residuals, mu sum resid, detail gen error_variance = r(Var) gen ln_physdemand2=exp(residuals)*exp((error_variance)/2)
Comment