Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Test for significance of the difference between knee locations?
From
Austin Nichols <[email protected]>
To
[email protected]
Subject
Re: st: Test for significance of the difference between knee locations?
Date
Thu, 18 Oct 2012 22:32:07 -0400
Joerg Luedicke <[email protected]>:
Stata 12 allows you to test coefs that have no corresponding variables
in the data; Stata 11 gives an error msg, so you must instead:
test _b[k1]==_b[k2]
On Thu, Oct 18, 2012 at 6:12 PM, Joerg Luedicke
<[email protected]> wrote:
> I was just putting together some example code, similar in principle to
> Austin's code, but encountered difficulties with the -test- command.
> If we use Austin's code:
>
> *--Austin Nichols' code--
> sysuse nlsw88, clear
> *compare extremum positions for quadratics, e.g. for
> *tw qfit wage age if union==0||qfit wage age if union==1
> reg wage c.age##c.age##i.union, nohe
> loc 1 (k1:-_b[age]/_b[c.age#c.age]/2)
> loc 2 (k2:-(_b[age]+_b[1.union#c.age])/
> loc 2 `2'(_b[c.age#c.age]+_b[1.union#c.age#c.age])/2)
> nlcom `1' `2', post
> test k1==k2
> *-------------------------------
>
> I get an error message after -test k1==k2-:
>
> . test k1==k2
> k1 not found
> r(111);
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/