0

I am trying to run a meta-regression using metafor with the following code:

rma(lnrr, v, mods = ~ duration_exp + feedstock_rename 
+                       + application_rate + soil_texture + soil_sample_depth_min
+                       + soil_sample_depth_max + average_precipitation, method = "REML", data=.)

But the code is returning the following error:

Error during wrapup: Processing terminated since k = 0.

When I remove the variable average_precipitation from the model which is a continuous variable, the model runs. Then I tried this variable in a separate model but it still gives the same error. I am a bit struggling to figure it out. Could anyone help with this?

jpsmith
  • 11,023
  • 5
  • 15
  • 36
madina_b
  • 35
  • 5
  • 2
    It's easier to help you if you provide a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input that can be used to test and verify possible solutions. – MrFlick Aug 31 '22 at 17:58
  • As the model did not run, I could not produce a reproducible example for the model units using `dput()`. Could you please suggest if there is any other way to do so? – madina_b Aug 31 '22 at 19:23
  • We need data to feed into the model so we can run it ourselves. So whatever you are passing to `data=`. We need to be able to run the code to get the same error as you in order to help. – MrFlick Aug 31 '22 at 19:34
  • Would this work? dput(groups_aver_precip) c("28", "NA", "451", "615", "1450", "251", "275", "400", "1875", "1045", "935", "685.7", "1973", "1200", "1318", "187", "503", "1300", "1293", "1073", "1350", "1175", "1150", "121.5", "1392", "348", "200", "272", "547", "830", "800", "365.5", "81", "600", "210.6", "1400", "1851", "642", "862", "656.3", "195", "697", "1422.4", "700", "1250", "890", "362", "224", "640", "118") – madina_b Aug 31 '22 at 20:23

0 Answers0