* * Example 6.3 from page 195 * open data attend.raw data(format=free,org=columns) 1 680 attend termgpa prigpa act final atndrte hwrte frosh soph skipped stndfnl * set prigpasq = prigpa**2 set actsq = act**2 set gpabyatndrte = prigpa*atndrte * linreg stndfnl # constant atndrte prigpa act prigpasq actsq gpabyatndrte * * Test the two attendance rate variables * exclude # atndrte gpabyatndrte * stats prigpa compute gpamean=%mean * * This will compute the value and the standard error for the function of the coefficients * summarize(title="Effect of Attendance Rate at Mean GPA") %beta(2)+%beta(7)*gpamean * * Doing this by reparameterizing the regression * set centered = (prigpa-gpamean)*atndrte linreg stndfnl # constant atndrte prigpa act prigpasq actsq centered * * Reparameterize the GPA squared term as well * set centgpasq = (prigpa-gpamean)**2 linreg stndfnl # constant atndrte prigpa act centgpasq actsq centered