Page 1 of 1

Changing values in Variance- Covariance matrix

Posted: Sun Nov 04, 2012 3:45 am
by hdilk0507
I'm using MCMC estimation to fit a binary logistic model. When I allow level 2 variables to vary across level 2 units (treat level 2 variables as random effects), after IGLS iterations, the var-covariance matrix seems not positive definite. When I attempt to start MCMC estimation it gives an error. Therefore I changed values manually and did the MCMC estimatiion. But the problem is variance and the covariances associated with that random effect tend to be zero. Further, i carried out joint significance test to see whether those variances are equal to zero and ended up concluding they are not significantly different from zero.

1. Is changing diagonal values to 0.001 and off-diagonals to 0, the reason for these approximately zero values in the var-covariance matrix after MCMC iterations?
2. If the joint significance test conclude that indeed the effects do not vary across level 2 units although we allowed, what should I do? Should I keep that random effect or should I eliminate the random effect and allow for fixed effect? (In my case although variances are zero, the estimate of the coefficient is significant according to wald test)

Please help me to solve these issues as soon as possible.

Thank You.

Re: Changing values in Variance- Covariance matrix

Posted: Thu Nov 15, 2012 5:08 pm
by billb
Dear hdilk0507,
I saw your question and have a quick answer. It really makes no sense to allow a level 2 variable to vary across level 2 units. Consider 1 level 2 unit then the predictor associated with the intercept will take value 1 for all individuals in the unit and the level 2 variable will also be constant across the unit and so you will not be able to estimate both the intercept and the level 2 variable for that unit only. It's like asking what's the effect of being a girl in a girls school and being a pupil in a girls school they are one and the same.
I hope this makes sense.
Bill.

Re: Changing values in Variance- Covariance matrix

Posted: Fri Nov 16, 2012 1:25 am
by hdilk0507
Yes your answer is helpful.

But I still have the problem described in the latter part, when I allowed level 1 variables to vary across schools. (i.e. var-cov matrix values tend to zero, does it mean the random effect is not significant?)

Re: Changing values in Variance- Covariance matrix

Posted: Fri Nov 16, 2012 8:24 am
by billb
Hi,
In the situation in which you have level 1 variables that you make random at level 2 and for some reason IGLS gives a non-positive definite answer then the advice is to change the values prior to running MCMC so that they make sense. The values you choose have 2 roles - (i) starting values for the variance-covariance parameters and (ii) if you are using the default (inverse)Wishart priors then the values are parameters effectively a prior estimate of the matrix. So to answer your question:
(i) I'd use the DIC diagnostic to compare the models
(ii) I wouldn't personally use 0.001 on the diagonals unless that was how small I thought the parameters would be and I would test prior sensitivity to the values chosen by trying different values and assessing the impact.
(iii) I'd examine the chains to check for convergence as sometimes convergence is slow and the variance parameters may not have 'escaped' from their starting point (see the chapter on parameter expansion in my MCMC book)
(iv) but to reiterate - it is important not to put level 2 variables random at level 2 as this really doesn't make sense and no adjustments as in (i)-(iii) will make it right!

Regards,
Bill.