简体   繁体   English

SAS Enterprise p值和百分位数

[英]SAS Enterprise p-value and percentile

I'm considering teaching my introductory statistics course in SAS Enterprise Guide. 我正在考虑在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. 我希望我的学生能够使用下拉菜单计算各种分布(二项式,正态,t,卡方)的p值和百分位数(如果可能的话)。 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'. 在SAS中打开数据集时,顶部有一个名为“Analyze”的按钮。 This has some built in functions ,although they are a bit more advanced than calculating p values. 这有一些内置函数,虽然它们比计算p值更先进。

There is in fact a way of adding dropdown menus in EG to do what you need and it is call PROMPTS . 实际上有一种方法可以在EG中添加下拉菜单来完成你需要的操作,这就是调用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. 使用“查询构建器”然后计算列图标,您可以使用所需的函数(CINV,PROBBNML或其他)创建新变量,该函数将结果存储在新数据集中。

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. 最好只按功能使用一个数据集,但是您可以显示可能对您的学生感兴趣的参数的不同值的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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