gpt4 book ai didi

使用 BIC 准则运行逐步线性模型

转载 作者:行者123 更新时间:2023-12-03 03:06:51 25 4
gpt4 key购买 nike

是否可以设置逐步线性模型来使用 BIC 标准而不是 AIC?

我一直在尝试这个,但它仍然使用 AIC 值而不是 BIC 来计算每个步骤

null = lm(data[,1] ~ 1)
full = lm(data[,1] ~ age + bmi + gender + group)
step(null, scope = list(lower=null,upper=full),
direction="both", criterion = "BIC")

最佳答案

将参数 k=log(n) 添加到 step 函数(模型矩阵中的n 个样本)

来自?步骤:

Arguments:
...

k the multiple of the number of degrees of freedom used for the penalty. Only k = 2 gives the genuine AIC; k = log(n) is sometimes referred to as BIC or SBC.

关于使用 BIC 准则运行逐步线性模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19400494/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com