How to calculate standard error in stata
My hunch is that if you eliminate the two random slopes whose variance component estimates are effectively zero, and keep the independent structure, Stata will be able to calculate standard errors for the remaining ones.The questions posed by standard analyses in health services research often require evaluation not only of estimated parameters (e.g., regression coefficients) but also functions of estimated parameters. With cov(uns) it is, p*(p-1)/2, which is always larger, and even for fairly small p is much larger. With cov(ind) the number of parameters to be estimated is just the number of random intercepts and slopes. If anything it would make the problem worse because an unstructured covariance matrix has many more parameters that require estimation.
![how to calculate standard error in stata how to calculate standard error in stata](https://www.stata.com/stata-news/news34-2/spotlight/i/margins.png)
As I've indicated, it would take some unusual data for that to be the case here.Īs for trying to get standard errors, it is unlikely that going to unstructured would be helpful. So do some back of the envelope calculations, and just figure out whether in practical terms these random slopes can make a meaningful contribution to your model. Can it even begin to compare with, say the residual error or even the variation in the random intercept, both of which are many orders of magnitude larger in your results. And even if it isn't, unless the values of nina itself range so large that 6.4X10 -6 times a typical value of nina is an appreciably large number, you are still talking about slope variation that cannot make a visible impact on your model's predictions and can easily be dropped. But assuming that these are typical variables in typical data sets, a difference of 6.4 X 10 -6 is going to be a negligible compared to the average nina slope. Now, I don't know how your variables are scaled or what your average nina slope turned out to be. So the implication is that for an idsc that is fully 4 standard deviations above or below the mean, that entity's slope for nina is about 6.4 X 10 -6 away from the average entity's nina slope.
![how to calculate standard error in stata how to calculate standard error in stata](https://i1.wp.com/www.theanalysisfactor.com/wp-content/uploads/2015/07/stata2_img3.png)
In the standard deviation scale, this is about 1.6 X 10 -6. In your situation, your best estimate of the variance of the random intercept for nina is 2.54 X 10 -12. I prefer to look at the impact on model predictions and model fit. Well, that is one way to do it, although I generally don't like using significance testing to select model structure. My questions are: Do I have a problem with the specification of my model? Are the fixed/random estimates trustly to use? What recommendations do you have? I'm using Stata 14 and the dataset have 1,148 observations clustered in 119 groups.įinally, I would tried to keep the random slopes that are significantly different to zero as Clyde recommended, I'm using the likelihood ratio test for this.
![how to calculate standard error in stata how to calculate standard error in stata](https://i2.wp.com/www.thedatahall.com/wp-content/uploads/2020/06/1-2.png)
I noticed that if I set only two variables to have a random slope, mixed is able to compute the standard error, but if I set three or more variables it fails to do it. I set an independent covariance structure. I have 16 covariates at student level and 11 covariates at school level. Where $x1 $x2 are the first and second level variables, respectively. * mixed puntaje_estandar $x1 $x2 || idsc: $rand, cov(ind) vce(robust) ml pw(bsw) pwscale(effective)
![how to calculate standard error in stata how to calculate standard error in stata](https://www.statology.org/wp-content/uploads/2020/03/robustErrorsStata2-1024x487.png)
I'm calculating a mixed model for educational achievement but, when I specify three variables (isecf, nina & prekfor6) to have a random slope between schools, I get the following output for the random effects: