/* Testing hypotheses */ /* In LIMDEP7, Wald tests can be computed for any restriction LR tests are handy only for certain restrictions: equality between parameters or zero restriction For example, Hypo 1: b(1) = 0, b(2) = b(3) Hypo 2: b(1) = 0, b(2) = b(3), b(4) = b(2)+ b(3) + b(4) Hypo 2: b(1) = 0, b(2) = b(3), b(4)^2 = b(5) Wald can be used for any of these hypotheses. LR is easy to use for Hypo 1. */ /* Testing hypo 1 */ ? Unrestricted Model namelist ; x = one,ed,urb,minor,lofinc $ probit ; lhs = emp ; rhs = x ; maxit = 1000 $ matrix ; uprb = b ; uprc = varb $ calc ; ulogl = logl $ ? Restricted Model probit ; lhs = emp ; rhs = x ; maxit = 1000 ; rst = 0,b2,b2,b4,b5 $ matrix ; rprb = b $ calc ; rlogl = logl $ ? [Wald Test] title; Wald test for b1 = 0 and b2 = b3 $ wald ; labels = b1,b2,b3,b4,b5 ; start = uprb ; var = uprc ; fn1 = b1 ; fn2 = b2 - b3 $ ? [LR test] title; LR test for b1 = 0 and b2 = b3 $ calc ; list ; lrt = 2*(ulogl - rlogl) ; pval = 1 - chi(lrt,2) $ /* Wald for hypo 3 */ title; Wald test for b1 = 0, b2 = b3 and b4^4 = b5 $ wald ; labels = b1,b2,b3,b4,b5 ; start = uprb ; var = uprc ; fn1 = b1 ; fn2 = b2 - b3 ; fn3 = b4^2 - b5 $