turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- Base SAS Programming
- /
- Hypothesis test

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-21-2018 09:13 PM

I am trying to perform a hypothesis test to determine if more than 10% of cereals are manufactured by Post. Significance level=0.10.

Here it is my code and the data set:

DATA cereal;

INFILE "/folders/myfolders/cereal.txt"

DLM=',' FIRSTOBS=2 DSD MISSOVER;

INPUT Name :$50. Manufacturer $ Type $ Calories Protein Sodium Fiber Carbohydrates Sugars Potassium Vitamins Weight Cups;

RUN;

PROC PRINT DATA=cereal;

RUN;

PROC TTEST DATA= Cereal;

VAR Manufacturer;

RUN;

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Miah

04-22-2018 10:17 AM

CLASS statement contains the variable that distinquishes the groups being compared.

VAR statement specifies the response variable to be used in calculations.

FYI: http://www.math.wpi.edu/saspdf/stat/chap67.pdf

Thanks,

Suryakiran

Suryakiran

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Miah

04-22-2018 04:46 PM

@Miah wrote:

I am trying to perform a hypothesis test to determine if more than 10% of cereals are manufactured by Post. Significance level=0.10.

PROC TTEST will not perform the hypothesis test you are describing, nor will it even compute the percent of cereals manufactured by POST.

PROC FREQ will compute the percent of cereals manufactured by each manufacturer. The BINOMIAL option in the TABLES statement will perform the desired hypothesis test. http://documentation.sas.com/?docsetId=procstat&docsetTarget=procstat_freq_examples04.htm&docsetVers...

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Miah

04-22-2018 06:14 PM

The question you have to ask yourself is "have you met the prerequisites" for whatever analysis you want to do.

Do your 77 records represent a random sample of all cereal types (e.g., see https://en.wikipedia.org/wiki/List_of_breakfast_cereals )?

The simple question of whether Post cereals represent at least 10% of those represented in your data, a simple proc freq shows that to be true. But statistics (other than descriptive) can't (I don't think) provide what you're looking for unless you meet the assumptions of the analysis you want to do.

Art, CEO, AnalystFinder.com