------------------------------------------------------------------------------- name: log: C:\Users\Aki\Documents\stata\feb7.smcl log type: smcl opened on: 7 Feb 2022, 18:35:14 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . sysuse auto, clear (1978 Automobile Data) . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_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\STD48ec_000000.tmp" . su price, detail Price ------------------------------------------------------------- Percentiles Smallest 1% 3291 3291 5% 3748 3299 10% 3895 3667 Obs 74 25% 4195 3748 Sum of Wgt. 74 50% 5006.5 Mean 6165.257 Largest Std. Dev. 2949.496 75% 6342 13466 90% 11385 13594 Variance 8699526 95% 13466 14500 Skewness 1.653434 99% 15906 15906 Kurtosis 4.819188 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . inspect price price: Price Number of Observations ------------- --------------------------------------- Total Integers Nonintegers | # Negative - - - | # Zero - - - | # Positive 74 74 - | # ----------- ----------- ----------- | # Total 74 74 - | # # . . . Missing - +---------------------- ----------- 3291 15906 74 (74 unique values) . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . sktest price Skewness/Kurtosis tests for Normality ------ joint ------ Variable | Obs Pr(Skewness) Pr(Kurtosis) adj chi2(2) Prob>chi2 -------------+--------------------------------------------------------------- price | 74 0.0000 0.0127 21.77 0.0000 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . sktest length Skewness/Kurtosis tests for Normality ------ joint ------ Variable | Obs Pr(Skewness) Pr(Kurtosis) adj chi2(2) Prob>chi2 -------------+--------------------------------------------------------------- length | 74 0.8762 0.0053 7.08 0.0290 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . su length, detail Length (in.) ------------------------------------------------------------- Percentiles Smallest 1% 142 142 5% 154 147 10% 157 149 Obs 74 25% 170 154 Sum of Wgt. 74 50% 192.5 Mean 187.9324 Largest Std. Dev. 22.26634 75% 204 221 90% 218 222 Variance 495.7899 95% 221 230 Skewness -.0409746 99% 233 233 Kurtosis 2.04156 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . tab rep78 Repair | Record 1978 | Freq. Percent Cum. ------------+----------------------------------- 1 | 2 2.90 2.90 2 | 8 11.59 14.49 3 | 30 43.48 57.97 4 | 18 26.09 84.06 5 | 11 15.94 100.00 ------------+----------------------------------- Total | 69 100.00 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . help recode . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . recode rep78 1 2 = 1 (rep78: 8 changes made) . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . tab rep78 Repair | Record 1978 | Freq. Percent Cum. ------------+----------------------------------- 1 | 10 14.49 14.49 3 | 30 43.48 57.97 4 | 18 26.09 84.06 5 | 11 15.94 100.00 ------------+----------------------------------- Total | 69 100.00 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . sysuse auto, clear (1978 Automobile Data) . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . recode rep78 1 2 = 1 (rep78: 8 changes made) . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . recode rep78 (3=2) (4=3) (5=4) (rep78: 59 changes made) . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . tab rep78 Repair | Record 1978 | Freq. Percent Cum. ------------+----------------------------------- 1 | 10 14.49 14.49 2 | 30 43.48 57.97 3 | 18 26.09 84.06 4 | 11 15.94 100.00 ------------+----------------------------------- Total | 69 100.00 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . tab mpg Mileage | (mpg) | Freq. Percent Cum. ------------+----------------------------------- 12 | 2 2.70 2.70 14 | 6 8.11 10.81 15 | 2 2.70 13.51 16 | 4 5.41 18.92 17 | 4 5.41 24.32 18 | 9 12.16 36.49 19 | 8 10.81 47.30 20 | 3 4.05 51.35 21 | 5 6.76 58.11 22 | 5 6.76 64.86 23 | 3 4.05 68.92 24 | 4 5.41 74.32 25 | 5 6.76 81.08 26 | 3 4.05 85.14 28 | 3 4.05 89.19 29 | 1 1.35 90.54 30 | 2 2.70 93.24 31 | 1 1.35 94.59 34 | 1 1.35 95.95 35 | 2 2.70 98.65 41 | 1 1.35 100.00 ------------+----------------------------------- Total | 74 100.00 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . help recode . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . recode mpg (12/19 = 1) (20/29 = 2) (30/41 = 3), gen(mpgcat) (74 differences between mpg and mpgcat) . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . tab mpgcat RECODE of | mpg | (Mileage | (mpg)) | Freq. Percent Cum. ------------+----------------------------------- 1 | 35 47.30 47.30 2 | 32 43.24 90.54 3 | 7 9.46 100.00 ------------+----------------------------------- Total | 74 100.00 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . help gen . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . gen constant = 1 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . gen newprice = price / weight . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . gen pricesquared = price*price . gen pricesquared1 = price^2 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . gen price1000 = price + 1000 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . help functions . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . gen ln_price = log(price) . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . tab rep78 Repair | Record 1978 | Freq. Percent Cum. ------------+----------------------------------- 1 | 10 14.49 14.49 2 | 30 43.48 57.97 3 | 18 26.09 84.06 4 | 11 15.94 100.00 ------------+----------------------------------- Total | 69 100.00 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . sysuse auto, clear (1978 Automobile Data) . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . tab rep78 Repair | Record 1978 | Freq. Percent Cum. ------------+----------------------------------- 1 | 2 2.90 2.90 2 | 8 11.59 14.49 3 | 30 43.48 57.97 4 | 18 26.09 84.06 5 | 11 15.94 100.00 ------------+----------------------------------- Total | 69 100.00 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . gen rep78recoded = 1 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . replace rep78recoded = 2 if rep78==3 (30 real changes made) . replace rep78recoded = 3 if rep78==4 (18 real changes made) . replace rep78recoded = 4 if rep78==5 (11 real changes made) . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . tab rep78recoded rep78recode | d | Freq. Percent Cum. ------------+----------------------------------- 1 | 15 20.27 20.27 2 | 30 40.54 60.81 3 | 18 24.32 85.14 4 | 11 14.86 100.00 ------------+----------------------------------- Total | 74 100.00 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . replace rep78recoded = . if rep78 ==. (5 real changes made, 5 to missing) . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp" . tab rep78recoded rep78recode | d | Freq. Percent Cum. ------------+----------------------------------- 1 | 10 14.49 14.49 2 | 30 43.48 57.97 3 | 18 26.09 84.06 4 | 11 15.94 100.00 ------------+----------------------------------- Total | 69 100.00 . end of do-file . do "C:\Users\Aki\AppData\Local\Temp\STD48ec_000000.tmp"