Code and output
> dredge(regional ~ national, foreign, tbili2_recip, data = s2)
Error in eval(.expr_beta_arg) : object 'foreign' not found
Sample data
s2 <- structure(list(regional = c(0, 0, 0, 0, 0, 1), national = c(0,
0, 0, 0, 0, 0), foreign = c(0, 0, 0, 0, 0, 0), tbili2_recip = c(1,
1, 0, 1, 0, 0), tbili16_recip = c(0, 0, 0, 0, 0, 0), tbili32_recip = c(0,
0, 0, 0, 0, 1), tbili33_recip = c(0, 0, 0, 0, 0, 0), tbil_don1 = c(0,
0, 0, 0, 0, 0), tbil_don18 = c(1, 0, 0, 0, 1, 0), tip = c(0,
0, 0, 0, 0, 0), wit70 = c(0, 0, 0, 0, 0, 0), wit80 = c(0, 0,
0, 0, 0, 0), wit90 = c(0, 0, 0, 0, 0, 0), wit91 = c(0, 0, 0,
0, 0, 0), weight_diff = c(-3, -9, -33, 18, -8, -26), weight45 = c(0,
0, 0, 0, 0, 0), weight70 = c(0, 0, 0, 0, 0, 0), weight_neg45 = c(0,
0, 0, 0, 0, 0), weight_neg70 = c(0, 0, 0, 0, 0, 0), work = c(0,
0, 0, 0, 0, 0)), row.names = c(NA, 6L), class = "data.frame")
I am actually trying to do this for a few different variables than shown here, but all are having the same issue. Anything obvious I am overlooking? Variables are all numeric and it works in a typical lm().
I checked the other posts on stackoverflow on this topic with no luck.