---------------------------------------------------------------------------------------------------------- name: log: C:\Users\Aki\Documents\stata\march7.log log type: text opened on: 7 Mar 2022, 18:39:51 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . sysuse auto, clear (1978 Automobile Data) . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . tab rep78 foreign Repair | Record | Car type 1978 | Domestic Foreign | Total -----------+----------------------+---------- 1 | 2 0 | 2 2 | 8 0 | 8 3 | 27 3 | 30 4 | 9 9 | 18 5 | 2 9 | 11 -----------+----------------------+---------- Total | 48 21 | 69 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . tab rep78 foreign, chi2 Repair | Record | Car type 1978 | Domestic Foreign | Total -----------+----------------------+---------- 1 | 2 0 | 2 2 | 8 0 | 8 3 | 27 3 | 30 4 | 9 9 | 18 5 | 2 9 | 11 -----------+----------------------+---------- Total | 48 21 | 69 Pearson chi2(4) = 27.2640 Pr = 0.000 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . su price Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- price | 74 6165.257 2949.496 3291 15906 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . ttest price == 6000 One-sample t test ------------------------------------------------------------------------------ Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] ---------+-------------------------------------------------------------------- price | 74 6165.257 342.8719 2949.496 5481.914 6848.6 ------------------------------------------------------------------------------ mean = mean(price) t = 0.4820 Ho: mean = 6000 degrees of freedom = 73 Ha: mean < 6000 Ha: mean != 6000 Ha: mean > 6000 Pr(T < t) = 0.6844 Pr(|T| > |t|) = 0.6313 Pr(T > t) = 0.3156 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . ttest price, by(foreign) Two-sample t test with equal variances ------------------------------------------------------------------------------ Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] ---------+-------------------------------------------------------------------- Domestic | 52 6072.423 429.4911 3097.104 5210.184 6934.662 Foreign | 22 6384.682 558.9942 2621.915 5222.19 7547.174 ---------+-------------------------------------------------------------------- combined | 74 6165.257 342.8719 2949.496 5481.914 6848.6 ---------+-------------------------------------------------------------------- diff | -312.2587 754.4488 -1816.225 1191.708 ------------------------------------------------------------------------------ diff = mean(Domestic) - mean(Foreign) t = -0.4139 Ho: diff = 0 degrees of freedom = 72 Ha: diff < 0 Ha: diff != 0 Ha: diff > 0 Pr(T < t) = 0.3401 Pr(|T| > |t|) = 0.6802 Pr(T > t) = 0.6599 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . su price if foreign==1 Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- price | 22 6384.682 2621.915 3748 12990 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . su price if foreign==0 Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- price | 52 6072.423 3097.104 3291 15906 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . correlate price mpg weight (obs=74) | price mpg weight -------------+--------------------------- price | 1.0000 mpg | -0.4686 1.0000 weight | 0.5386 -0.8072 1.0000 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . pwcorr price mpg weight, sig | price mpg weight -------------+--------------------------- price | 1.0000 | | mpg | -0.4686 1.0000 | 0.0000 | weight | 0.5386 -0.8072 1.0000 | 0.0000 0.0000 | . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . use nlsw, clear file nlsw.dta not found r(601); end of do-file r(601); . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . sysuse nlsw, clear file "nlsw.dta" not found r(601); end of do-file r(601); . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . use nlsw, clear (NLSW, 1988 extract) . end of do-file . . tab country nationality | Freq. Percent Cum. ------------+----------------------------------- country A | 1,637 72.89 72.89 country B | 583 25.96 98.84 country C | 26 1.16 100.00 ------------+----------------------------------- Total | 2,246 100.00 . tab country, nolabel nationality | Freq. Percent Cum. ------------+----------------------------------- 1 | 1,637 72.89 72.89 2 | 583 25.96 98.84 3 | 26 1.16 100.00 ------------+----------------------------------- Total | 2,246 100.00 . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . sum wage if country==1 Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- wage | 1,637 8.082999 5.955069 1.004952 40.19808 . sum wage if country==2 Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- wage | 583 6.844558 5.076187 1.151368 40.74659 . sum wage if country==3 Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- wage | 26 8.550781 5.20943 1.80602 25.80515 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . oneway wage country, tab | Summary of hourly wage nationality | Mean Std. Dev. Freq. ------------+------------------------------------ country A | 8.0829994 5.9550691 1,637 country B | 6.8445578 5.0761866 583 country C | 8.5507813 5.2094301 26 ------------+------------------------------------ Total | 7.766949 5.7555229 2,246 Analysis of Variance Source SS df MS F Prob > F ------------------------------------------------------------------------ Between groups 675.510282 2 337.755141 10.28 0.0000 Within groups 73692.4571 2243 32.8544169 ------------------------------------------------------------------------ Total 74367.9674 2245 33.1260434 Bartlett's test for equal variances: chi2(2) = 21.0482 Prob>chi2 = 0.000 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . anova wage country Number of obs = 2,246 R-squared = 0.0091 Root MSE = 5.73188 Adj R-squared = 0.0082 Source | Partial SS df MS F Prob>F -----------+---------------------------------------------------- Model | 675.51028 2 337.75514 10.28 0.0000 | country | 675.51028 2 337.75514 10.28 0.0000 | Residual | 73692.457 2,243 32.854417 -----------+---------------------------------------------------- Total | 74367.967 2,245 33.126043 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . histogram wage (bin=33, start=1.0049518, width=1.2042921) . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . anova wage country##south Number of obs = 2,246 R-squared = 0.0237 Root MSE = 5.69332 Adj R-squared = 0.0215 Source | Partial SS df MS F Prob>F --------------+---------------------------------------------------- Model | 1760.9188 5 352.18377 10.87 0.0000 | country | 233.90543 2 116.95271 3.61 0.0273 south | 107.42282 1 107.42282 3.31 0.0688 country#south | 212.02052 2 106.01026 3.27 0.0382 | Residual | 72607.049 2,240 32.413861 --------------+---------------------------------------------------- Total | 74367.967 2,245 33.126043 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . pwmean wage, over(country) effects Pairwise comparisons of means with equal variances over : country ----------------------------------------------------------------------------------------- | Unadjusted Unadjusted wage | Contrast Std. Err. t P>|t| [95% Conf. Interval] ------------------------+---------------------------------------------------------------- country | country B vs country A | -1.238442 .2764488 -4.48 0.000 -1.780564 -.6963193 country C vs country A | .4677818 1.133005 0.41 0.680 -1.754067 2.689631 country C vs country B | 1.706223 1.148906 1.49 0.138 -.5468071 3.959254 ----------------------------------------------------------------------------------------- . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD3bc0_000000.tmp" . log close name: log: C:\Users\Aki\Documents\stata\march7.log log type: text closed on: 7 Mar 2022, 19:45:26 ----------------------------------------------------------------------------------------------------------