Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DATA DOR;
- INPUT tratamento bloco dor @@;
- DATALINES;
- 1 1 0.0 1 2 0.3 1 3 0.4 1 4 0.4
- 1 5 0.6 1 6 0.9 1 7 1.0 1 8 1.2
- 2 1 0.6 2 2 0.7 2 3 0.8 2 4 0.9
- 2 5 1.5 2 6 1.6 2 7 1.7 2 8 1.6
- 3 1 0.5 3 2 0.6 3 3 0.8 3 4 0.7
- 3 5 1.0 3 6 1.4 3 7 1.8 3 8 1.7
- 4 1 1.2 4 2 1.3 4 3 1.6 4 4 1.5
- 4 5 1.9 4 6 2.3 4 7 2.1 4 8 2.4
- ;
- RUN;
- PROC GLM DATA=DOR;
- CLASS tratamento bloco;
- MODEL dor = tratamento bloco;
- OUTPUT out = temp predicted = pred r = resid;
- RUN;
- * H) Estimação de L1 e L2;
- PROC GLM DATA=DOR;
- CLASS tratamento bloco;
- MODEL dor = tratamento|bloco / e solution;
- LSMEANS tratamento|bloco;
- ESTIMATE 'L1 = MI1. - MI2. = ALFA1 - ALFA2' tratamento 4 -4 0 0
- tratamento*bloco 1 -1 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 1 -1 0 0 0 0 0 0/ DIVISOR=4;
- ESTIMATE 'L2 = MI.1 - MI.2 = BETA1 - BETA2' bloco 8 -8 0 0
- tratamento*bloco 1 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / DIVISOR=8;
- QUIT;
- * B) Valores ajustados vs. Resíduos e Gráfico de probabilidade normal;
- PROC REG DATA=DOR plots=qqplot plots=residualbypredicted;
- MODEL dor = tratamento bloco;
- RUN;
- * C) Gráfico de perfil;
- SYMBOL1 V=DOT C=RED I=JOIN LINE=1;
- SYMBOL2 V=DOT C=BLUE I=JOIN LINE=1;
- SYMBOL3 V=DOT C=vdabg I=JOIN LINE=1;
- SYMBOL4 V=DOT C=aquamarine I=JOIN LINE=1;
- SYMBOL5 V=DOT C=firebrick I=JOIN LINE=1;
- SYMBOL6 V=DOT C=chocolate I=JOIN LINE=1;
- SYMBOL7 V=DOT C=darkorchid I=JOIN LINE=1;
- SYMBOL8 V=DOT C=lightpink I=JOIN LINE=1;
- PROC FORMAT;
- VALUE tratamentof 1='Placebo' 2='Codeína' 3='Acupuntura' 4='Codeína e acupuntura';
- RUN;
- TITLE 'Gráfico de perfis das respostas Yij por blocos';
- PROC GPLOT DATA=DOR;
- PLOT dor*tratamento = bloco / VAXIS=0 TO 3 BY 1 HAXIS=1 TO 4 BY 1;
- FORMAT tratamento tratamentof.;
- LABEL bloco='Bloco' tratamento='Tratamento' dor='Alívio de dor';
- RUN;
- * D) Teste de não aditividade de Tukey;
- DATA temp;
- SET temp;
- t = pred * pred;
- RUN;
- ods graphics off;
- PROC GLM DATA=temp;
- CLASS tratamento bloco;
- MODEL dor = tratamento bloco t;
- QUIT;
- ods graphics on;
- * F) Gráfico de probabilidade normal das médias estimadas;
- PROC UNIVARIATE DATA=dor;
- PROBPLOT tratamento;
- RUN;
- * I) Eficiencia relativa;
- DATA efic;
- re = (5.59875 + 16 * 0.0144) / (21 * 0.0144); * (SSB + b(t-1)MSE)/((bt-1)MSE);
- RUN;
- PROC PRINT DATA=efic; RUN;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement