BookmarkSubscribeRSS Feed
gillgiff
Calcite | Level 5

I am trying to run a logistic regression using a hybrid MC exact estimation technique. There appears to be something wrong with my code and I think it is in the do loop. I am brand new to the SAS language and someone provided me with the following sloppy code.

I was trying to run the analysis in SAS Enterprise Guide with SAS version 9.3. Apparently this code worked in a previous or later version of SAS. Any obvious mistakes with the code? The data is a binary response of two different count techniques with the actual paired counts as predictors.

Sincerely, Gifford Gillette

data Data1;

    do ID=1 to 16;

      do Outcome = 1 to 0 by -1;

        input rnam Count @@;

        output;

      end;

    end;

    datalines;

1 20 0 13

1 12 0 19

1 14 0 58

1 0 0 5

1 12 0 12

1 12 0 2

1 0 0 0

1 12 0 12

1 16 0 10

1 23 0 19

1 30 0 12

1 12 0 9

1 16 0 16

1 31 0 5

1 10 0 13

1 18 0 17

;

  proc logistic data=Data1 exactonly exactoptions (Method=NetworkMC) plots=all;

      strata ID;

      model rnam=count;

      exact count / estimate=both;

  run;

3 REPLIES 3
PGStats
Opal | Level 21

Works fine in SAS/STAT 12.1 (SAS 9.3 TS1M2). - PG

PG
gillgiff
Calcite | Level 5

PGStats,

Hmmm.....

Any chance you could run this similar code and email me the results? I have a feeling our University SAS version needs updated.

data Data1;

     do ID=1 to 12;

       do Outcome = 1 to 0 by -1;

         input rnam Count @@;

         output;

       end;

     end;

     datalines;

1 17 0 17

1 11 0 9

1 13 0 8

1 7 0 2

1 18 0 9

1 19 0 13

1 22 0 13

1 20 0 16

1 2 0 0

1 28 0 19

1 40 0 29

1 4 0 2

;

   proc logistic data=Data1 exactonly exactoptions (Method=NetworkMC) plots=all;

      strata ID;

      model rnam=count;

      exact count / estimate=both;

   run;

gillgiff@isu.edu

Tom
Super User Tom
Super User

I don't see anything wrong with the data step code, but I did notice that OUTCOME and RNAM always have the same value.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1377 views
  • 0 likes
  • 3 in conversation