Programming the statistical procedures from SAS

proc glimmix help

Reply
New Contributor
Posts: 4

proc glimmix help

I am attempting the procedure in sas with the following code, but SAS keeps hanging up.  Naturally I assume I have done something wrong with the statement:

data counts;

infile "/folders/myfolders/counts2.txt" dlm='09'x missover lrecl=10000 firstobs=2;

input flight $ cells;

proc print;

run;

proc sort data=counts out=counts2;

by flight;

run;

proc glimmix data=counts2;

class flight;

model cells=flight link=log dist=negbinomial;

run;

What am I missing?

Grand Advisor
Posts: 16,875

Re: proc glimmix help

For starters where is it "hanging up"?

Run each piece individually and check the log in between to identify the issue. And how big is your dataset (counts2) with how many distinct flights?

New Contributor
Posts: 4

Re: proc glimmix help

I am running SAS studio and when I click the running man I getting a running...... message with a spinning wheel but no conclusion, and no error log.

There are about 3000 lines in the data set from 10 different flights.

Grand Advisor
Posts: 16,875

Re: proc glimmix help

Separate it out. Run the import first and see if that works. If that means copying the code over reach time then do so. I haven't played around with SAS Studio so don't know if there's a submit selected or submit all button yet.

For example, does this alone work?

data counts;

infile "/folders/myfolders/counts2.txt" dlm='09'x missover lrecl=10000 firstobs=2;

input flight $ cells;

run;

New Contributor
Posts: 4

Re: proc glimmix help

gave sas studio a reboot and I now have output. 

I can even add the lsmeans and get an answer.  Is there a way to incorporate a Tukey style comparison in the glimmix?

Respected Advisor
Posts: 2,655

Re: proc glimmix help

There is a way, but I would suggest using the Edwards/Berry method (simulate= option).  Tukey's method depends pretty strongly on a gaussian distribution for accurate adjustments. (See Westfall et al., Multiple Comparisons and Multiple Tests  Using SAS, 2nd ed.).  The code would look like:

lsmeans flight/diff adjust=simulate(seed=1) adjdfe=row;

Steve Denham

Ask a Question
Discussion stats
  • 5 replies
  • 237 views
  • 0 likes
  • 3 in conversation