BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MegJOH
Fluorite | Level 6

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?

1 ACCEPTED SOLUTION

Accepted Solutions
TomKari
Onyx | Level 15

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

7 REPLIES 7
Ksharp
Super User

check  QUANTILE () Function .

Reeza
Super User

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

MegJOH
Fluorite | Level 6

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

Ksharp
Super User

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

TomKari
Onyx | Level 15

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

MegJOH
Fluorite | Level 6

Thanks, - I'll consider that.

Megan

TomKari
Onyx | Level 15

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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