Webjags >> Main page Recent changes History

Built-in models_Tobit regression

Difference between revisions from 2013/12/26 22:42 and 2013/12/26 22:41.
!Model
The Tobit model is a model proposed by James Tobin (Tobin, 1958) to describe the relationship between a limited dependent variable \(y_{i}\) and independent variables \(\mathbf{x}_{i}\). This model is widely used in econometrics and biometrics. To better understand the model, we can assume there is a latent (unobservable) variable \(y^{*}\) underlying the observed variable \(y\). The relationship between \(y^{*}\) and \(y\) is given by
{{%%
\[
y_{i}=\begin{cases}
y_{i}^{*} & \text{if }y_{i}^{*}>\tau \\
y_{i}^{*} & \text{if }y_{i}^{*}>\tau \\\\
\tau & \text{otherwise}
\end{cases}
\]
%%}}
In Tobin (1958), the threshold \(\tau=0\). The latent variable can be predicted using the independent variables as in
{{%%
\[
y_{i}^{*}=\beta_{0}+\beta_{1}x_{1i}+\ldots+\beta_{q}x_{qi}+e_{i}
\]
%%}}
with \(e_{i}\sim N(0,\sigma^{2})\).


!Code
{{
model{
for (i in 1:N){
limit[i]<-M*(1-ind[i]) - 1000000*ind[i]
mu[i]<-b[1]+b[2]*(x1[i]-mean(x1[]))+b[3]*(x2[i]-mean(x2[]))
y[i]~dnorm(mu[i],pre.phi)I(limit[i],)
}
for (i in 1:3){
b[i]~dnorm(0, 1.0E-6)
}
pre.phi~dnorm(.001,.001)
phi<-1/pre.phi
}
}}



Powered by LionWiki. Last changed: 2024/12/10 23:04 Erase cookies History