tobit(model,data=rigid25,right=U)tobit(model,data=rigid25,right=U, left=0)Thanks you very much! You’re correct that AER:tobit defaults to left=0, but in my case the actual data meant that specifying left=0 wasn’t needed. As it happens, the tobit results in my note agree with a result in the published literature, so the tobit results aren’t in question.
So my real question is: what’s wrong with my stan implementation such that it doesn’t agree with the tobit results? I’m sorry if that wasn’t clear in my original posting.
From: stan-...@googlegroups.com [mailto:stan-...@googlegroups.com]
On Behalf Of Jonah Gabry
Sent: Wednesday, April 20, 2016 2:57 PM
To: Stan users mailing list <stan-...@googlegroups.com>
Subject: [stan-users] Re: beginner requests help: censored regression
The Stan code from the manual at the bottom of pg. 108 (and top of 109) is just for right censoring so it wouldn't be equivalent to your use of the tobit function, which I think defaults to left censoring at 0. That is, I'm pretty sure the default in AER::tobit is left = 0 so your formula
tobit(model,data=rigid25,right=U))
is really equivalent to
tobit(model,data=rigid25,right=U, left=0)
If you only want right censoring then I think you need to set
left = -Inf.
Hope that helps,
Jonah
--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/stan-users/1tnXA0WiSx0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
stan-users+...@googlegroups.com.
To post to this group, send email to
stan-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I'll take a look at your Stan code, but in case it's not immediate apparent what the problem is, is the data you're using available somewhere (or small enough to share) or could you reproduce the issue with simulated data? It's typically easier to diagnose issues when we can run the model.
Thanks you very much! You’re correct that AER:tobit defaults to left=0, but in my case the actual data meant that specifying left=0 wasn’t needed. As it happens, the tobit results in my note agree with a result in the published literature, so the tobit results aren’t in question.
So my real question is: what’s wrong with my stan implementation such that it doesn’t agree with the tobit results? I’m sorry if that wasn’t clear in my original posting.
From: stan-...@googlegroups.com [mailto:stan-users@googlegroups.com] On Behalf Of Jonah Gabry
Sent: Wednesday, April 20, 2016 2:57 PM
To: Stan users mailing list <stan-...@googlegroups.com>
Subject: [stan-users] Re: beginner requests help: censored regression
The Stan code from the manual at the bottom of pg. 108 (and top of 109) is just for right censoring so it wouldn't be equivalent to your use of the tobit function, which I think defaults to left censoring at 0. That is, I'm pretty sure the default in AER::tobit is left = 0 so your formula
tobit(model,data=rigid25,right=U))
is really equivalent to
tobit(model,data=rigid25,right=U, left=0)
If you only want right censoring then I think you need to set left = -Inf.
Hope that helps,
Jonah
--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/1tnXA0WiSx0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+unsubscribe@googlegroups.com.
To post to this group, send email to stan-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/1tnXA0WiSx0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+unsubscribe@googlegroups.com.
increment_log_prob(N_cens * normal_ccdf_log(U, mu, sigma))increment_log_prob(normal_ccdf_log(U, x_cens * beta, sigma)) ;
Thanks very much! (And the explanation wqs a bit of an embarrassment for me - I really should have noticed).