Re: Proc Genmod Estimate Statement Question

  • Follow


John,

On your CLASS statement, you specify a reference cell coding
for each of your three class variables.  The reference cell
coding eliminates the reference cell from the design matrix
producing a design matrix which is not overparameterized.
However, in your ESTIMATE statements, you are attempting to
compare the parameter for the first (second) level of the
an effect with the parameter obtained for the reference cell.
But your CLASS statement eliminated the reference cell from
the design matrix.  So, there are not three parameters for
age_diag3, just two.

The warning messages will be eliminated if you change your
CLASS statement to use the GLM parameterization.  But using
param=GLM does not allow you to specify quite as easily which
is your reference level.  I always format my class variables
with a leading "1:", "2:", "3:", etc. followed by whatever
descriptive text is valuable for understanding what the
ordered value indicates.  The last ordered value will always
be the reference value.  Thus, by using an appropriate
formatting, I always have control over the reference value
even when using the GLM parameterization.

Dale

---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@NO_SPAMfhcrc.org
Ph:  (206) 667-2926
Fax: (206) 667-5977
---------------------------------------


--- On Thu, 12/17/09, John <johntwrl@HOTMAIL.COM> wrote:

> From: John <johntwrl@HOTMAIL.COM>
> Subject: Proc Genmod Estimate Statement Question
> To: SAS-L@LISTSERV.UGA.EDU
> Date: Thursday, December 17, 2009, 1:12 PM
> I have a question about the way an
> estimate statment in a PROC GENMOD step
> is working.
>
> In conjunction with our statistician, we worked out the following bit of
> code to do log binomial analysis which appears to be producing the
> correct, or at least defensible, results.
>
> It's buried in a short macro program so we can use the same same step
> with several different outcome variables, hence &varq in the model
> statement.
>
> Age_diag3 has three levels as does cntre1.  Ajcc2 has two levels.
>
>
>      proc genmod data=newsource desc;
>           class  age_diag3(ref="<=60") cntre1 (ref=first) ajcc2
> (ref=first) / param=ref order=internal;
>           weight weight;
>           format cntre1 cntre.;
>           model &varq= age_diag3 cntre1 ajcc2 /
>                 dist=bin maxit=1000 link=log intercept=-4 type3;
>
>   **intercept=-4 is the magic initial value;
>
>           estimate '(61-69) vs <=60' age_diag3  1 0 -1  /exp;
>           estimate '>=70 vs <=60'    age_diag3  0 1 -1  /exp;
>
>           estimate '2 vs 1'          cntre1     1 0 -1  /exp;
>           estimate '3 vs 1'          cntre1     0 1 -1  /exp;
>
>           estimate 'II vs IB'        ajcc2      1 -1    /exp;
>
>      run;
>
> When I run it, I get the following warnings in the log.
>
> WARNING: More coefficients than levels specified for effect age_diag3.
> Some coefficients will be ignored.
> WARNING: More coefficients than levels specified for effect age_diag3.
> Some coefficients will be ignored.
> WARNING: More coefficients than levels specified for effect cntre1.  Some
> coefficients will be ignored.
> WARNING: More coefficients than levels specified for effect cntre1.  Some
> coefficients will be ignored.
> WARNING: More coefficients than levels specified for effect ajcc2.  Some
> coefficients will be ignored.
>
> When I comment out the -1 in each of the estimate statements, I get the
> same output, but no warning messages.
>
>      proc genmod data=newsource desc;
>           class age_diag3(ref="<=60") cntre1 (ref=first) ajcc2
> (ref=first) / param=ref order=internal;
>           weight weight;
>           format cntre1 cntre.;
>           model &varq= age_diag3 cntre1 ajcc2 /
>                 dist=bin maxit=1000 link=log intercept=-4 type3;
>
>   **intercept=-4 is the magic initial value;
>
>           estimate '(61-69) vs <=60' age_diag3  1 0 /* -1 */ /exp;
>           estimate '>=70 vs <=60'    age_diag3  0 1 /* -1 */ /exp;
>
>           estimate '2 vs 1'          cntre1     1 0 /* -1 */ /exp;
>           estimate '3 vs 1'          cntre1     0 1 /* -1 */ /exp;
>
>           estimate 'II vs IB'        ajcc2      1 /* -1 */   /exp;
>
>      run;
>
> I'm just trying to understand what is going on here.
>
> Thanks
>
0
Reply stringplayer_2 (1472) 12/17/2009 10:16:45 PM


0 Replies
333 Views

(page loaded in 0.351 seconds)

Similiar Articles:













7/24/2012 9:20:49 PM


Reply: