Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* HISTOGRAMAS EM SAS (slide 16) */
- data work.A1;
- input dap;
- if dap ge 5 and dap le 8.9 then classe=1;
- if dap ge 9 and dap le 12.9 then classe=2;
- if dap ge 13 and dap le 16.9 then classe=3;
- if dap ge 17 and dap le 20.9 then classe=4;
- if dap ge 21 and dap le 24.9 then classe=5;
- if dap ge 25 and dap le 28.9 then classe=6;
- datalines;
- 20.5
- 19.5
- 15.6
- 24.1
- 9.9
- 15.4
- 12.7
- 5.4
- 17.0
- 28.6
- 16.9
- 7.8
- 23.3
- 11.8
- 18.4
- 13.4
- 14.3
- 19.2
- 9.2
- 16.8
- 8.8
- 22.1
- 20.8
- 12.6
- 15.9
- ;
- proc sort data=A1;
- by classe;
- run;
- proc means data=A1 noprint;
- by classe; var dap;
- output out=B1 n = freq_abs; run;
- proc print data=B1; run;
- title 'Histograma de dap';
- ods graphics off;
- proc univariate data=a1;
- histogram / normal(color=red fill mu=est sigma=est);
- var dap;
- inset n = 'Sample Size'
- normal / pos=ne cfill=blank;
- run;
- ods graphics off;
- title 'Histograma de dap';
- ods graphics on;
- proc univariate data=a1;
- histogram / normal(color=red fill mu=est sigma=est);
- var dap;
- inset n = 'Sample Size'
- normal / pos=ne cfill=blank;
- run;
- ods graphics off;
- ------------------------------
- Regra de Scott
- k = 3,5 * s * n^(-1/3) ( s = desvio padrão dos dados).
- Amplitude de classe:
- w = (max-min) / k
- Media ponderada:
- x_w = ∑ w_i * x_i / ∑ w_i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement