Action Principale : countregViewStore
| 1 | DATA mycas.dm; |
| 2 | label program_type='Tipo de Programa'; |
| 3 | label days_absent='Días de Ausencia'; |
| 4 | label math_score='Puntuación en Matemáticas'; |
| 5 | DO i = 1 to 100; |
| 6 | program_type = floor(rand('UNIFORM') * 3) + 1; |
| 7 | math_score = 60 + 20 * rand('NORMAL'); |
| 8 | IF (program_type eq 1) THEN days_absent = floor(rand('POISSON', 2)); |
| 9 | ELSE IF (program_type eq 2) THEN days_absent = floor(rand('POISSON', 5)); |
| 10 | ELSE days_absent = floor(rand('POISSON', 8)); |
| 11 | OUTPUT; |
| 12 | END; |
| 13 | RUN; |
| 14 | |
| 15 | PROC CAS; |
| 16 | countreg.countregFitModel / |
| 17 | TABLE={name='dm'}, |
| 18 | model={depvar='days_absent', |
| 19 | effects={'math_score', {vars='program_type', type='CLASS'}}} |
| 20 | dist='POISSON', |
| 21 | store={name='myModelStore', replace=true}; |
| 22 | RUN; |