简体   繁体   中英

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?

When you open a data set in SAS, there is a button at the top called 'Analyze'. This has some built in functions ,although they are a bit more advanced than calculating p values.

There is in fact a way of adding dropdown menus in EG to do what you need and it is call PROMPTS .

You could have a prompt that let you select between normal and chi-square for example. You can have distribution paramaters static knowing that some won't apply in some distributions or make it dinamically depending on your selection.

here is a nice article re prompts how do you use a variable prompt

hope this helps

You could create a new dataset (File/New/Data) and define parameters of the function as variables. You can then fill in one or several lines/examples with different parameters. Using 'query builder' then computed columns icon, you can create a new variable using the desired function (CINV, PROBBNML or other) which will store the result in a new dataset.

It would be better to use only one dataset by function but you can show the result for different values of the parameters which may be interesting for your students.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM