Transcription of 線形モデルにおける - SAS
1 CLASS 1 2 1 2 The fascinating features for the CLASS in the context of linear models Saori Yoshida 1 and Ryuji Uozumi 2 1 Clinical Data Management and Biostatistics, Nippon Kayaku Co., Ltd 2 Kyoto University Graduate School of Medicine 2 2 GENMOD LOGISTIC LOGISTIC WARNING .. A B C CLASS 3 MODEL : : LSMEANS, CONTRAST, ESTIMATE, LSMESTIMATE CLASS : CLASS 4 REG, GLM GLMSELECT ~ HPREG ~ (2000) LOGISTIC PHREG V8~ ~ LOGISTIC CLASS WARNING&ERROR 3 (A B C ) SAS 5 (1) 0,1 ex) Treat A,B,P Treat A.
2 Treat A P 6 x1 x2 x3 A 1 0 0 B 0 1 0 P 0 0 1 3322110xxx 103210001 30 10 - ) 31 Treat A: Treat P: (2) 0,1,-1 ex) Treat A,B,P Treat A Treat A P 7 x1 x2 A 1 0 B 0 1 P -1 -1 22110xx 1021001 2 210 10 - ) 212 Treat A: Treat P: CLASS 8 PARAM=EFFECT A A1 A2 A5 1 1 0 0 2 0 1 0 5 0 0 1 7 -1 -1 -1 PARAM=GLM A A1 A2 A5 A7 1 1 0 0 0 2 0 1 0 0 5 0 0 1 0 7 0 0 0 1 PARAM=REFRECT A A1 A2 A5 1 1 0 0 2 0 1 0 5 0 0 1 7 0 0 0 PARAM=ORDINAL A A1 A2 A5 1 0 0 0 2 1 0 0 5 1 1 0 7 1 1 1 PARAM=POLYNOMIAL A A1 A2 A5 1 1 1 1 2 2 4 8 5 5 25 125 7 7 49 343 GLM LOGISTIC CLASS PARAM= SAS SAS Help Neuralgia Treatment A,B,P Sex F,M Pain Yes.
3 No 9 proc logistic data = Neuralgia ; class Treatment Sex / param=effect ; model Pain = Treatment Sex ; run; PARAM=EFFECT Treatment A 10 Wald 2 Pr > ChiSq Intercept 1 Treatment A 1 B 1 Sex F 1 Treatment A 1 0 B 0 1 P -1 -1 Sex F 1 M -1 estimate "estimate A" int 1 Treatment 1 0 Sex 0; z Pr > |z| estimate A A GLM PARAM=GLM Treatment A 11 estimate estimate A int 1 Treatment 1 0 0 Sex ; Wald 2 Pr > ChiSq Intercept 1 Treatment A 1 B 1 P 0 0.
4 Sex F 1 M 0 0 .. Treatment A 1 0 0 B 0 1 0 P 0 0 1 Sex F 1 0 M 0 1 A z Pr > |z| estimate A PARAM=REF Treatment A 12 Wald 2 Pr > ChiSq Intercept 1 Treatment A 1 B 1 Sex F 1 Treatment A 1 0 B 0 1 P 0 0 Sex F 1 M 0 estimate estimate A int 1 Treatment 1 0 Sex ; A z Pr > |z| estimate A PARAM=ORDINAL Treatment A 13 Wald 2 Pr > ChiSq Intercept 1 Treatment B 1 A 1 0 1 Sex F 1 Treatment P 0 0 B 1 0 A 1 1 Sex F 0 M 1 estimate estimate A int 1 Treatment 1 1 Sex.
5 A z Pr > |z| estimate A PARAM=POLY 2 3 Treatment A 14 Wald 2 Pr > ChiSq Intercept 1 Treatment POLY1 1 POLY2 1 Sex POLY1 1 Treatment P B A Sex F M estimate estimate A int 1 Treatment 3 9 Sex ; A z Pr > |z| estimate A CLASS ORDER DATA FORMATED freq INTERNAL DATA FORMATTED FORMAT freq INTERNAL DESCENDING REF= label FIRST LAST label FIRST LAST 15 PARAM=EFFECT PARAM=REF CLASS WARNING ERROR(1) REF= EFFECT or REF ex) ordinal Descending 16 A 0 0 B 1 0 P 1 1 P 0 0 B 1 0 A 1 1 class TREATMENT / param=ordinal descending.
6 Q A CLASS WARNING ERROR(2) LSMEANS WARNING LSMEANS SLICE GLM 17 WARNING: The model does not have a GLM parameterization. This parameterization is required for the LSMEANS, LSMESTIMATE, and SLICE statement. These statements are ignored. Q A proc logistic data = data ; class Treatment Sex ; model Pain = Treatment Sex ; lsmeans Treatment ; run; class Treatment Sex / param=glm ; CLASS WARNING ERROR(3) REF= label ex) TREATMENT B 18 Treatment A 1 0 B 0 1 P 0 0 Sex F 1 M 0 class TREATMENT SEX / param=ref ref = B ; ERROR 22-322: 1 : FIRST, LAST.
7 Class TREATMENT(ref = B ) SEX(descending) / param=ref ; Treatment A 1 0 B 0 0 P 0 1 Sex F 0 M 1 Q A CLASS WARNING ERROR(4) GLIMMIX ORDER= ORDER= PROC GLM PROC 19 Q A proc glimmix data=data ; class Treatment Sex / order=first ; model Pain = Treatment Sex ; run ; ERROR 22-322: 1 : ;, TRUNCATE. ERROR 202-322: proc glimmix data=data order=internal; PARAM= GLM GLM SELECT LOGISTIC GEMNOD PHREG MIXED GLIMMIX FMM EFFECT GLM ORDINAL THERMOMETER POLYNOMIAL POLY REFERENCE REF ORTHEFFECT ORTHORDINAL ORTHOTHERM ORTHPOLY ORTHREF 20 21 A GENMOD LOGISTIC LOGISTIC B C WARNING 22 L'Beta L'Beta 2 Pr > ChiSq estimate A z Pr > |z|
8 Estimate A proc logistic data=Neuralgia; class Treatment Sex ; model Pain(EVENT='Yes') = Treatment Sex; estimate estimate A int 1 Treatment 1 0 0 Sex ; run; proc genmod data=Neuralgia descending; class Treatment Sex ; model Pain = Treatment Sex / link=logit dist=bin; estimate "estimate A" int 1 Treatment 1 0 0 Sex ; run; B proc logistic data=Neuralgia; class Treatment Sex / param=ref; model Pain(EVENT='Yes') = Treatment Sex; estimate "estimate A" int 1 Treatment 1 0 0 Sex ; run; A C z Pr > |z| estimate A A 23 GLM x1 x2 x3 Treatment A 1 0 0 B 0 1 0 P 0 0 1 Sex F 1 0 M 0 1 Treatment A Sex GENMOD proc genmod data=Neuralgia descending; class Treatment Sex ; model Pain = Treatment Sex / link=logit dist=bin; estimate "estimate A" int 1 Treatment 1 0 0 Sex ; run; GENMOD GLM B 24 EFFECT x1 x2 Treatment A 1 0 B 0 1 P -1 -1 Sex F 1 M -1 proc logistic data=Neuralgia; class Treatment Sex ; model Pain(EVENT='Yes') = Treatment Sex.
9 Estimate estimate A int 1 Treatment 1 0 0 Sex ; run; Treatment A Sex 0 10 TreatAy estimate estimate A int 1 Treatment 1 ; More coefficients than levels specified for effect Treatment. Some coefficients will be ignored. WARNING: LOGISTIC EFFECT LOGISTIC C 25 REF x1 x2 Treatment A 1 0 B 0 1 P 0 0 Sex F 1 M 0 proc logistic data=Neuralgia; class Treatment Sex / param=ref; model Pain(EVENT='Yes') = Treatment Sex; estimate "estimate A" int 1 Treatment 1 0 0 Sex ; run; Treatment A Sex 0 SexTreatAy More coefficients than levels specified for effect Treatment.
10 Some coefficients will be ignored. WARNING: REF estimate estimate A int 1 Treatment 1 0 Sex ; LOGISTIC PARAM 26 2 GLM GLM x1 x2 x3 Treatment A 1 0 0 B 0 1 0 P 0 0 1 Sex F 1 0 M 0 1 LSMEANS, CONTRAST, ESTIMATE, LSMESTIMATE AL. Programming With CLASS: Keeping Your Options Open. Proceedings of the SAS Global Forum. Cary, NC: SAS Institute Inc., 2014. Available at DJ. Parameterizing Models to Test the Hypotheses You Want: Coding Indicator Variables and Modified Continuous Variables. Proceedings of the 30th Annual SAS Users Group International Conference.