Type : CREACIÓN_INTERNA
Los datos se crean directamente en el script a través de un paso DATA con una instrucción DATALINES. Se leen las interacciones y los ceros estructurales se definen estableciendo la variable de peso (wt) en un valor faltante cuando el mono 'activo' y 'pasivo' son los mismos.
| 1 | DATA Display; |
| 2 | INPUT Active $ Passive $ wt @code_sas_json/8_SAS_Intro_ReadFile_MultiCol_@@.json; |
| 3 | IF Active ne 't'; |
| 4 | IF Active eq Passive THEN wt=.; |
| 5 | DATALINES; |
| 6 | r r 0 r s 1 r t 5 r u 8 r v 9 r w 0 |
| 7 | s r 29 s s 0 s t 14 s u 46 s v 4 s w 0 |
| 8 | t r 0 t s 0 t t 0 t u 0 t v 0 t w 0 |
| 9 | u r 2 u s 3 u t 1 u u 0 u v 38 u w 2 |
| 10 | v r 0 v s 0 v t 0 v u 0 v v 0 v w 1 |
| 11 | w r 9 w s 25 w t 4 w u 6 w v 13 w w 0 |
| 12 | ; |
| 1 | PROC CATMOD DATA=Display; |
| 2 | weight wt; |
| 3 | model Active*Passive=_response_ / |
| 4 | missing=structural zero=sampling |
| 5 | freq pred=freq noparm oneway; |
| 6 | loglin Active Passive; |
| 7 | contrast 'Passive, U vs. V' Passive 0 0 0 1 -1; |
| 8 | contrast 'Active, U vs. V' Active 0 0 1 -1; |
| 9 | title2 'Test Quasi-Independence for the Incomplete Table'; |
| 10 | QUIT; |