Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Programming
- /
- SAS Procedures
- /
- GLMM with beta regression for proportional data

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 05-01-2019 01:53 PM
(1383 views)

Hi

I have a data set with outcome as proportions.

When i saw the distribution of the outcome, it looked like Poisson distribution and hence did a GLMM with Poisson distribution.

However, the reviewer for the manuscript did not accept this and has asked me to do GLMM with beta regression.

The problem is, the model wont run. PROC mixed and PROC GLMM (Poisson) runs ok. Not the beta regression.

I am adding the code i am using here. Any ideas will be welcome.

**proc** **glimmix** data=Cyril_nov29;

class Treatment Day Rep;

model freqsowcont= Treatment Day Treatment*Day/ddfm=kr dist=poisson link=log;

Random intercept/subject=Day(Treatment*Rep);

lsmeans Treatment Day Treatment*Day/pdiff lines ilink;

**run**;

This one runs ok.

**proc** **glimmix** data=Cyril_nov29 order=formatted exphessian;

class Treatment Day Rep;

model freqsowcont= Treatment Day Treatment*Day/dist=beta solution link=logit s;

Random intercept/subject=Day(Treatment*Rep);

lsmeans Treatment Day Treatment*Day/pdiff lines ilink;

**run**;

This doesnt run properly. Why?

I have attached data too as attachment, if anybody want to try it. Please use the first excel sheet (group)

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

If code doesn't provide the desired output it is often very helpful to copy the code and any messages from the log and paste into a code box here opened using the forum's {I} or "running man" icons to preserve formatting of any messages.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thanks for the response.

I have posted my code and attached my data file. Why i should do it again?

Thanks

Cyril

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@rroy wrote:

Thanks for the response.

I have posted my code and attached my data file. Why i should do it again?

Thanks

Cyril

1) you did not post a useable SAS data set. If I have to turn an XLSX into a data set I may make choices that mean the data I create is not the same as yours.

2) Posting the LOG results of code plus messages lets us see any diagnostics provided by SAS.

"Doesn't run properly" is awful vague.

Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.

No output? Post any log in a code box.

Unexpected output? We need input data, what the unexpected result is and why you think it is unexpected.

For example: data

data example; input x $ y z; datalines; 1 2 3 4 5 6 ; run;

Log:

661 662 proc means data=example mean sum; 663 var x y z; ERROR: Variable x in list does not match type prescribed for this list. 664 run; NOTE: The SAS System stopped processing this step because of errors.

And solution: Don't attempt to ask for the mean or sum of a character variable. Either read the data value for x as numeric, which would work in this case, or don't include X on the var statement in proc means.

You can easily get values form Excel files that you think should be numeric but end up as character (or vice versa) depending on how you read them into SAS. Problems with Excel data is one of the most common questions on this forum.

**SAS Innovate 2025** is scheduled for May 6-9 in Orlando, FL. Sign up to be **first to learn** about the agenda and registration!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Ready to level-up your skills? Choose your own adventure.