Help using Base SAS procedures

genmod procedure--> logor problems

Reply
New Contributor
Posts: 3

genmod procedure--> logor problems

Hi everybody!I am a new user!

I´m trying to calculate alpha1, but it have been impossible.

I used this syntax:

proc options option=MEMSIZE;

run;

proc sort Data=prueba; by gender communities;

run;

proc genmod data=prueba descending;

class communities agecoded (param=ref ref='2');

by gender;

model respiratory= agecoded

/ dist=bin link=logit;

repeated subject=communities/   logor =exch;

run;

This following output is the output obtained with the syntax:

                                                                                              

------------------------------------------- GENDER=0 -------------------------------------------

                                  The GENMOD Procedure

                                   Model Information

             Data Set          PRUEBAWritten by SAS

             Distribution         Binomial
             Link Function           Logit
             Dependent Variable RESPIRATORYandningsorganenssjukdomar
                                                  (icd10 j0_j9)

                        Number of Observations Read   38311
                        Number of Observations Used   38311
                        Number of Events               3527
                        Number of Trials              38311

                                Class Level Information

                                                     Design
                            Class    Value Variables

                            AGECODED 0      0
                                         1      1
                                         2      0

                                    Response Profile

                             OrderedRESPIRATORY    Total
                               ValueMAX    Frequency

                                   11           3527
                                   20          34784

PROC GENMOD is modeling the probability that RESPIRATORY   ='1'.

                                 Parameter Information

                         Parameter   Effect   AGECODED

                         Prm1        Intercept
                         Prm2        AGECODED 0
                         Prm3        AGECODED 1

                                     The SAS System                                21708
                                                           12:26 Thursday, September 1, 2011

------------------------------------------- GENDER=0 -------------------------------------------

                                  The GENMOD Procedure

      Algorithm converged.

tHATS ALL!!

The procedure stopped!

I have 30 communities and age coded in 3 groups.

My outcome is to have or not respiratory diseases.

Can someone help me please?

Thanks!!!

Raquel

Respected Advisor
Posts: 2,655

Re: genmod procedure--> logor problems

I am not sure, but it may be that the odds ratios are not exchangeable (one or more may be zero or infinite, or very close to that) betwee.  What occurs if you model the correlations as exchangeable, using type=exch instead of logor=exch?  There are a couple of similar threads (see the left hand panel under More Like This) that might be useful to you.

Steve Denham

New Contributor
Posts: 3

Re: genmod procedure--> logor problems

Hi!

Yeah! I have tried to do this: type=exch. and the "out of memory error" haven´t  appeared. But I am interested in getting alpha value. I would like to get a "measure" of clustering,

Regards,

Raquel

Respected Advisor
Posts: 2,655

Re: genmod procedure--> logor problems

Since I don't usually use GENMOD, preferring GLIMMIX for clustered or hierarchical data, I guess I answered the wrong the thing.  When you say alpha value, do you mean the significance level for some type of test?  As your code is currently constructed, there wouldn't be a test reported.  Try the following:

proc genmod data=prueba descending;

class communities agecoded (param=ref ref='2');

by gender;

model respiratory= agecoded

/ dist=bin link=logit TYPE3;

repeated subject=communities/   type =exch;

run;

There should be a table of chi-squared values and associated probabilities produced.  Is this what you are looking for?

Steve Denham

New Contributor
Posts: 3

Re: genmod procedure--> logor problems

Hi Steve!

I have been on vacation and I couldn´t answer.

I have tried to do the syntax you wrote, It´s working but I need to calculate the alpha index, (its not the significance),

If I replicate the analysis in R everything it is okay!

Regards,

Raquel

Respected Advisor
Posts: 2,655

Re: genmod procedure--> logor problems

I may not understand alpha, but looking through the documentation, is it the log odds ratio for cluster pairs?  If so, then you will probably have to calculate the log odds ratios in a data step, using the OBSTATS option in the model statement, and ODS OUTPUT obstats=obstats; in your code.

However, I must admit we are now WAAAAAAAY outside my experience.  Perhaps some others may come in to help.

Steve Denham

Ask a Question
Discussion stats
  • 5 replies
  • 238 views
  • 3 likes
  • 2 in conversation