| Subject: | XploRe: Learning Guide |
| See XploRe: |
| Quantlet: | metric01 | |
| Description: | Illustrates Tobit estimation. | |
| Download: | metric01.xpl |
library("metrics")
randomize(241200)
n = 500
k = 2
x = matrix(n)~aseq(1, n ,0.25)
s = 8
u = s*normal(n)
b = #(-9, 1)
ystar = x*b+u
y = ystar.*(ystar.>=0)
tstep = tobit(x,y)
tstep.b
tstep.s
tstep.cv
dg = matrix(rows(tstep.cv),1)
dig = diag(dg)
stm = dig.*tstep.cv
std = sqrt(sum(stm,2))
coef = tstep.b|tstep.s
coef~(coef./std) ; t-ratios
| Subject: | XploRe: Learning Guide |
| See XploRe: |