lrm警告“当前忽略重量”

时间:2019-11-08 09:09:02

标签: r logistic-regression

我正在运行以下模型:

> model1 <- lrm(dependent_variable ~ var1 + var2 + var3, data = merged_dataset, na.action="na.delete", weights = balance,normwt=TRUE)
Warning message:
In lrm(dependent_variable ~ var1 + var2 + var3+  :
  currently weights are ignored in model validation and bootstrapping lrm fits

此警告是什么意思,我该如何消除它?

编辑:

 > test <- data.frame(var1,var2,var3,dependent_variable,balance)
> head(test)
  var1 var2 var3 dependent_variable   balance
1   -1    0    1                  0 159941.89
2    1    0    1                  0 138374.47
3   -1    0    1                  0 157445.20
4   -1    1    0                  0  44593.68
5    1   -1   -1                  0 176284.48
6   -1   -1   -1                  0 406905.41




> model_7 <- lrm(dependent_variable ~ var1 + var2 + var3, data = test, na.action="na.delete", weights = balance,normwt=TRUE)
Warning message:
In lrm(dependent_variable ~ var1 + var2 + var3, data = test, na.action = "na.delete",  :
  currently weights are ignored in model validation and bootstrapping lrm fits
> blackrock_model_7
Logistic Regression Model

 lrm(formula = dependent_variable ~ var1 + var2 + var3, data = test, 
     na.action = "na.delete", weights = balance, normwt = TRUE)


 Sum of Weights by Response Category

         0         1 
 10049.396  2012.604 

                         Model Likelihood     Discrimination    Rank Discrim.    
                            Ratio Test           Indexes           Indexes       
 Obs         12062      LR chi2     188.52    R2       0.026    C       0.484    
  0           6286      d.f.             3    g        0.372    Dxy    -0.031    
  1           5776      Pr(> chi2) <0.0001    gr       1.451    gamma  -0.038    
 Sum of weights12062                          gp       0.060    tau-a  -0.015    
 max |deriv| 6e-10                            Brier    0.137                     

           Coef    S.E.   Wald Z Pr(>|Z|)
 Intercept -1.3538 0.0363 -37.32 <0.0001 
 var1      -0.2324 0.0363  -6.41 <0.0001 
 var2      -0.2649 0.0350  -7.56 <0.0001 
 var3      -0.0640 0.0454  -1.41 0.1586 

0 个答案:

没有答案