I am building a default risk prediction model using bayesglm with the binomial method and I would like fit the model with weights, I am trying to use the principal vector (amount of money that a company has lent to a person) as weights, but I got these warning messages:
1: In bayesglm.fit(x = X, y = Y, weights = weights, start = start, : non-finite coefficients at iteration 4
2: algorithm did not converge
3: fitted probabilities numerically 0 or 1 occurred
The principal has a high variance, that could be a reason? I tried with the log and got also the same messages.
set.seed(123)
lm_D_O9<- bayesglm(sampleDefaultO_tr$Default ~ ., data = sampleDefaultO_tr[,-c(20,23,24,49:54,58,60:62)], family=binomial,control = list(maxit = 100),
weights=floor(log(sampleDefaultO_tr$mntTotal)*1000))
My repo here--> github.com/dclopezb9/Thesis Thank you in advance!