【问题标题】:Pearson Chi-squared test and p-value in SASSAS 中的 Pearson 卡方检验和 p 值
【发布时间】:2017-11-27 16:52:07
【问题描述】:

我是 SAS 新手,无法生成 Pearson 卡方和 p 值。我尝试了一些教程和 Youtube 视频,但都失败了。

我想使用 Proc Freq 生成 CO2_level 和 Yield_category 变量的交叉表。还获得与此交叉表关联的 Pearson 卡方检验统计量和 p 值。但是,当我运行代码时,我只得到频率作为输出。

I have the following table

我的代码是:

proc freq data=growth;
    tables CO2_level*Yield_category/nopercent norow testp=(50 25 25);
run;

My result is the following table:

谁能帮我解决这个问题?

谢谢,

卡洛斯

【问题讨论】:

  • 对不起,结果表有误。实际上我得到的只是频率。
  • 请在问题正文中将图像添加为图像(或者 - 甚至更好 - 作为文本),而不是链接。

标签: sas chi-squared


【解决方案1】:

将 CHISQ 选项添加到 TABLES 语句。

请在以后查看文档,特别是示例部分,例如,您可以在其中找到完整的示例: http://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.2&docsetId=procstat&docsetTarget=procstat_freq_examples03.htm&locale=en

proc freq data=growth;
    tables CO2_level*Yield_category/nopercent norow testp=(50 25 25)  CHISQ;
run;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-06-22
    • 1970-01-01
    • 1970-01-01
    • 2021-02-12
    • 1970-01-01
    • 2022-11-27
    • 1970-01-01
    相关资源
    最近更新 更多