【问题标题】:LC50 calculation from bootstrap GLM List来自引导 GLM 列表的 LC50 计算
【发布时间】:2014-01-21 14:08:15
【问题描述】:

我正在尝试从引导的 GLM 输出列表中计算 LC50

我在一个列表(命名结果)中有引导 GLM 的输出,如下所示: (为方便起见,我只是放入了最后一个结果,而不是整个列表)

$thetastar[[100]]    
Call:  glm(formula = dead[x] ~ concentration[x] + factor(female.no[x]), 
family = binomial, data = subset.data.48hr)

Coefficients:
      (Intercept)       concentration[x]  factor(female.no[x])3  factor(female.no[x])4             factor(female.no[x])7  
           0.7386                 0.1869                -0.8394                -5.6613                   -2.9576  
factor(female.no[x])8  factor(female.no[x])9  
          -1.5329                -2.7826  

Degrees of Freedom: 354 Total (i.e. Null);  348 Residual
(1265 observations deleted due to missingness)
Null Deviance:      484.2 
Residual Deviance: 257  AIC: 271

使用 MASS 包中的 dose.p 我正在尝试计算已运行模型中每个人的 LC50

dose.p(results$thetastar[[100]], cf = c(2,3), p = 0.5)

返回

              Dose       SE
p = 0.5: 0.2227249 0.161769

据我了解,这是 factor(female.no[x])3. 的 LC50,即 dose.p 我已将 cf = c(2,3) 放入第 2 列和第 3 列,concentrationfactor(female.no[x])3.

这是正确的吗?

其次:

有没有一种方法可以让每个女性获得 LC50,即factor(female.no[x])3factor(female.no[x])4factor(female.no[x])7 等等,我不知道如何让dose.p 工作在不同的变量无需手动更改代码cf=:

dose.p(results$thetastar[[100]], cf = c(2,3), p = 0.5)
dose.p(results$thetastar[[100]], cf = c(2,4), p = 0.5)
dose.p(results$thetastar[[100]], cf = c(2,4), p = 0.5)

最后: 我的结果存储在一个列表中,我如何让dose.p 沿着列表工作,是不是类似于:

test=matrix
for(i in 1:results){
test[i,]= dose.p(results$thetastar[[i]], cf = c(2,3), p = 0.5)

感谢您的帮助

【问题讨论】:

    标签: r list glm statistics-bootstrap


    【解决方案1】:

    dose.pcf 参数采用截距和对数剂量的列。 (如果用浓度,不就是LC50吗?)

    对于默认动物(不是 3、4、8 或 9),您可以使用 (Intercept)concentration[x] 列,cf = 1:2

    对于其他动物,您需要截距加上一个因子。例如,对于动物 3,您需要第 1 列加上第 3 列(以及用于浓度的第 2 列)。不幸的是,dose.p 不会接受这样的规范,因此您必须在没有拦截的情况下重新运行模型。

    在公式中添加0 以实现此目的:

    glm(
      dead[x] ~ 0 + concentration[x] + factor(female.no[x]), 
      family = binomial, 
      data = subset.data.48hr
    )
    

    现在每个factor(female.no[x]) 都将包含该动物的“拦截”。

    【讨论】:

    • 好的,所以输出会给我每个人的每个截距,然后我需要获得每个组合的 LC50。即dose.p(results$thetastar[[100]], cf = c(2,3), p = 0.5) dose.p(results$thetastar[[100]], cf = c(2,4), p = 0.5)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多