sexta-feira, 6 de dezembro de 2024

Prova 1 ponto 136

  Prova valendo 1 ponto, tentem aproveitar para testar o nível de vocês, a prova vale muito pouco, simulamos a resolução de um problema da vida profissional

- Manterei os horários de consulta no verão, podem ser utilizados para melhorar o nível, notas e frequências

Regressão Múltipla em Excel ou LOffice Calc e SAS (proc reg e robustreg)

Resolver com e sem o outlier e discutir os resultados.




  Outlier último registro.



DBO

ICobV

ICArb

Bcont

Dis_Pl

IBD_A

1,604

89

60

11

9

90

0,385

90

61

10

8,9

91

0,216

91

62

9

9,1

92

0,303

90

59

10

8,8

89

1,961

20

12

81

0,2

20

0,782

21

14

79

0,3

22

0,57

22

15

78

0,25

23

2,187

22

12

77

0,2

24

0,764

59

35

41

6

60

0,273

60

32

40

6,5

61

1,883

64

33

38

5,8

63

0,581

62

32

37

5,6

62

0,18

79

50

21

8,2

80

0,007

80

49

20

7,8

79

2,028

80

48

18

8,2

81

2,431

79

47

21

7,7

78

0,216

91

62

9

9,1

20



quinta-feira, 5 de dezembro de 2024

Gabriel WhatsApp: +55 19 988 627 438 e E-Mail

Gabriel  WhatsApp: +55 19 988 627 438 e E-Mail 


WhatsApp: +55 19 988 627 438

E-Mail: gasarrie@usp.br


Prova valendo 1 ponto

  Prova valendo 1 ponto, tentem aproveitar para testar o nível de vocês, a prova vale muito pouco, simulamos a resolução de um problema da vida profissional

- Manterei os horários de consulta no verão, podem ser utilizados para melhorar o nível, notas e frequências

Regressão Múltipla em Excel ou LOffice Calc e SAS (proc reg e robustreg)

Resolver com e sem o outlier e discutir os resultados.

Bu_Unit

Sales

Price

Qu_level

Claims

NPS

PV

Satisfac

1

65,98108

97,8022

96,77419

13,58025

98,9011

19

97,82459

2

15,8371

98,9011

98,3871

12,34568

97,8022

29

98,91459

3

8,885232

100

100

11,11111

100

21

100

4

12,46401

98,9011

95,16129

12,34568

96,7033

94

9?,??913

5

80,66639

21,97802

19,35484

100

2,197802

34

21,73913

6

32,16783

23,07692

22,58065

97,53086

3,296703

64

23,91304

7

23,44714

24,17582

24,19355

96,2963

2,747253

61

25

8

89,96298

24,17582

19,35484

95,06173

2,197802

25

26,08696

9

31,4274

64,83516

56,45161

50,61728

65,93407

10

65,21739

10

11,22995

65,93407

51,6129

49,38272

71,42857

3

66,30435

11

77,45784

70,32967

53,22581

46,91358

63,73626

56

68,47826

12

23,89963

68,13187

51,6129

45,67901

61,53846

4

67,3913

13

7,40436

86,81319

80,64516

25,92593

90,10989

90

86,95652

14

0,287947

87,91209

79,03226

24,69136

85,71429

48

85,86957

15

83,42246

87,91209

77,41935

22,22222

90,10989

78

88,04348

16

100

86,81319

75,80645

25,92593

84,61538

88

84,78261

 

 

 

 

 

 

 

 

Outlier

17

8,885232

100

100

11,11111

100

21

20

 




.

quinta-feira, 21 de novembro de 2024

ANOVA para selecionar Variáveis Preditoras a serem utilizadas em Cluster Analysis, PCA e ML Supervisionado para Classificação (Rede Neural, Random Forest, Support Vector Machine etc.)

 ANOVA para selecionar Variáveis Preditoras a serem utilizadas em Cluster Analysis, PCA e ML Supervisionado para Classificação (Rede Neural, Random Forest, Support Vector Machine etc.)

 

Qualidade de Vida - Cluster Analysis (ML Não Supervisionado para Agrupamentos Multivariados)

data QV; 

input Categ $ IMC Movim KCal;

cards;

ATL 20.9 60.9 3259

ATL 21.3 54.8 3100

ATL 19.3 49.6 2800

ATL 21.1 52.3 3300

SEMI 22.4 14.9 2600

SEMI 21.9 17.8 2700

SEMI 23.8 18.6 3200

SEMI 24.1 15.1 3300

SEDE 27.3 2.5 2700

SEDE 23.4 4.3 2300

SEDE 25.2 2.3 2600

SEDE 26.4 2.6 3200

PROF 26.2 4.1 2600

PROF 24.2 2.1 2700

PROF 25.4 1.9 2650

;

 

proc print;

run;

/* input Categ $ IMC Movim KCal;*/

proc anova;

   class Categ;

   model IMC Movim KCal = Categ;

   means Categ / tukey lines;

run; 

 

Cálculo de Medias por Pivot Table

Categ

IMC

Movim

Kcal

ATL

20,9

60,9

3259

ATL

21,3

54,8

3100

ATL

19,3

49,6

2800

ATL

21,1

52,3

3300

SEMI

22,4

14,9

2600

SEMI

21,9

17,8

2700

SEMI

23,8

18,6

3200

SEMI

24,1

15,1

3300

SEDE

27,3

2,5

2700

SEDE

23,4

4,3

2300

SEDE

25,2

2,3

2600

SEDE

26,4

2,6

3200

PROF

26,2

4,1

2600

PROF

24,2

2,1

2700

PROF

25,4

1,9

2650

 

Cluster com Variáveis Preditoras Significativas Comparar com Todas


Primeiro com Todas as Variáveis Preditoras

data  pessoas;

input cat $ imc corr kcal;

cards;

ATL 20.65 54.4 3114.75

PROF 25.26666667 2.7 2650

SEDE 25.575 2.925 2700

SEMI 23.05 16.6 2950

;

proc cluster data=pessoas outtree = arvore method = average;

var imc corr kcal;

id cat;

run;

PROC TREE DATA = arvore;

RUN;

 

Agora Fazer somente com as Variáveis Preditoras Significativas

Somente muda este comando

var imc corr;



Dinheiro Falso - Rede Neural (ML S para Clasif.)

Programa SAS

data apolinario;

input obs Status length Left Rigth Bottom Top Diagonal Transpar;

cards;

1 0 214.8 131 131.1 9 9.7 141.459 8.342459

2 0 214.6 129.7 129.7 8.1 9.5 141.7 9.005343

3 0 214.8 129.7 129.7 8.7 9.6 142.2 4.293085

4 0 214.8 129.7 129.6 7.5 10.4 142 5.281225

5 0 215 129.6 129.7 10.4 7.7 141.8 1.513307

6 0 215.7 130.8 130.5 9 10.1 141.4 5.739582

7 0 215.5 129.5 129.7 7.9 9.6 141.6 3.58029

8 0 214.5 129.6 129.2 7.2 10.7 141.7 8.620212

9 0 214.9 129.4 129.7 8.2 11 141.9 6.128928

10 0 215.2 130.4 130.3 9.2 10 140.7 1.225479

11 0 215.3 130.4 130.3 7.9 11.7 141.8 0.442973

12 0 215.1 129.5 129.6 7.7 10.5 142.2 9.165131

13 0 215.2 130.8 129.6 7.9 10.8 141.4 3.034573

14 0 214.7 129.7 129.7 7.7 10.9 141.7 4.929624

15 0 215.1 129.9 129.7 7.7 10.8 141.8 3.996129

16 0 214.5 129.8 129.8 9.3 8.5 141.6 5.107183

17 0 214.6 129.9 130.1 8.2 9.8 141.7 3.666467

18 0 215 129.9 129.7 9 9 141.9 4.605725

19 0 215.2 129.6 129.6 7.4 11.5 141.5 6.26076

20 0 214.7 130.2 129.9 8.6 10 141.9 6.538608

21 0 215 129.9 129.3 8.4 10 141.4 0.450759

22 0 215.6 130.5 130 8.1 10.3 141.6 3.106727

23 0 215.3 130.6 130 8.4 10.8 141.5 2.091035

24 0 215.7 130.2 130 8.7 10 141.6 0.093906

25 0 215.1 129.7 129.9 7.4 10.8 141.1 7.069552

26 0 215.3 130.4 130.4 8 11 142.3 6.143458

27 0 215.5 130.2 130.1 8.9 9.8 142.4 2.899919

28 0 215.1 130.3 130.3 9.8 9.5 141.9 3.056647

29 0 215.1 130 130 7.4 10.5 141.8 7.640232

30 0 214.8 129.7 129.3 8.3 9 142 0.911595

31 0 215.2 130.1 129.8 7.9 10.7 141.8 9.286659

32 0 214.8 129.7 129.7 8.6 9.1 142.3 1.654785

33 0 215 130 129.6 7.7 10.5 140.7 9.087692

34 0 215.6 130.4 130.1 8.4 10.3 141 3.066002

35 0 215.9 130.4 130 8.9 10.6 141.4 9.669812

36 0 214.6 130.2 130.2 9.4 9.7 141.8 7.152279

37 0 215.5 130.3 130 8.4 9.7 141.8 5.814042

38 0 215.3 129.9 129.4 7.9 10 142 8.451992

39 0 215.3 130.3 130.1 8.5 9.3 142.1 8.270316

40 0 213.9 130.3 129 8.1 9.7 141.3 2.374091

41 0 214.4 129.8 129.2 8.9 9.4 142.3 7.882688

42 0 214.8 130.1 129.6 8.8 9.9 140.9 8.628963

43 0 214.9 129.6 129.4 9.3 9 141.7 6.522981

44 0 214.9 130.4 129.7 9 9.8 140.9 6.203108

45 0 214.8 129.4 129.1 8.2 10.2 141 6.605354

46 0 214.3 129.5 129.4 8.3 10.2 141.8 4.43922

47 0 214.8 129.9 129.7 8.3 10.2 141.5 1.899184

48 0 214.8 129.9 129.7 7.3 10.9 142 8.704295

49 0 214.6 129.7 129.8 7.9 10.3 141.1 2.990982

50 0 214.5 129 129.6 7.8 9.8 142 0.571166

51 0 214.6 129.8 129.4 7.2 10 141.3 6.407039

52 0 215.3 130.6 130 9.5 9.7 141.1 0.235993

53 0 214.5 130.1 130 7.8 10.9 140.9 3.450459

54 0 215.4 130.2 130.2 7.6 10.9 141.6 1.381513

55 0 214.5 129.4 129.5 7.9 10 141.4 1.621623

56 0 215.2 129.7 129.4 9.2 9.4 142 7.640185

57 0 215.7 130 129.4 9.2 10.4 141.2 1.496712

58 0 215 129.6 129.4 8.8 9 141.1 5.754074

59 0 215.1 130.1 129.9 7.9 11 141.3 0.169488

60 0 215.1 130 129.8 8.2 10.3 141.4 4.48128

61 0 215.1 129.6 129.3 8.3 9.9 141.6 0.338244

62 0 215.3 129.7 129.4 7.5 10.5 141.5 6.148626

63 0 215.4 129.8 129.4 8 10.6 141.5 3.799348

64 0 214.5 130 129.5 8 10.8 141.4 6.141745

65 0 215 130 129.8 8.6 10.6 141.5 5.479944

66 0 215.2 130.6 130 8.8 10.6 140.8 3.914293

67 0 214.6 129.5 129.2 7.7 10.3 141.3 0.979716

68 0 214.8 129.7 129.3 9.1 9.5 141.5 0.416134

69 0 215.1 129.6 129.8 8.6 9.8 141.8 4.493104

70 0 214.9 130.2 130.2 8 11.2 139.6 8.433149

71 0 213.8 129.8 129.5 8.4 11.1 140.9 3.194225

72 0 215.2 129.9 129.5 8.2 10.3 141.4 7.989399

73 0 215 129.6 130.2 8.7 10 141.2 9.189951

74 0 214.4 129.9 129.6 7.5 10.5 141.8 8.151371

75 0 215.2 129.9 129.7 7.2 10.6 142.1 1.175441

76 0 214.1 129.6 129.3 7.6 10.7 141.7 9.425796

77 0 214.9 129.9 130.1 8.8 10 141.2 0.608648

78 0 214.6 129.8 129.4 7.4 10.6 141 8.879565

79 0 215.2 130.5 129.8 7.9 10.9 140.9 3.996958

80 0 214.6 129.9 129.4 7.9 10 141.8 2.213717

81 0 215.1 129.7 129.7 8.6 10.3 140.6 8.99883

82 0 214.9 129.8 129.6 7.5 10.3 141 7.949556

83 0 215.2 129.7 129.1 9 9.7 141.9 4.350476

84 0 215.2 130.1 129.9 7.9 10.8 141.3 6.683159

85 0 215.4 130.7 130.2 9 11.1 141.2 5.799778

86 0 215.1 129.9 129.6 8.9 10.2 141.5 4.722314

87 0 215.2 129.9 129.7 8.7 9.5 141.6 8.674677

88 0 215 129.6 129.2 8.4 10.2 142.1 9.273823

89 0 214.9 130.3 129.9 7.4 11.2 141.5 5.012061

90 0 215 129.9 129.7 8 10.5 142 5.42594

91 0 214.7 129.7 129.3 8.6 9.6 141.6 8.5421

92 0 215.4 130 129.9 8.5 9.7 141.4 4.943298

93 0 214.9 129.4 129.5 8.2 9.9 141.5 8.712418

94 0 214.5 129.5 129.3 7.4 10.7 141.5 4.579332

95 0 214.7 129.6 129.5 8.3 10 142 7.852574

96 0 215.6 129.9 129.9 9 9.5 141.7 7.481017

97 0 215 130.4 130.3 9.1 10.2 141.1 1.91562

98 0 214.4 129.7 129.5 8 10.3 141.2 1.603

99 0 215.1 130 129.8 9.1 10.2 141.5 4.368422

100 0 214.7 130 129.4 7.8 10 141.2 9.289701

101 1 214.4 130.1 130.3 9.7 11.7 139.8 2.529576

102 1 214.9 130.5 130.2 11 11.5 139.5 5.231355

103 1 214.9 130.3 130.1 8.7 11.7 140.2 1.099865

104 1 215 130.4 130.6 9.9 10.9 140.3 9.704009

105 1 214.7 130.2 130.3 11.8 10.9 139.7 2.097141

106 1 215 130.2 130.2 10.6 10.7 139.9 4.749958

107 1 215.3 130.3 130.1 9.3 12.1 140.2 6.332

108 1 214.8 130.1 130.4 9.8 11.5 139.9 8.013084

109 1 215 130.2 129.9 10 11.9 139.4 7.333819

110 1 215.2 130.6 130.8 10.4 11.2 140.3 7.465903

111 1 215.2 130.4 130.3 8 11.5 139.2 1.776527

112 1 215.1 130.5 130.3 10.6 11.5 140.1 1.927405

113 1 215.4 130.7 131.1 9.7 11.8 140.6 2.87569

114 1 214.9 130.4 129.9 11.4 11 139.9 4.18792

115 1 215.1 130.3 130 10.6 10.8 139.7 1.133199

116 1 215.5 130.4 130 8.2 11.2 139.2 4.949746

117 1 214.7 130.6 130.1 11.8 10.5 139.8 2.076851

118 1 214.7 130.4 130.1 12.1 10.4 139.9 4.341875

119 1 214.8 130.5 130.2 11 11 140 6.873291

120 1 214.4 130.2 129.9 10.1 12 139.2 7.361863

121 1 214.8 130.3 130.4 10.1 12.1 139.6 6.160784

122 1 215.1 130.6 130.3 12.3 10.2 139.6 0.820162

123 1 215.3 130.8 131.1 11.6 10.6 140.2 8.199925

124 1 215.1 130.7 130.4 10.5 11.2 139.7 8.767972

125 1 214.7 130.5 130.5 9.9 10.3 140.1 4.518555

126 1 214.9 130 130.3 10.2 11.4 139.6 1.264342

127 1 215 130.4 130.4 9.4 11.6 140.2 8.712286

128 1 215.5 130.7 130.3 10.2 11.8 140 3.805659

129 1 215.1 130.2 130.2 10.1 11.3 140.3 1.132005

130 1 214.5 130.2 130.6 9.8 12.1 139.9 7.05902

131 1 214.3 130.2 130 10.7 10.5 139.8 0.147254

132 1 214.5 130.2 129.8 12.3 11.2 139.2 5.340653

133 1 214.9 130.5 130.2 10.6 11.5 139.9 1.035768

134 1 214.6 130.2 130.4 10.5 11.8 139.7 4.329426

135 1 214.2 130 130.2 11 11.2 139.5 7.190976

136 1 214.8 130.1 130.1 11.9 11.1 139.5 7.86245

137 1 214.6 129.8 130.2 10.7 11.1 139.4 6.169232

138 1 214.9 130.7 130.3 9.3 11.2 138.3 2.104685

139 1 214.6 130.4 130.4 11.3 10.8 139.8 1.850182

140 1 214.5 130.5 130.2 11.8 10.2 139.6 5.755739

141 1 214.8 130.2 130.3 10 11.9 139.3 0.750656

142 1 214.7 130 129.4 10.2 11 139.2 2.389343

143 1 214.6 130.2 130.4 11.2 10.7 139.9 6.203088

144 1 215 130.5 130.4 10.6 11.1 139.9 8.330734

145 1 214.5 129.8 129.8 11.4 10 139.3 8.650829

146 1 214.9 130.6 130.4 11.9 10.5 139.8 1.40345

147 1 215 130.5 130.4 11.4 10.7 139.9 7.332753

148 1 215.3 130.6 130.3 9.3 11.3 138.1 2.913333

149 1 214.7 130.2 130.1 10.7 11 139.4 4.863921

150 1 214.9 129.9 130 9.9 12.3 139.4 4.211332

151 1 214.9 130.3 129.9 11.9 10.6 139.8 0.956579

152 1 214.6 129.9 129.7 11.9 10.1 139 1.418857

153 1 214.6 129.7 129.3 10.4 11 139.3 6.479153

154 1 214.5 130.1 130.1 12.1 10.3 139.4 9.565215

155 1 214.5 130.3 130 11 11.5 139.5 8.19004

156 1 215.1 130 130.3 11.6 10.5 139.7 3.340708

157 1 214.2 129.7 129.6 10.3 11.4 139.5 4.539931

158 1 214.4 130.1 130 11.3 10.7 139.2 0.907883

159 1 214.8 130.4 130.6 12.5 10 139.3 5.111025

160 1 214.6 130.6 130.1 8.1 12.1 137.9 7.33093

161 1 215.6 130.1 129.7 7.4 12.2 138.4 5.010356

162 1 214.9 130.5 130.1 9.9 10.2 138.1 5.802157

163 1 214.6 130.1 130 11.5 10.6 139.5 1.915

164 1 214.7 130.1 130.2 11.6 10.9 139.1 4.298098

165 1 214.3 130.3 130 11.4 10.5 139.8 1.175106

166 1 215.1 130.3 130.6 10.3 12 139.7 8.925967

167 1 216.3 130.7 130.4 10 10.1 138.8 6.511685

168 1 215.6 130.4 130.1 9.6 11.2 138.6 5.318178

169 1 214.8 129.9 129.8 9.6 12 139.6 7.626296

170 1 214.9 130 129.9 11.4 10.9 139.7 9.92289

171 1 213.9 130.7 130.5 8.7 11.5 137.8 8.070468

172 1 214.2 130.6 130.4 12 10.2 139.6 3.852542

173 1 214.8 130.5 130.3 11.8 10.5 139.4 2.069325

174 1 214.8 129.6 130 10.4 11.6 139.2 0.986407

175 1 214.8 130.1 130 11.4 10.5 139.6 5.908994

176 1 214.9 130.4 130.2 11.9 10.7 139 7.349364

177 1 214.3 130.1 130.1 11.6 10.5 139.7 0.511428

178 1 214.5 130.4 130 9.9 12 139.6 5.119145

179 1 214.8 130.5 130.3 10.2 12.1 139.1 3.432399

180 1 214.5 130.2 130.4 8.2 11.8 137.8 8.753596

181 1 215 130.4 130.1 11.4 10.7 139.1 1.992127

182 1 214.8 130.6 130.6 8 11.4 138.7 9.226528

183 1 215 130.5 130.1 11 11.4 139.3 7.312417

184 1 214.6 130.5 130.4 10.1 11.4 139.3 6.073818

185 1 214.7 130.2 130.1 10.7 11.1 139.5 4.021342

186 1 214.7 130.4 130 11.5 10.7 139.4 7.331403

187 1 214.5 130.4 130 8 12.2 138.5 9.405799

188 1 214.8 130 129.7 11.4 10.6 139.2 7.806663

189 1 214.8 129.9 130.2 9.6 11.9 139.4 8.270527

190 1 214.6 130.3 130.2 12.7 9.1 139.2 6.934555

191 1 215.1 130.2 129.8 10.2 12 139.4 7.897621

192 1 215.4 130.5 130.6 8.8 11 138.6 1.874828

193 1 214.7 130.3 130.2 10.8 11.1 139.2 1.775244

194 1 215 130.5 130.3 9.6 11 138.5 2.938067

195 1 214.9 130.3 130.5 11.6 10.6 139.8 1.023377

196 1 215 130.4 130.3 9.9 12.1 139.6 0.022059

197 1 215.1 130.3 129.9 10.3 11.5 139.7 7.854284

198 1 214.8 130.3 130.4 10.6 11.1 140 3.595969

199 1 214.7 130.7 130.8 11.2 11.2 139.4 7.97424

200 1 214.3 129.9 129.9 10.2 11.5 139.6 0.224731

;

proc print;

run;

/* input obs Status length Left Rigth Bottom Top Diagonal Transpar; */

proc anova;

   class Status;

   model length Left Rigth Bottom Top Diagonal Transpar = Status;

   means Status / tukey lines;

run;

  


Resultados do ANOVA e Tukey

arquivo para download

Resultados do SAS