[go: up one dir, main page]

0% found this document useful (0 votes)
44 views6 pages

Sol

The document contains a log of statistical analysis performed using Stata software, including data import, variable encoding, and regression analysis. It details the steps taken to analyze the relationship between salary and various factors such as gender and urban/rural status, along with the results of the regression models. Additionally, it notes issues encountered during the analysis, such as invalid commands and syntax errors.

Uploaded by

infiltrado_1995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views6 pages

Sol

The document contains a log of statistical analysis performed using Stata software, including data import, variable encoding, and regression analysis. It details the steps taken to analyze the relationship between salary and various factors such as gender and urban/rural status, along with the results of the regression models. Additionally, it notes issues encountered during the analysis, such as invalid commands and syntax errors.

Uploaded by

infiltrado_1995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

hjjjh Tuesday May 31 20:14:03 2022 Page 1

___ ____ ____ ____ ____(R)


/__ / ____/ / ____/
___/ / /___/ / /___/
Statistics/Data Analysis

User: Rainman

___ ____ ____ ____ ____ (R)


/__ / ____/ / ____/
___/ / /___/ / /___/ 16.0 Copyright 1985-2019 StataCorp LLC
Statistics/Data Analysis StataCorp
4905 Lakeway Drive
MP - Parallel Edition College Station, Texas 77845 USA
800-STATA-PC http://www.stata.com
979-696-4600 stata@stata.com
979-696-4601 (fax)

Single-user 2-core Stata perpetual license:


Serial number: 501606203204
Licensed to: Juan Abanto
Juan Abanto

Notes:
1. Unicode is supported; see help unicode_advice.
2. More than 2 billion observations are allowed; see help obs_advice.
3. Maximum number of variables is set to 5000; see help set_maxvar.
4. New update available; type -update all-

Checking for updates...


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

Update status
Last check for updates: 31 May 2022
New update available: 14 Feb 2022 (what's new)
Current update level: 24 Jul 2019 (what's new)

An update to Stata was not completed properly.


You should update all to bring Stata up to date.

Click to edit automatic update checking preferences

1 . import excel "E:\ESTADISTICA PARA ECONOMISTAS II\Prácticas\Práctica 4\Data_Pra


> ctica4.xlsx", sheet("Hoja1") firstrow case(lower)
(5 vars, 36 obs)

2 . rename b Obs

3 . encode Obs
invalid syntax
r(198);

4 . rename Obs a

5 . encode a, gen(obs)

6 . gen resid=1
hjjjh Tuesday May 31 20:14:03 2022 Page 2

7 . replace resid=0 in 17/36


(20 real changes made)

8 . drop resid

9 . encode f, gen(W)

10 . encode d, gen(E)

11 . drop in 1/2
(2 observations deleted)

12 . replace c=="Urbano" in 1/14


== invalid name
r(198);

13 . replace c="Urbano" in 1/14


(13 real changes made)

14 . replace c="Rural" in 15/34


(19 real changes made)

15 . gen R=1

16 . replace R=0 if c=="Rural"


(20 real changes made)

17 . label define resid 0 "Rural" 1 "Urbano"

18 . label value R resid

19 . gen S=1

20 . replace S=0 if e=="Mujer"


(15 real changes made)

21 . label define sex 0 "Mujer" 1 "Varon"

22 . label value S sex

23 . gen SR=S*R

24 . reg W S R SR

Source SS df MS Number of obs = 34


F(3, 30) = 2.07
Model 560.70202 3 186.900673 Prob > F = 0.1255
Residual 2711.79798 30 90.393266 R-squared = 0.1713
Adj R-squared = 0.0885
Total 3272.5 33 99.1666667 Root MSE = 9.5075

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

S 9.020202 4.27332 2.11 0.043 .2929178 17.74749


R -.8888889 5.010912 -0.18 0.860 -11.12254 9.344759
SR -4.520202 6.680267 -0.68 0.504 -18.16313 9.122723
_cons 13.88889 3.169179 4.38 0.000 7.416562 20.36122
hjjjh Tuesday May 31 20:14:03 2022 Page 3

25 . di "Salario de Varón Rural:


Salario de Varón Rural:

26 . di "Salario de Varón Rural: " _b[S]+_b[_cons]


Salario de Varón Rural: 22.909091

27 . di "Salario de Varón Urbano: " _b[S]+_b[R]+_b[RS]+_b[_cons]


Salario de Varón Urbano: [RS] not found
r(111);

28 . di "Salario de Varón Urbano: " _b[S]+_b[R]+_b[SR]+_b[_cons]


Salario de Varón Urbano: 17.5

29 . di "Diferencia: " -_b[R]-_b[SR]


Diferencia: 5.4090909

30 . *Es significativa la diferencia?

31 . *=============== Hallar T ================*

32 . mat list e(V)

symmetric e(V)[4,4]
S R SR _cons
S 18.261266
R 10.043696 25.109241
SR -18.261266 -25.109241 44.625968
_cons -10.043696 -10.043696 10.043696 10.043696

33 . escalar T=(_b[R]+_b[SR])/[(e(V)[2,2]+e(V)[3,3]+2*[3,2])^0.5]
command escalar is unrecognized
r(199);

34 . scalar T=(_b[R]+_b[SR])/[(e(V)[2,2]+e(V)[3,3]+2*[3,2])^0.5]
3,2 invalid name
r(198);

35 . scalar T=(_b[R]+_b[SR])/[(e(V)[2,2]+e(V)[3,3]+2*e(V)[3,2])^0.5]

36 . di T
-1.2243928

37 . di e(V)[3,2]
-25.109241

38 . inv ttail[30,0.025]
command inv is unrecognized
r(199);

39 . di invttail[30,0.025]
invttail not found
r(111);
hjjjh Tuesday May 31 20:14:03 2022 Page 4

40 . di invttail(30,0.025(
too few ')' or ']'
r(132);

41 . di invttail(30,0.025)
2.0422725

42 . di 2*invttail(30,0.05)
3.3945218

43 . di ttail(30,T)
.88483383

44 . di ttail(30,-T)
.11516617

45 . di -T
1.2243928

46 . di 2*ttail(30,T)
1.7696677

47 . di 2*ttail(30,-T)
.23033235

48 . ================Cambio porcentual del salario con respecto a los años de escol


> aridad=======================
== is not a valid command name
r(199);

49 . *================Cambio porcentual del salario con respecto a los años de esco


> laridad=======================

50 . gen LNW=ln(W)

51 . gen ER=E*R

52 . gen ES=E*S

53 . gen ERS=E*R*S

54 . reg W R S E SR ER ES ERS

Source SS df MS Number of obs = 34


F(7, 26) = 1.57
Model 974.221909 7 139.174558 Prob > F = 0.1873
Residual 2298.27809 26 88.3953112 R-squared = 0.2977
Adj R-squared = 0.1086
Total 3272.5 33 99.1666667 Root MSE = 9.4019

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

R -16.29899 11.64834 -1.40 0.174 -40.24249 7.644519


S 10.00442 10.09369 0.99 0.331 -10.74346 30.75231
E -1.101351 1.03686 -1.06 0.298 -3.232647 1.029944
SR 12.68446 17.56917 0.72 0.477 -23.42949 48.79842
ER 2.413851 1.653025 1.46 0.156 -.9839893 5.811692
ES -.0531941 1.370647 -0.04 0.969 -2.870598 2.76421
ERS -2.750081 2.47902 -1.11 0.277 -7.845779 2.345618
_cons 20.98649 7.380422 2.84 0.009 5.815812 36.15716
hjjjh Tuesday May 31 20:14:03 2022 Page 5

55 . *================Derivada del salario con respecto a la escolaridad===========


> =============*

56 . *=======Salario de un varón de zona urbana=======*

57 . display "Cambio porcentual del salario de un varón de zona urbana con respecto a la escolariidad: " _b[E]+_b[ER
Cambio porcentual del salario de un varón de zona urbana con respecto a la escolariidad: -1.4907749

58 . display "Cambio porcentual del salario de una mujer de zona urbana con respecto a la escolariidad: " _b[E]+_b[E
Cambio porcentual del salario de una mujer de zona urbana con respecto a la escolariidad: 1.3125

59 . di "Diferencia: " _b[ES]+_b[ERS]


Diferencia: -2.8032749

60 . *=========Hallar T==========*

61 . di e(V)
type mismatch
r(109);

62 . mat list e(V)

symmetric e(V)[8,8]
R S E SR ER ES ERS _cons
R 135.68382
S 54.470624 101.88265
E 6.9282811 6.9282811 1.0750781
SR -135.68382 -101.88265 -6.9282811 308.6759
ER -17.425224 -6.9282811 -1.0750781 17.425224 2.7324902
ES -6.9282811 -12.553437 -1.0750781 12.553437 1.0750781 1.8786718
ERS 17.425224 12.553437 1.0750781 -40.338024 -2.7324902 -1.8786718 6.1455396
_cons -54.470624 -54.470624 -6.9282811 54.470624 6.9282811 6.9282811 -6.9282811 54.470624

63 . escalar TD=(_b[ES]+_b[ERS])/[(e(V)[6,6]+e(V)[7,7]+2*e(V)[6,7])^0.5]
command escalar is unrecognized
r(199);

64 . scalar TD=(_b[ES]+_b[ERS])/[(e(V)[6,6]+e(V)[7,7]+2*e(V)[6,7])^0.5]

65 . di TD
-1.3570976

66 . di invttail(26,.05)
1.7056179

67 . di invttail(26,.025)
2.0555294

68 . di 2*invttail(26,-TD)
.
hjjjh Tuesday May 31 20:14:04 2022 Page 6

69 . di 2*invttail(26,TD)
.

70 . di invttail(26,-TD)
.

71 . di invttail(26,1.3570976)
.

72 . di 2*ttail(26,-TD)
.18641554

73 . di ttail(26,-TD)
.09320777

74 .

You might also like