I have a following problem. I would like to compute bms
in R. My code:
library(MASS)
library(BMA)
library(BMS)
armington = bms(pokus, burn=1e5,iter=3e5, g="UIP", mprior="uniform", nmodel=50000, mcmc="bd", user.int=FALSE)
But I got this error:
Error in chol.default(XtX.start) :
the leading minor of order 19 is not positive definite
In addition: Warning message:
In bms(pokus, burn = 1e+05, iter = 3e+05, g = "UIP", mprior = "uniform", :
data seems to be rank-deficient: its rank seems to be only 18
My data contains no NA values, all columns are type numeric
.
My df pokus
looks like:
A tibble: 61 × 21
T SE MAX POP_VAR PER_100k RAIN INTERCEPT CPI UNEMPLOYMENT GINI INCOME POVERTY RACE RURAL DOWRY OLS Poisson FE RE Samplesize
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 0.016 0.004 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 493908
2 0.023 0.011 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 493908
3 0.014 0.003 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 493908
4 0.05 0.023 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1535
5 0.014 0.004 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 486132
6 0.016 0.004 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 482868
7 0.021 0.005 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 121056
8 0.016 0.004 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 493908
9 0.012 0.003 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 262992
10 0.012 0.003 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 262992
# … with 51 more rows, and 1 more variable: reviewed_journal <dbl>
How can I fix this error, please?