<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Caros Amigos, <br>
Estou refazendo os comandos apresentado em um artigo de
meta-análise. Acontece que o autor está utilizando o SAS e gostaria
de refazer o comando utilizando o R:<br>
<br>
O código utilizado pelo autor no SAS foi:<br>
<br>
PROC GLM DATA=Dataregs;<br>
CLASS Study;<br>
MODEL Y = X Study X*Study/SOLUTION;<br>
RANDOM Study;<br>
LSMEANS Study/at X=0 STDERR;<br>
<br>
ESTIMATE ‘Overall Intercept’ INTERCEPT 20<br>
Study 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1/DIVISOR=20;<br>
ESTIMATE ‘Overall Slope’ X 20<br>
X*Study 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1/DIVISOR=20;<br>
ESTIMATE ‘Slope Study 1’ X 1<br>
X*Study 1;<br>
ESTIMATE ‘Slope Study 2’ X 1<br>
X*Study 0 1;<br>
ESTIMATE ‘Slope Study 3’ X 1<br>
X*Study 0 0 1;<br>
.<br>
.<br>
.<br>
ESTIMATE ‘Slope Study 18’ X 1<br>
X*Study 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1;<br>
ESTIMATE ‘Slope Study 19’ X 1<br>
X*Study 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1;<br>
ESTIMATE ‘Slope Study 20’ X 1<br>
X*Study 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1;<br>
RUN;<br>
<br>
O comando ESTIMATE, segundo o autor estima os coeficientes do
intercepto e da inclinação através de todos os estudos (linha 1 e 2)
e os demais calcula estimativas de inclinação para cada estudo.<br>
<br>
Estou utilizando o seguinte código<br>
RegFixo<-lm(Y~X*estudo,contrasts=list(estudo="contr.SAS"),data=DATA)<br>
RegFixo<-lm(Y~X*estudo,contrasts=list(estudo="contr.sum"),data=DATA)
# Este comando é o mesmo que fazer o Estimate?<br>
library(car)<br>
Anova(RegFixo,type="III")<br>
<br>
<b>Minha dúvida é como calcular os ESTIMATES no R conforme comando
acima do SAS?</b><br>
<br>
O dput() da base da dados que estou utilizando é fornecido abaixo.
Também segue o artigo para eventual dúvida sobre da saída obtida
pelo autor no SAS. A minha dúvida refere-se ao comando das páginas
745,746,747<br>
<br>
DATA<-structure(list(OBS = 1:108, estudo = structure(c(1L, 1L,
1L, <br>
1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, <br>
4L, 4L, 4L, 4L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, <br>
7L, 7L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 10L, 10L, 10L, <br>
10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, <br>
12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L, 14L, 14L, 14L, 15L, 15L, <br>
15L, 15L, 15L, 15L, 15L, 16L, 16L, 16L, 16L, 16L, 16L, 17L, 17L, <br>
17L, 17L, 17L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 19L, <br>
19L, 19L, 19L, 19L, 20L, 20L), .Label = c("1", "2", "3", "4", <br>
"5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", <br>
"16", "17", "18", "19", "20"), class = "factor"), X = c(1.16, <br>
1.94, 2.5, 3.99, 4.36, 4.99, 2.11, 2.29, 2.46, 4.95, 5.93, 2.1, <br>
2.3, 3.9, 5.16, 5.58, 5.61, 3.2, 4.33, 5.04, 5.18, 5.57, 5.6, <br>
2.32, 4.06, 2.48, 2.73, 3.67, 4.16, 4.58, 4.86, 2.77, 2.8, 2.97, <br>
3.85, 6.25, 6.8, 2.74, 3.72, 4.52, 5.19, 3.24, 3.29, 4.53, 5.1, <br>
5.41, 7.25, 3.1, 3.14, 3.87, 6.41, 7.36, 7.96, 3.25, 3.25, 4.4, <br>
4.75, 4.97, 3, 3.15, 4.96, 5.36, 5.63, 6.53, 6.7, 7.84, 5.45, <br>
5.83, 6.77, 6.88, 8.48, 4.31, 5.71, 6.7, 4.11, 4.55, 4.76, 5.07, <br>
5.9, 6.85, 8.88, 4.25, 6.51, 6.53, 6.68, 6.8, 8.63, 6.47, 6.74, <br>
7.58, 8.11, 9.18, 5.49, 5.63, 6.67, 7.45, 8.13, 8.32, 8.75, 8.92, <br>
9.43, 6.06, 7.99, 8.36, 9.53, 9.68, 7.16, 9.61), Y = c(-2.92, <br>
-1.03, -1, 1.33, 1.14, 1.59, -1.34, -1.14, -1.09, 1.43, 3, -0.7, <br>
-1.11, 0.17, 2.39, 1.78, 3.09, 0.18, 0.74, 1.95, 1.07, 2.71, <br>
2.44, 0.26, 2, 1.31, 1.32, 2.52, 2.83, 2.99, 3.9, 1.18, 1.7, <br>
1.85, 3.13, 5.27, 5.86, -0.27, 1.33, 1.04, 2.4, 3.12, 3.53, 4.29, <br>
4.05, 5.55, 7.23, 3.31, 2.58, 4.08, 6.67, 6.8, 8.21, 2.88, 4.85, <br>
4.35, 6.08, 5.91, 2.57, 3.93, 5.85, 5.21, 6.33, 6.6, 6.95, 8.1, <br>
6.48, 6.23, 7.89, 6.95, 8.13, 5.23, 6.09, 7.69, 5.21, 5.22, 6.18, <br>
5.75, 6.54, 6.7, 10.24, 5.34, 9.19, 8.43, 8.28, 8.32, 10.44, <br>
7.61, 7.74, 8.53, 8.9, 9.77, 6.65, 6.45, 8.59, 9.21, 9.37, 9.5, <br>
10.36, 9.44, 11.01, 7.93, 10.19, 10.99, 11.51, 12.61, 9.99, 12.21<br>
), YADJ = c(0.89, 0.64, 3, 4.36, 3.81, 4.36, 1.16, 1.58, 2.62, <br>
4.43, 6.46, 1.47, 1.62, 2.92, 5.38, 5.41, 6.39, 3.77, 3.64, 4.88, <br>
4.81, 5.12, 5.79, 1.65, 4.02, 2.03, 2.21, 3.65, 3.91, 4.51, 4.62, <br>
2.13, 2.52, 2.72, 4.64, 5.31, 6.99, 2.35, 3.13, 4.78, 5.01, 3.31, <br>
2.79, 4.08, 5.19, 5.6, 7.01, 2.15, 3.3, 4, 6.4, 7.9, 7.82, 2.97, <br>
3.7, 3.95, 4.53, 4.47, 2.05, 3.67, 4.21, 6.01, 5.75, 5.88, 7.1, <br>
7.87, 4.84, 5.41, 7.26, 7.11, 8.93, 4.04, 5.45, 7.07, 3.39, 5.02, <br>
4.42, 5.19, 5.31, 7.49, 8.98, 4.3, 7.1, 6.06, 6.79, 6.9, 8.49, <br>
6.39, 6.98, 8.21, 8.44, 8.84, 5.16, 5.32, 6.93, 8.7, 8.22, 8.63, <br>
8.76, 9.27, 9.14, 5.89, 7.56, 9.06, 10.09, 10.1, 7.61, 9.78)),
.Names = c("OBS", <br>
"estudo", "X", "Y", "YADJ"), row.names = c(NA, -108L), class =
"data.frame")<br>
<br>
<br>
<br>
<br>
<br>
<div style="padding: 15px; background-color: rgb(217, 237, 255);">
<div style="margin-bottom: 15px;">Eu inseri um link para 1 arquivo
nesta mensagem:</div>
<div style="background-color: rgb(255, 255, 255); padding: 15px;">
<div style="border: 1px solid rgb(205, 205, 205); border-radius:
5px 5px 5px 5px; margin-top: 10px; margin-bottom: 10px;
padding: 15px;" class="cloudAttachmentItem"><img
src="cid:part1.09060707.00080303@gmail.com"
style="margin-right: 5px; float: left; width: 24px; height:
24px;"><a moz-do-not-send="true" style="color: rgb(15, 126,
219) ! important;"
href="https://www.box.com/shared/ym97esmv6biljsb725j6">stpierre.pdf</a><span
style="margin-left: 5px; font-size: small; color: grey;">(387
KB)</span><span style="float: right;"><img
style="margin-right: 5px;"
src="cid:part3.05050402.03010406@gmail.com"><a
style="color: rgb(15, 126, 219) ! important;"
href="https://www.box.com/thunderbird">Box</a></span><a
style="color: rgb(15, 126, 219) ! important; font-size:
small; display: block;"
href="https://www.box.com/shared/ym97esmv6biljsb725j6">https://www.box.com/shared/ym97esmv6biljsb725j6</a></div>
</div>
<div style="color: rgb(68, 68, 68); font-size: small; margin-top:
15px;">O <a style="color: rgb(15, 126, 219) ! important;"
href="http://www.getthunderbird.com">Mozilla Thunderbird</a>
torna fácil compartilhar grandes arquivos pelo e-mail.</div>
</div>
<br>
</body>
</html>