Desktop productivity for business analysts and programmers

SAS Enterprise p-value and percentile

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 10
Accepted Solution

SAS Enterprise p-value and percentile

I'm considering teaching my introductory statistics course in SAS Enterprise Guide. I want my students to be able to calculate p-values and percentiles for various distributions (binomial, normal, t, chi-square) with the drop-down menus if at all possible. For example, is there a way to do both of:

    DATA pval;

       pval=1-PROBBNML(0.5,25,15);

    RUN;

    PROC PRINT DATA=pval;

    RUN;

and

    DATA chi;

       qchi=CINV(0.95,4);

    RUN;

    PROC PRINT DATA=chi;

    RUN;

via the drop-down menus?


Accepted Solutions
Solution
‎01-16-2015 12:38 PM
Trusted Advisor
Posts: 1,052

Re: SAS Enterprise p-value and percentile

There isn't a point-and-click reference to this specific calculation, but you can have the students tackle it without SAS coding. Here's how I'd go about it:

1. Most EG tasks expect to operate on data, including what I'm about to propose. In this case, I would (prior to the class) create a one-record SAS dataset named Dummy_Data in a permanent location, with one variable named Dummy_Variable, containing 1. Another option is to have the students do it themselves, using the "New Data" dialogue.

2. Now your students can use Query Builder to create the result. First, create a new query based on Dummy_Data.

3. Don't add anything to the "Select Data" pane. Instead, add a new computed column.

4. Make it an advanced expression.

5. In the expression builder window, students can enter

          1 - PROBBNML(0.5, 25, 15)

using any desired combination of point-and-click and typing. I was able to do it without any typing except for the four numbers. Hit "Next".

6. Type pval as the identifier and column name, and any desired label. Hit "Finish".

7. Change the name of the result dataset, if desired.

8. Run the query, and I believe you'll find the result identical to your SAS data step.

In my opinion, this is as non-technical as asking students to do the same with Excel. No knowledge of SAS programming is needed, and they experience the Query Builder, which may be the most useful feature of Enterprise Guide.

I hope this gets you started!

  Tom

View solution in original post


All Replies
Grand Advisor
Posts: 9,576

Re: SAS Enterprise p-value and percentile

check  QUANTILE () Function .

Grand Advisor
Posts: 17,332

Re: SAS Enterprise p-value and percentile

Is that available via point and click? Can you access the query tool without a dataset reference?

Occasional Contributor
Posts: 10

Re: SAS Enterprise p-value and percentile

is this available from the drop-down menus, as Reeza asked? That's what I want to do - not have the students code it.

Grand Advisor
Posts: 9,576

Re: SAS Enterprise p-value and percentile

Sorry. I don't know . I haven't used EG for a long time .

Solution
‎01-16-2015 12:38 PM
Trusted Advisor
Posts: 1,052

Re: SAS Enterprise p-value and percentile

There isn't a point-and-click reference to this specific calculation, but you can have the students tackle it without SAS coding. Here's how I'd go about it:

1. Most EG tasks expect to operate on data, including what I'm about to propose. In this case, I would (prior to the class) create a one-record SAS dataset named Dummy_Data in a permanent location, with one variable named Dummy_Variable, containing 1. Another option is to have the students do it themselves, using the "New Data" dialogue.

2. Now your students can use Query Builder to create the result. First, create a new query based on Dummy_Data.

3. Don't add anything to the "Select Data" pane. Instead, add a new computed column.

4. Make it an advanced expression.

5. In the expression builder window, students can enter

          1 - PROBBNML(0.5, 25, 15)

using any desired combination of point-and-click and typing. I was able to do it without any typing except for the four numbers. Hit "Next".

6. Type pval as the identifier and column name, and any desired label. Hit "Finish".

7. Change the name of the result dataset, if desired.

8. Run the query, and I believe you'll find the result identical to your SAS data step.

In my opinion, this is as non-technical as asking students to do the same with Excel. No knowledge of SAS programming is needed, and they experience the Query Builder, which may be the most useful feature of Enterprise Guide.

I hope this gets you started!

  Tom

Occasional Contributor
Posts: 10

Re: SAS Enterprise p-value and percentile

Thanks, - I'll consider that.

Megan

Trusted Advisor
Posts: 1,052

Re: SAS Enterprise p-value and percentile

I think it will be great for your students if you use EG for an intro STATS course. It's an terrific way to keep them focused on results, without needing to be programmers.

If you find any deficits in the product, post them here and I'm sure the experts will help out!

Tom

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 829 views
  • 5 likes
  • 4 in conversation