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
- /
- F Test for Least Squares Means Estimates formula

Options

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

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

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

Posted 09-18-2019 06:06 PM
(364 views)

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

5 REPLIES 5

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

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.

--

Paige Miller

Paige Miller

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

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.

--

Paige Miller

Paige Miller

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

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

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

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

Thank you again!

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. **

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.