Page 1 of 1

Re: Why is the estimation of the standard deviation of the error component negative?

Posted: 29 Aug 2023, 15:18
by dpalma
Hi,

There is nothing wrong with your model. This is a consequence of how Apollo works.

In Apollo, you usually define random components as follows:

Code: Select all

randCoeff[["beta"]] = mu + sigma*draws
From a mathematical perspective, if we consider "draws" as a random variable following a symmetrical distribution centred around zero (e.g. a standard normal distribution), the only thing that matter is the magnitude (the absolute value) of "sigma". If you take "sigma" or "-sigma" you would get the exact same distribution for "beta".

Now, if after estimating you model, you try calculating the likelihood (LL) of your model with your estimated parameters, but changing the sign of sigma (e.g. from negative to positive) you should get a very similar LL that the optimal LL. It will not be exactly the same because "draws" is not an ideal probability distribution, but instead a set of draws from the desired distribution. These draws are almost never perfectly symmetrical around zero, which explains the difference.

But in summary, negative s.d. are nothing to worry about. You can read a bit more about it in the F.A.Q.

Best wishes
David

Re: Why is the estimation of the standard deviation of the error component negative?

Posted: 30 Aug 2023, 02:54
by sisizhao
Dear professor,

Thank you very much for your reply.
I added restrictions on estimating the standard deviation of the error components. Make the estimate must be greater than 0.
This gives me a positive standard deviation. The difference from the previous negative standard deviation is not very large.
I think I can move on to the following research.
Please forgive me for deleting my code as the article is not yet published and there are privacy issues involved.
For your help, I feel very grateful.
Thank you again.

Kind regards

Re: Why is the estimation of the standard deviation of the error component negative?

Posted: 31 Aug 2023, 13:30
by dpalma
Happy to hear applying constraints worked out, and the new value positive value is close in magnitude to the original negative one.

Best wishes
David

Re: Why is the estimation of the standard deviation of the error component negative?

Posted: 02 Sep 2023, 08:44
by sisizhao
Dear David,

I found the restriction to be infeasible in subsequent calculations. Because of the restriction on the estimated standard deviation of the error component, some small negative estimates before would report 'NA'. And I found that some of the previously negative estimates would still have some variation after restricting to positive. So I guess this is not feasible.
May I ask if I can take absolute values for the estimates of the standard deviation of these error components? How is this implemented in R by code?
Another question is, or can I just take the negative estimates of the standard deviation of the error components and remove the minus sign to become positive and quote them directly in my paper? After all, I really don't know how to explain the negative values.
I would appreciate it if you could continue to respond to me.

Kind regards,
Zhao

Re: Why is the estimation of the standard deviation of the error component negative?

Posted: 18 Sep 2023, 09:15
by stephanehess
Zhao

there is really no reason for imposing the sign constraint, as David says, or to try to work with absolute values. It's exactly the same whether the parameter is negative or positive.

If it really bothers you, you could apply an exponential transform, but as described in the FAQ, this will hinder estimation performance

Stephane

Re: Why is the estimation of the standard deviation of the error component negative?

Posted: 19 Sep 2023, 04:45
by sisizhao
Thank you professor.
I ended up trying a lot of different distributions, trying different appropriate initial values for mu and sigma for the random parameter and the error components, and finally got all the standard deviations of the error components to be positive. I think I gained a lot of experience from this constant trial and error process. Thank you very much for your help.

Re: Why is the estimation of the standard deviation of the error component negative?

Posted: 19 Sep 2023, 13:04
by stephanehess
Hi

but do you see the point that the sign doesn't matter unless you look at capturing correlations?

Stephane