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: comparing nested models
From
Austin Nichols <[email protected]>
To
[email protected]
Subject
Re: st: comparing nested models
Date
Thu, 3 Feb 2011 11:30:39 -0500
Nikolas Asasa <[email protected]>:
You have several options, but one obvious choice is to include the
additional dummy variables for age in 10 categories and test whether
all their coefficients are zero (should be a test of 5 add'l coefs):
sysuse nlsw88, clear
g a10=min(max(age,35),44)
g a5=a10-(mod(a10,2)==0)
ta a10 a5
forv a=36/44 {
g agedummy`a'=a10==`a'
}
forv a=37(2)44 {
g a5dummy`a'=(a5==`a')
}
reg wage a*dumm*, nohe
testparm agedumm*
On Thu, Feb 3, 2011 at 11:09 AM, Nikolas Asasa <[email protected]> wrote:
> Dear All,
> I have two models aiming to estimate effect of age on wage. In the first model age is recorded in 5 categories. In the second model age is recorded in 10 categories.
> The question is how to compare goodness of fit of two models?
>
> In principle I would apply F-test, but I am not sure whether "test" procedure in Stata allows me to do it? Should I use ANOVA instead?
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/