XXXII - Ciclo Estatística Experimental com Software R
description
Transcript of XXXII - Ciclo Estatística Experimental com Software R
![Page 1: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/1.jpg)
Éder David Borges da SilvaRenato Gonçalves de Oliveira
![Page 2: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/2.jpg)
IntroduçãoObjetivo: Relacionar matematicamente duas ou mais variáveis, com uma função, por exemplo:
• Importante para entender os fenômenos físicos, químicos, biológicos, sociais, médicos...etc.• Variáveis devem ser quantitativas• Importante no estudo de otimização de processos
2Experimentação com recursos computacionais
iii XY 10
![Page 3: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/3.jpg)
Classificação dos modelos quanto as parâmetros
Modelo linear
Modelo não-linear
3Experimentação com recursos computacionais
iii XY 10
00
iY
ii XY
1iiii XXY 2
210
iii XY 2
10
00
iY 2
1
ii XY
)ln(21
2i
i XXY
![Page 4: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/4.jpg)
Modelos estatísticos quanto ao # variáveisModelo univariado:
Modelo múltiplo:
iii XY 10
innii XXY ...10
![Page 5: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/5.jpg)
![Page 6: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/6.jpg)
Experimento univariado
6Experimentação com recursos computacionais
10.3
20.2
62.1
40.1
12.1
99.0
90.0
88.0
Y
0.2
5.1
0.1
8.0
5.0
3.0
2.0
1.0
X
Altura Tempo de exposição
![Page 7: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/7.jpg)
Experimento múltiploVolume estimado de madeira
113
104
96
93
90
87
86
82
78
65
Y
101
100
95
87
90
93
80
90
71
41
1X
96
78
84
96
70
61
81
80
48
79
2X
71
70
67
62
64
66
59
64
53
35
3X
Volume/área Área basal Área basal relativa
Altura
![Page 8: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/8.jpg)
Método dos mínimos quadrados
Idéia do Método:
8Experimentação com recursos computacionais
2
1
0 )(min i
n
ii yyS
![Page 9: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/9.jpg)
Estimador de Mínimo Quadrado
~~~XY
00.40.21
25.25.11
00.10.11
64.08.01
25.05.01
09.03.01
04.02.01
01.01.01
X
2
1
0
10.3
20.2
62.1
40.1
12.1
99.0
90.0
88.0
Y
YXXX ')'( 1^
~
MMQ
iiii XXY 2210
X0 X1 X2
![Page 10: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/10.jpg)
Função lmFitting Linear Modelsajuste1 <- lm(Produção ~ altura)ajuste2 <- lm(Produção ~ altura+diametro)ajuste3 <- lm(Produção ~ I(altura)+I(diametro)
+I(diametro)^2)Summary(ajuste1)Call:lm(formula = Y ~ X1)
Residuals: Min 1Q Median 3Q Max -10.7994 -2.6942 -0.1651 3.7156 13.0095
Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 33.9634 11.4989 2.954 0.01832 * X1 0.6537 0.1330 4.916 0.00117 **---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 7.106 on 8 degrees of freedomMultiple R-squared: 0.7513, Adjusted R-squared: 0.7202 F-statistic: 24.17 on 1 and 8 DF, p-value: 0.001170
Anova(ajuste1)
Analysis of Variance Table
Response: Y df Sum Sq Mean Sq F value Pr(>F) X1 1 1220.39 1220.39 24.165 0.001170 **Residuals 8 404.01 50.50
![Page 11: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/11.jpg)
ANOVA da Regressão
Fonte: Apostila Prof° Suely Giolo UFPR
![Page 12: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/12.jpg)
ANOVA da Regressão
0...: 3210 mH Para algum i=1,2,3,...,m0:1 iH
![Page 13: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/13.jpg)
Teste t de Student
)(
0
^
^
i
St ic
QMEXXSi
1
)()'(^
00
00
:
:
i
i
H
H
![Page 14: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/14.jpg)
Coeficiente de determinação R2aju
n tamanho da amostrap número de parâmetrosi igual a 1, se inclui intercepto ou 0 sem
intercepto
)1(1 22 Rpn
inRAj
SQT
SQER 12
![Page 15: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/15.jpg)
Análise do resíduoCom distribuição normal e µ=0 e σ²
conhecido
![Page 16: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/16.jpg)
![Page 17: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/17.jpg)
Introdução
nnm
RSR 1
1)(1
)(
![Page 18: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/18.jpg)
Métodos de InterativosIdeia: SQE tem de ser minimizadas, em função dos parâmetros
![Page 19: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/19.jpg)
Métodos de Interativos
![Page 20: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/20.jpg)
Experimento
26300
5000
4100
3000
490
138
105
89
75
64
63
45
30
19
10
pot
0730.0
1013.0
1205.0
1468.0
1655.0
2120.0
2272.0
2404.0
2522.0
2628.0
2681.0
2753.0
2828.0
2931.0
3071.0
u
Determinação Laboratorial Câmara de Richards
![Page 21: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/21.jpg)
Função nls
ajuste<-nls(u~ur+(us-ur)/((1+(alpha*pot)^n)^(1-1/n)),start=list(us=0.2236,ur=0.0611,alpha=0.056,n=1.5351))
nnm
RSR 1
1)(1
)(
>summary(ajuste)Formula: u ~ ur + (us - ur)/((1 + (alpha * pot)^n)^(1 - 1/n))
Parameters: Estimate Std. Error t value Pr(>|t|) us 0.324120 0.017744 18.27 1.41e-09 ***ur 0.007083 0.071083 0.10 0.922 alpha 0.038780 0.026202 1.48 0.167 n 1.211817 0.105207 11.52 1.77e-07 ***---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.01104 on 11 degrees of freedom
Number of iterations to convergence: 10 Achieved convergence tolerance: 4.152e-06
![Page 22: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/22.jpg)
Coeficiente de determinação R2
Método de calculo manual no R# R^2# soma de quadrados residualSQE <- summary(ajuste)$sigma^2*summary(ajuste)
$df[2]SQE# soma de quadrado total corrigidaSQT <- var(u)*(length(u)-1)SQTR2 <- 1 - SQE/SQTR2
![Page 23: XXXII - Ciclo Estatística Experimental com Software R](https://reader036.fdocuments.net/reader036/viewer/2022062309/5681587e550346895dc5e1bf/html5/thumbnails/23.jpg)