- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have a set of data imported how would I perform I goodness of fit test on certain columns of the table. I don’t know where to start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
"Goodness-of-fit" test needs context. Without that context, there is no answer.
Sometimes you are testing to see how well data comes from a theoretical distribution (such as the normal distribution). Other times you are testing how well a statistical model fits the data.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@PaigeMiller I manages to do this test and get an output with 3 different tests and there p vales. How would I interoperate this to establish wether it not they were a sample from a normal distribution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Show us the output you get.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
SAS provides three different tests for goodness-of-fit to a normal distribution, the Kolmogorov-Smirnov, Cramer-von-Mises and the Anderson-Darling. Each tests to see if the hypothesis that the data is from a normal distribution, or not. While I can't really explain the differences, they all say the same thing ... since the p-values are >0.05, you do not reject the hypothesis that the data came from a normal distribution (or in layman's terms, the data is consistent with a normal distribution). You can read more about Kolmogorov-Smirnov here: https://blogs.sas.com/content/iml/2019/05/15/kolmogorov-d-statistic.html
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What kind of goodness of fit?
Against a known distribution such as "Is my variable normally distributed with specific mean and standard deviation?" or similar information for other distributions.
Or "Is my variable A in the data distributed similar to Variable X in this data?"
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
” Use Goodness of fit test to establish if height (ht) and weight (wt) were
sample from a normal distributed population”
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The NORMAL option of PROC UNIVARIATE will cause a goodness-of-fit to the normal distribution to be computed.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Brilliant. Is there an option in sas studio to do this without typing in any form of coding?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I can't answer SAS Studio questions if they do not involve writing code. I simply don't use SAS Studio for any other purpose than writing code.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
” Use Goodness of fit test to establish if height (ht) and weight (wt) were
sample from a normal distributed population”
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@laurenhosking wrote:
If you can explain it in code that would help also. I’m just used to using the task bar for most things however I’m open to learning the code
Basic code to test for normal distribution of one or more variables.
proc univariate data=sashelp.class normal; var height weight; run;
The NORMAL option on the proc statement requests the tests for normality of the variables on the Var statement.
You will get the typical Univariate output of summary moments, statistics, quantiles and extreme plus a table with tests for normality.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi this is really helpful! Just to clarify, I’ll have one set of table for height one set of tables for weight