rerror-handlinglinear-regressionbootstrappingrobust

Error in round(x[[y]], digits = digits) : non-numeric argument to mathematical function


I was trying to fit a linear regression model using the lm function on a dataset (in R):

model <-lm(DLP~gender+Kvp120+mAs+length+gantry+device_age+detectors+scanner2,data = data)

and here were the results:

Coefficients:
(Intercept)       gender       Kvp120          mAs       length       gantry  
   -137.258       22.249      144.124        0.555       49.914     -171.097  
 device_age    detectors     scanner2  
    -14.712      -48.284      192.903 

Then I tried to do the Wild Bootstrapping for Heteroskedastic data using the "fwildclusterboot" library:

wb1 <- boottest(model,param = "mAs",B = 2000)

Then if I try to run the "wb1" object, I get this message:

Error in round(x[[y]], digits = digits) : non-numeric argument to mathematical function

What is the solution?

I tried searching on Google to solve my problem, but nothing appeard to match exactly my problem ... I thought I should change the decimals of all columns in my CSV sheet and unite them, and again nothing happened.


Solution

  • Nobody answered this question, but I finally found the solution. It was simple. The output of this function is not run-able (it does not have a built-in print of results when you run it), that's why it makes these errors. The solution is just to run: summary(output).