-----------------------------------------------------------------------------------
log: C:\AAA Miker Files\newer web pages\soc_meth_proj3\section6_2009.log
log type: text
opened on: 3 Mar 2009, 15:23:50
. set mem 200m
Current memory allocation
current memory usage
settable value description (1M = 1024k)
--------------------------------------------------------------------
set maxvar 5000 max. variables allowed 1.909M
set memory 200M max. data space 200.000M
set matsize 400 max. RHS vars in models 1.254M
-----------
203.163M
. use "C:\AAA Miker Files\newer web pages\soc_meth_proj3\fifty_state_dataset.dta"
> , clear
. twoway (scatter incwage US_born_pct) lfit(incwage US_born_pct)
) required
r(100);
. twoway (scatter incwage US_born_pct, mlabel(statefip)) (lfit incwage US_born_pct)
. gen US_born_pct_sq= US_born_pct^2
. regress incwage US_born_pct US_born_pct_sq
Source | SS df MS Number of obs = 51
-------------+------------------------------ F( 2, 48) = 21.69
Model | 214235674 2 107117837 Prob > F = 0.0000
Residual | 237049841 48 4938538.36 R-squared = 0.4747
-------------+------------------------------ Adj R-squared = 0.4528
Total | 451285515 50 9025710.3 Root MSE = 2222.3
------------------------------------------------------------------------------
incwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
US_born_pct | 576545.6 127755.2 4.51 0.000 319676.6 833414.5
US_born_pc~q | -339374 72126.16 -4.71 0.000 -484393.3 -194354.6
_cons | -222453.9 56316.73 -3.95 0.000 -335686.3 -109221.6
------------------------------------------------------------------------------
. predict new_model
(option xb assumed; fitted values)
. twoway (scatter incwage US_born_pct, mlabel(statefip)) (lfit incwage US_born_pct) (lfit new_model US_born_pct)
. twoway (scatter incwage US_born_pct, mlabel(statefip)) (lfit new_model US_born_pct)
*For some reason, lfit does not want to fit the curvilinear predicted values, maybe because they are not linear, so:
. twoway (scatter incwage US_born_pct, mlabel(statefip)) (scatter new_model US_born_pct)
. *That last graph put a nice curve plot over our data, whereas lfit for the predicted values did not want to work.
. exit, clear