* * Example 15.4 * J. Wooldridge, Econometrics of Cross Section and Panel Data * * Note: The sample data files include all required data transformations. * However, in many cases we show how these data transformations would * be created in RATS from the basic data, as this is something you will * need to know how to do in practice. * * open data keane.raw data(format=free,org=columns) 1 12723 id numyrs year choice wage educ expwc expbc $ expser manuf black lwage y81 y82 y83 y84 y85 y86 y87 enroll employ attrit exper expersq * set expersq = exper**2 * * The "status" variable isn't provided in the data set. It's constructed off the * "choice" variable. choice==1-->status=0 , choice==2-->status=1 , * choice>=3-->status=2 * set status = %if(choice==1,0.0,%if(choice==2,1.0,%if(choice>=3,2.0,%na))) * * Run this over the 1987 observations with a valid "status" * set smpl = y87.and.%valid(status) * ddv(type=multinomial,smpl=smpl) status # educ exper expersq black constant * * Test the two experience variables for the home vector. These are the 2nd and 3rd * parameters. * test(zeros) # 2 3