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)
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.
Thanks for the response.
I have posted my code and attached my data file. Why i should do it again?
Thanks
Cyril
@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.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.