---------------------------------------------------------------------------------

      name:  <unnamed>

       log:  C:\Documents and Settings\Michael Rosenfeld\My Documents\newer web pages\soc_meth_proj3\2010_logs\section_five.log

  log type:  text

 opened on:  23 Feb 2010, 12:00:57

 

. *a new free update is available for stata. Here, below is what it looks like when you update Stata:

 

. update all

 

---------------------------------------------------------------------------------

> update ado

(contacting http://www.stata.com)

 

Ado-file update log

    1.  verifying C:\Program Files\Stata11\ado\updates\ is writeable

    2.  obtaining list of files to be updated

    3.  downloading relevant files to temporary area

        downloading about.sthlp

        downloading _altprobitmodel.class

        downloading axis.class

        downloading bargraph_g.class

        downloading bsample.ado

        downloading bygraph_g.class

        downloading copyright.sthlp

        downloading dfgls.sthlp

        downloading f_lnnormalden.ihlp

        downloading forthcoming.sthlp

        downloading fracplot.ado

        downloading fracpred.ado

        downloading getmata.ado

        downloading ghelp_alias.maint

        downloading _gmode.ado

        downloading gr_locpolyci_options.dlg

        downloading gr_locpoly_options.dlg

        downloading gr_marker_options.dlg

        downloading histogram.ado

        downloading logrank.ado

        downloading m1_intro.sthlp

        downloading makecns.ado

        downloading manova.sthlp

        downloading matcproc.ado

        downloading mf_optimize.sthlp

        downloading mf_st_store.sthlp

        downloading mhelp_alias.maint

        downloading mi_append.sthlp

        downloading mi_cmd_impute.ado

        downloading mi_glossary.sthlp

        downloading mi_workflow.sthlp

        downloading ml_10.sthlp

        downloading ml_11.sthlp

        downloading mleval_10.sthlp

        downloading mleval_11.sthlp

        downloading mlmethod_10.sthlp

        downloading mlmethod_11.sthlp

        downloading moptimize_11.sthlp

        downloading moptimize_calluser.mata

        downloading moptimize_check.mata

        downloading moptimize_evaltools.mata

        downloading moptimize_result.mata

        downloading moptimize_utilities.mata

        downloading nlcom.ado

        downloading odbc_load.dlg

        downloading optimize_11.sthlp

        downloading optimize_calluser.mata

        downloading optimize_include.mata

        downloading optimize_result.mata

        downloading putmata.ado

        downloading putmata.sthlp

        downloading reg3.ado

        downloading scheme-economist.scheme

        downloading scheme-s1mono.scheme

        downloading scheme-s2mono.scheme

        downloading series.class

        downloading stata10.key

        downloading stata11.key

        downloading stata1.key

        downloading streg_postestimation.sthlp

        downloading time.sthlp

        downloading u_mi_check_setvars.ado

        downloading u_mi_estimate.ado

        downloading u_mi_get_flongsep_tmpname.ado

        downloading u_mi_impute_xeq.ado

        downloading xtclog.ado

        downloading _xtme_estimate.ado

        downloading xtpois.ado

        downloading xtreg_be.ado

        downloading xtreg_ml.ado

        downloading xtreg_re.ado

        downloading zipfile.ado

        downloading dialog_programming.sthlp

        downloading frac_154.ado

        downloading fracpoly_postestimation.sthlp

        downloading gmm.sthlp

        downloading lmataado.mlib

        downloading lmataopt.mlib

        downloading margins.sthlp

        downloading _marg_work.class

        downloading merge.ado

        downloading mf_moptimize.sthlp

        downloading mfp_10.ado

        downloading mf_st_data.sthlp

        downloading mf_st_view.sthlp

        downloading _mkvec.ado

        downloading mleval.sthlp

        downloading mlmethod.sthlp

        downloading ml.sthlp

        downloading mopt.ado

        downloading moptimize_init.mata

        downloading moptimize.mata

        downloading moptimize_stata.mata

        downloading optimize_init.mata

        downloading optimize.mata

        downloading optimize_utilities.mata

        downloading prdocumented.sthlp

        downloading _rmdcoll.ado

        downloading xtivreg.ado

        downloading xtpcse.ado

        downloading whatsnew.sthlp

    4.  examining files

    5.  installing files

    6.  setting last date updated

 

Updates successfully installed.

 

Recommendation

    See help whatsnew to learn about the new features

 

---------------------------------------------------------------------------------

> update utilities

(contacting http://www.stata.com)

 

Utilities update log

    1.  verifying C:\Program Files\Stata11\utilities is writeable

    2.  obtaining list of files to be updated

    3.  downloading relevant files to temporary area

        downloading d.pdf

        downloading g.pdf

        downloading gsm.pdf

        downloading gsu.pdf

        downloading gsw.pdf

        downloading ig.pdf

        downloading i.pdf

        downloading mi.pdf

        downloading m.pdf

        downloading mv.pdf

        downloading p.pdf

        downloading r.pdf

        downloading st.pdf

        downloading svy.pdf

        downloading ts.pdf

        downloading u.pdf

        downloading xt.pdf

    4.  examining files

    5.  installing files

    6.  setting last date updated

 

Updates successfully installed.

 

Recommendation

    See help whatsnew to learn about the new features

 

---------------------------------------------------------------------------------

> update executable

(contacting http://www.stata.com)

 

Executable update log

    1.  verifying "C:\Program Files\Stata11\" is writeable

    2.  downloading new executable

 

New executable successfully downloaded

 

Instructions

    1.  Type update swap

 

. update swap

 

    1.  Removing older backups

        removing StataSE_old.exe

    2.  Backing up current executables.

        copying StataSE.exe to StataSE_old.exe

(!) 3.  Stata is about to shutdown this version of

        Stata and automatically launch the new version.

-----------------------------------------------------------------------------------------

      name:  <unnamed>

       log:  C:\Documents and Settings\Michael Rosenfeld\My Documents\newer web pages\soc

> _meth_proj3\2010_logs\section_five.log

  log type:  text

 opened on:  23 Feb 2010, 12:07:12

 

. use "C:\Documents and Settings\Michael Rosenfeld\Desktop\cps_mar_2000_new.dta", clear

 

. codebook vetlast

 

---------------------------------------------------------------------------------

vetlast                                   Veteran's most recent period of service

---------------------------------------------------------------------------------

 

                  type:  numeric (byte)

                 label:  vetlastlbl

 

                 range:  [0,9]                        units:  1

         unique values:  6                        missing .:  0/133710

 

            tabulation:  Freq.   Numeric  Label

                         30904         0  NIU

                         91149         1  No service

                          2428         4  World War II

                          1716         6  Korean War

                          3683         8  Vietnam Era

                          3830         9  Other service

 

. gen vietnam_vet=0

 

. replace vietnam_vet=1 if vetlast==8

(3683 real changes made)

 

. regress incwage  vietnam_vet if age >=25 & age<=64 [aweight= perwt_rounded]

(sum of wgt is   1.4261e+08)

 

      Source |       SS       df       MS              Number of obs =   69305

-------------+------------------------------           F(  1, 69303) =  513.59

       Model |  5.3641e+11     1  5.3641e+11           Prob > F      =  0.0000

    Residual |  7.2383e+13 69303  1.0444e+09           R-squared     =  0.0074

-------------+------------------------------           Adj R-squared =  0.0073

       Total |  7.2919e+13 69304  1.0522e+09           Root MSE      =   32318

 

------------------------------------------------------------------------------

     incwage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

 vietnam_vet |   12634.41   557.5048    22.66   0.000      11541.7    13727.11

       _cons |   26818.78   126.0225   212.81   0.000     26571.78    27065.79

------------------------------------------------------------------------------

 

. regress incwage  vietnam_vet male if age >=25 & age<=64 [aweight= perwt_rounded]

(sum of wgt is   1.4261e+08)

 

      Source |       SS       df       MS              Number of obs =   69305

-------------+------------------------------           F(  2, 69302) = 2547.15

       Model |  4.9931e+12     2  2.4966e+12           Prob > F      =  0.0000

    Residual |  6.7926e+13 69302   980142991           R-squared     =  0.0685

-------------+------------------------------           Adj R-squared =  0.0684

       Total |  7.2919e+13 69304  1.0522e+09           Root MSE      =   31307

 

------------------------------------------------------------------------------

     incwage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

 vietnam_vet |   4216.537   554.3126     7.61   0.000     3130.085    5302.989

        male |   16465.13   244.1752    67.43   0.000     15986.55    16943.71

       _cons |   19198.75   166.3547   115.41   0.000     18872.69     19524.8

------------------------------------------------------------------------------

 

. table male vietnam_vet if age>=25 & age<=64 [aweight=perwt_rounded], contents(freq mean incwage)

 

------------------------------------

          |       vietnam_vet      

     male |           0            1

----------+-------------------------

   female |      35,603           99

          | 19177.51915  31576.67305

          |

     male |      30,113        3,490

          | 35688.51837  39663.00843

------------------------------------

 

* A student asks why the constant term in the above regression is not exactly equal to the female non-vet actual mean income. The answer (it takes me a bit to figure out) is that the predicted female non-vet income is not the same as the actual female non-vet income.

 

. table male vietnam_vet if age>=25 & age<=64 [aweight=perwt_rounded], contents(freq mean incwage) row col

 

-------------------------------------------------

          |              vietnam_vet            

     male |           0            1        Total

----------+--------------------------------------

   female |      35,603           99       35,702

          | 19177.51915  31576.67305  19209.68506

          |

     male |      30,113        3,490       33,603

          | 35688.51837  39663.00843  36093.11552

          |

    Total |      65,716        3,589       69,305

          | 26818.78466  39453.18996  27464.36983

-------------------------------------------------

 

. regress incwage  vietnam_vet male if age >=25 & age<=64

 

      Source |       SS       df       MS              Number of obs =   69305

-------------+------------------------------           F(  2, 69302) = 2527.09

       Model |  4.7473e+12     2  2.3736e+12           Prob > F      =  0.0000

    Residual |  6.5094e+13 69302   939274658           R-squared     =  0.0680

-------------+------------------------------           Adj R-squared =  0.0679

       Total |  6.9841e+13 69304  1.0077e+09           Root MSE      =   30648

 

------------------------------------------------------------------------------

     incwage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

 vietnam_vet |   3775.139    539.569     7.00   0.000     2717.585    4832.693

        male |   16098.32   239.2401    67.29   0.000     15629.41    16567.23

       _cons |   18601.47   162.2066   114.68   0.000     18283.55     18919.4

------------------------------------------------------------------------------

 

. table male vietnam_vet if age>=25 & age<=64, contents(freq mean incwage) row col

 

-------------------------------------------------

          |              vietnam_vet            

     male |           0            1        Total

----------+--------------------------------------

   female |      35,603           99       35,702

          | 18582.58043  29170.12121  18611.93919

          |

     male |      30,113        3,490       33,603

          | 34722.12148  38282.21633  35091.87212

          |

    Total |      65,716        3,589       69,305

          | 25978.19184   38030.8657  26602.34661

-------------------------------------------------

 

. regress incwage  vietnam_vet male if age >=25 & age<=64 & incwage!=. [aweight= perwt_rounded]

(sum of wgt is   1.4261e+08)

 

      Source |       SS       df       MS              Number of obs =   69305

-------------+------------------------------           F(  2, 69302) = 2547.15

       Model |  4.9931e+12     2  2.4966e+12           Prob > F      =  0.0000

    Residual |  6.7926e+13 69302   980142991           R-squared     =  0.0685

-------------+------------------------------           Adj R-squared =  0.0684

       Total |  7.2919e+13 69304  1.0522e+09           Root MSE      =   31307

 

------------------------------------------------------------------------------

     incwage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

 vietnam_vet |   4216.537   554.3126     7.61   0.000     3130.085    5302.989

        male |   16465.13   244.1752    67.43   0.000     15986.55    16943.71

       _cons |   19198.75   166.3547   115.41   0.000     18872.69     19524.8

------------------------------------------------------------------------------

 

. table male vietnam_vet if age>=25 & age<=64 & incwage!=. [aweight=perwt_rounded], contents(freq mean incwage) row col

 

-------------------------------------------------

          |              vietnam_vet            

     male |           0            1        Total

----------+--------------------------------------

   female |      35,603           99       35,702

          | 19177.51915  31576.67305  19209.68506

          |

     male |      30,113        3,490       33,603

          | 35688.51837  39663.00843  36093.11552

          |

    Total |      65,716        3,589       69,305

          | 26818.78466  39453.18996  27464.36983

-------------------------------------------------

 

. regress incwage  vietnam_vet male if age >=25 & age<=64 [aweight= perwt_rounded]

(sum of wgt is   1.4261e+08)

 

      Source |       SS       df       MS              Number of obs =   69305

-------------+------------------------------           F(  2, 69302) = 2547.15

       Model |  4.9931e+12     2  2.4966e+12           Prob > F      =  0.0000

    Residual |  6.7926e+13 69302   980142991           R-squared     =  0.0685

-------------+------------------------------           Adj R-squared =  0.0684

       Total |  7.2919e+13 69304  1.0522e+09           Root MSE      =   31307

 

------------------------------------------------------------------------------

     incwage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

 vietnam_vet |   4216.537   554.3126     7.61   0.000     3130.085    5302.989

        male |   16465.13   244.1752    67.43   0.000     15986.55    16943.71

       _cons |   19198.75   166.3547   115.41   0.000     18872.69     19524.8

------------------------------------------------------------------------------

 

. predict M2

(option xb assumed; fitted values)

 

. table male vietnam_vet if age>=25 & age<=64 & incwage!=. [aweight=perwt_rounded], contents(freq mean incwage mean M2) row col

 

-------------------------------------------------

          |              vietnam_vet            

     male |           0            1        Total

----------+--------------------------------------

   female |      35,603           99       35,702

          | 19177.51915  31576.67305  19209.68506

          |    19198.75     23415.28     19209.69

          |

     male |      30,113        3,490       33,603

          | 35688.51837  39663.00843  36093.11552

          |    35663.88     39880.41     36093.12

          |

    Total |      65,716        3,589       69,305

          | 26818.78466  39453.18996  27464.36983

          |    26818.79     39453.19     27464.37

-------------------------------------------------

 

. *the constant equals the predicted value for non-vet women, not the actual value. Why are they not the same?

 

. *In order to fit the four cells exactly, we would need 4 terms in the model.

 

. desmat: regress incwage  vietnam_vet*male if age >=25 & age<=64 [aweight= perwt_rounded]

---------------------------------------------------------------------------------

   Linear regression

---------------------------------------------------------------------------------

   Dependent variable                                                    incwage

   Number of observations:                                                 69305

   aweight:                                                        perwt_rounded

   F statistic:                                                         1700.382

   Model degrees of freedom:                                                   3

   Residual degrees of freedom:                                            69301

   R-squared:                                                              0.069

   Adjusted R-squared:                                                     0.069

   Root MSE                                                            31306.005

   Prob:                                                                   0.000

---------------------------------------------------------------------------------

nr Effect                                                      Coeff        s.e.

---------------------------------------------------------------------------------

   vietnam_vet

1    1                                                     12399.154**  3270.123

   male

2    male                                                  16510.999**   244.833

   vietnam_vet.male

3    1.male                                                -8424.664*   3318.137

4  _cons                                                   19177.519**   166.558

---------------------------------------------------------------------------------

*  p < .05

** p < .01

 

. *Now the predicted values of the model and the actual values will fit exactly in the 4 cells of gender and vietnam vet status

 

. predict M2_plus

(option xb assumed; fitted values)

 

* predict generates a new variable with the predicted values from the last regression we just ran.

 

. table male vietnam_vet if age>=25 & age<=64 & incwage!=. [aweight=perwt_rounded], contents(freq mean incwage mean M2 mean  M2_plus) row col

 

-------------------------------------------------

          |              vietnam_vet            

     male |           0            1        Total

----------+--------------------------------------

   female |      35,603           99       35,702

          | 19177.51915  31576.67305  19209.68506

          |    19198.75     23415.28     19209.69

          |    19177.52     31576.67     19209.69

          |

     male |      30,113        3,490       33,603

          | 35688.51837  39663.00843  36093.11552

          |    35663.88     39880.41     36093.12

          |    35688.52     39663.01     36093.12

          |

    Total |      65,716        3,589       69,305

          | 26818.78466  39453.18996  27464.36983

          |    26818.79     39453.19     27464.37

          |    26818.79     39453.19     27464.37

-------------------------------------------------

 

* This regression fits all 4 cells exactly, because it included 4 terms…

 

. drop _*

 

. save "C:\Documents and Settings\Michael Rosenfeld\Desktop\cps_mar_2000_new.dta"

> , replace

file C:\Documents and Settings\Michael Rosenfeld\Desktop\cps_mar_2000_new.dta sav

> ed

 

. exit, clear