* * Example 10.8 from page 349 * cal 1913 open data fertil3.raw * * "t" is a pre-defined variable in RATS, so we've renamed it as "trend" * data(org=columns) 1913:1 1984:1 gfr pe year trend tsq pe_1 pe_2 pe_3 $ pe_4 pill ww2 tcu cgfr cpe cpe_1 cpe_2 $ cpe_3 cpe_4 gfr_1 cgfr_1 cgfr_2 cgfr_3 cgfr_4 gfr_2 * * If it didn't exist in the data set, the trend and trend squared could be * created by * set trend = t set tsq = t**2 * * The variable "t" refers to the current entry in a SET instruction * linreg gfr # constant pe ww2 pill trend linreg gfr # constant pe ww2 pill trend tsq