楼主: bourn
27879 19

[原创博文] 【请问】似然比检验中的Pr > ChiSq是什么意思呢? [推广有奖]

11
bourn 发表于 2012-4-21 14:56:14
priss111 发表于 2012-4-21 12:14
就LZ贴出的结果而言,
catmod过程得到的似然比检验是有统计学意义的,
即与不含有自变量的模型相比(只有截 ...
我没有做任何限制呢,程序见下。
  1. /*多项Logit模型*/
  2. proc sort data=taobao2_1;
  3. by descending brand1;
  4. proc catmod order=data;
  5. direct VAR18 VAR21 VAR22 VAR24-VAR26;
  6. model brand1=VAR18 VAR21 VAR22 VAR24-VAR26;
  7. run;
复制代码

12
priss111 发表于 2012-4-21 17:11:21
bourn 发表于 2012-4-21 14:56
我没有做任何限制呢,程序见下。
哦,
没有restrict 语句,
但是:可以看到似然比检验之后有个note:" ... ",
没有restrict语句,
为什么还会出现这个note?!

有可能var19的取值在应变量的某几个类中的频数是相等的.

无序多分类logistic回归分析与普通二分类logistic上在建模策略(思想)方面没有太多差异,
除了要检验自变量对应变量的影响有无统计学意义外,
还有检验某自变量在不同logit模型中的效应是否相同.


13
bourn 发表于 2012-4-21 20:57:29
priss111 发表于 2012-4-21 17:11
哦,
没有restrict 语句,
但是:可以看到似然比检验之后有个note:" ... ",
确实没用restrict语句。
我的那个似然比检验没通过,怎么改进呢?
检验自变量对应变量的影响有无统计学意义和检验某自变量在不同logit模型中的效应是否相同,怎么做呢?

14
priss111 发表于 2012-4-21 21:35:39
bourn 发表于 2012-4-21 20:57
确实没用restrict语句。
我的那个似然比检验没通过,怎么改进呢?
检验自变量对应变量的影响有无统计学 ...
1.
图中结果显示模型似然比拟合优度检验有统计学意义,
如LZ所言模型对数据拟合不好,jingju建议增加交互作用项,
加不加交互项还是要根据专业背景来决定,
另外如果某个自变量对一个logit模型中有意义而在另一个(或另几个)logit模型中没有意义,
那可以将这个自变量从模型中去掉(如果没有特别的专业背景支持该自变量必须在模型中);

2.
检验自变量对应变量的影响有无统计学意义,
可以用LZ贴出的code;

3.
检验某自变量在不同logit模型中的效应是否相同,
可以在model语句之前加一个restrict语句来限制某个自变量在3个logit模型的参数都相等,
以贴出的结果中var19为例,
proc catmod order=data;
  direct VAR18-27;
  restrict b7=?? b8=?? b9=??;   
  * ?? = beta(var19), 其值等于将多分类的1/2/4合并与3比较的普通二分类logit模型中的beta(var19)的值,b7-b9的值要相等;
  model brand1=VAR18-VAR27/ml;
run;
quit.
4.
没有restrict语句,
为什么还会出现这个note?!
LZ可以看看var19的取值在应变量的某几个类中的频数是否相等.

15
jingju11 发表于 2012-4-22 04:29:26
bourn 发表于 2012-4-20 11:20
如图。
Some comments from my own:
  • I still consider that LR test shown a poor fit for the model. why? df =172 for the test, is a difference between the current model and some model being compared, here i think, the saturated model. Let's count the degree of freedom: for the saturated model, df =68*(4-1) =204, and 32 for the current model (just add all the dfs in that table). so the difference is 204-32 = 172. That is, if you reserve degree of freedom of 172, that does NOT offset a bad fit from the model.
  • I would guess for the problem from var19 like: I only see there are 2 subpopulations for the var19 =1  in the first 40 populations. so i would bet there is no enough subpopulations for var19 =1 to support its estimate; for example, the number of subpopulations for var19=1 less than the level of response.
  • since you include all variables, all dummy ones, in the DIRECT statement, that implies you are doing the 'normal' logistic regression like that from proc logistic. To regard a variable as continuous, sometimes cause fitting problem. but i did not see here the problem(I don't have experience on that).
  • we don't know what those vars stand for, so no idea on the interaction reasonable or not. but including the crossing effects into the model and then remove those unimportant ones from the model is indeed a way to select and fit the model.

    jingju

16
priss111 发表于 2012-4-22 22:13:15
如jingju所言,
var19的某个水平与其他variables不同水平组合可能有 零 单元格的情形.

17
bourn 发表于 2012-4-23 23:30:19
priss111 发表于 2012-4-21 21:35
1.
图中结果显示模型似然比拟合优度检验有统计学意义,
如LZ所言模型对数据拟合不好,jingju建议增加交互 ...
看不懂,能讲得清楚些吗?
好像似然比检验通不过才能说明模型的拟合的好呢。

18
jingju11 发表于 2012-4-24 04:32:04
为什么总说好像。。。
我看了一下SAS的例子。摘录如下。其实许多人做分析都看看sas的举例。
模型好不好当然不能只参考某个指标。但是,如果参考了,就不能颠倒意义。
当然在有的过程里,p小说明模型有改善,比如proc genmod。所以LR的意义在与和什么做比较。和null模型比,小的p意味着和最不完善的模型(未必最差)比有明显的改善;如果和full模型比,大的p意味着和最完全的模型(未必最好)比没有很大的差距。无论如何比较,从自由度的变化可以看出。
在catmod里,LR是和full(SATURATED)模型比。所以,很小的p可能说明模型不完整。
京剧
....
The analysis of variance table is shown in Figure 28.8. The likelihood ratio chi-square statistic is 1.78 with a p-value of 0.7766, indicating a good fit; .....
Figure 28.8 Main-Effects Model: ANOVA Table

Maximum Likelihood Analysis of Variance
SourceDF Chi-SquarePr > ChiSq
Intercept239.88<.0001
School414.840.0050
Program210.920.0043
Likelihood Ratio41.78[0.7766]





19
bourn 发表于 2012-4-24 15:41:08
jingju11 发表于 2012-4-24 04:32
为什么总说好像。。。
我看了一下SAS的例子。摘录如下。其实许多人做分析都看看sas的举例。
模型好不好当 ...
如何才能使模型完整呢,需要重新筛选变量?
还是现在的变量都是虚拟变量,需要加入连续变量呢?

20
赵安豆 发表于 2024-12-4 08:52:00
在统计学中,“Pr > ChiSq”是“概率大于卡方”的缩写,这里的"Pr"实际上代表的是P值。在似然比检验(Likelihood Ratio Test,简称LRT)的上下文中,它指的是观察到的数据与模型假设相符程度的概率。

具体来说,在进行多项Logit回归分析时,SAS软件通过比较全模型和简化模型的对数似然函数值来构建似然比统计量。该统计量通常近似服从自由度为两个模型参数差值的卡方分布(χ)。然后,P值(Pr > ChiSq)就是基于这个卡方分布计算出来的,它表示在原假设(通常是简化模型正确)下得到当前或更极端结果的概率。

如果P值小于一个事先设定的显著性水平(如0.05),则通常会拒绝原假设,认为全模型比简化模型提供了更好的拟合,即额外的参数在解释数据方面是有统计学意义的。反之,如果P值大于这个阈值,则没有足够的证据拒绝原假设,可以认为简化模型已经足够好。

简而言之,“Pr > ChiSq”是一种评估模型差异是否具有统计学显著性的指标,在似然比检验中用于决定是否需要引入更多的参数以改进模型拟合度。

此文本由CAIE学术大模型生成,添加下方二维码,优先体验功能试用



您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 08:04