Hello everyone,
I am trying to understand how the joint F value from proc mixed using lsmestimate option is being calculated. An example data, sas
data test;
input Y visitno subid;
datalines;
7 1 1
9 1 2
8 1 3
7 2 1
8 2 2
6 2 3
;
proc mixed data=test ;
class visitno subid;
model y = visitno/solution outp=pred ;
repeated visitno /type=un subject=subid;
*contrast 'visitno' [1 1], [1 2];
lsmestimate visitno [1 1], [1 2]/joint(chisq) cl e;
run;
Least Squares Means Estimates Effect Label Estimate Standard Error DF t Value Pr > |t| Alpha Lower Upper visitno Row 1 8.0000 0.5774 2 13.86 0.0052 0.05 5.5159 10.4841 visitno Row 2 7.0000 0.5774 2 12.12 0.0067 0.05 4.5159 9.4841 F Test for Least Squares Means Estimates Effect Num DF Den DF Chi-Square F Value Pr > ChiSq Pr > F visitno 2 2 228.00 114.00 <.0001 0.0087
Can someone help me understand how the F Value of 114 is derived?
Thank you for your help.
Best,
Divine
Please click on the {i} icon and paste the output into the window that appears. This will maintain the formatting of your output, and make it readable.
The Chi-squared value is computed to be 228, so the F-value is 228/2 = 114.
For future reference, I wanted you to copy the TEXT from the LISTING window and paste it into the {i} window. If you copy the HTML, it still isn't very readable. If you don't have a LISTING window, then a screen capture of the HTML is fine.
Thank you PaigeMiller.
So to ask but how to calculate the chi-square value of 228 with the joint(chisq) option. Is it the ratio of the independent chi-square?
Best,
Divine
Thank you again!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.