Questions tagged [bayesglm]

Bayesglm(arm package of Bayesian generalized linear models.) Bayesian functions are for generalized linear modeling with independent normal, t, or Cauchy prior distribution for the coefficients.

Bayesglm(arm package of Bayesian generalized linear models.) Bayesian functions are for generalized linear modeling with independent normal, t, or Cauchy prior distribution for the coefficients.

12 questions
5
votes
1 answer

Bayes predict, subscript out of bounds

I'm having some problems with the predict function when using bayesglm. I've read some posts that say this problem may arise when the out of sample data has more levels than the in sample data, but I'm using the same data for the fit and predict…
ch-pub
  • 1,664
  • 6
  • 29
  • 52
4
votes
2 answers

Can I pool imputed random effect model estimates using the mi package?

It appears that the mi package has had a pretty big rewrite at some point within the past couple of years. The "old" way of doing things is well-outlined in the following tutorial: http://thomasleeper.com/Rcourse/Tutorials/mi.html The "new" way of…
joemienko
  • 2,220
  • 18
  • 27
2
votes
3 answers

Regression table for bayesglm?

stargazer is a great tool to generate a regression table if you are not using bayesglm. For example, suppose I have the following data: library(dplyr) set.seed(9782) N<-1000 df1 <- data.frame(v1=sample(c(0,1),N,replace = T), …
Ignacio
  • 7,646
  • 16
  • 60
  • 113
2
votes
0 answers

Bayesian categorical-logistic model in R2OpenBUGS

I'm trying to fit a categorical-logistic model using the painters dataset contained in the MASS library. I divided the dataset in two parts, so i can predict in the future the values of School variable using the baseline category logistic…
2
votes
1 answer

R caret / rfe / bayesglm feature selection

I'm using bayesglm for a logistic regression problem. It's a dataset of 150 rows and 2000 variables. I'm trying to do variable selection and usually look at glmnet in caret::rfe. However there isn't a method for bayesglm. Is there anyway to…
screechOwl
  • 27,310
  • 61
  • 158
  • 267
1
vote
0 answers

rstanarm - error when running Bayesian model

EDIT - I have managed to resolve this. See my comment below I am running a Bayesian regression in R using rstanarm using priors I have set, using the following code: priors <- rstanarm::normal(location = c(-1, 0.5, 2), scale = c(1, 2, 0.5)) bmd <-…
1
vote
1 answer

Bayesian regression for proportions or rates response variable (0,1) in R

I have my response variable as proportions with values between 0 and 1, 0 and 1 not included. I would like to perform Bayesian logit regression. I am using the package arm in R and I followed the example in Bayesian Generalized Linear Models in R as…
Lomnewton
  • 35
  • 6
1
vote
1 answer

RJAGS compilation with categorical variable throws index out of range error

Background Trying to model volume of bikers in a rail trail which is less for a weekday as compared to a weekend. RailTrail from mosaicData contains data collected by the Pioneer Valley Planning Commission on the usage of a local rail-trail. For…
hnovice
  • 43
  • 5
1
vote
0 answers

Argument "weights" in bayesglm() function in R

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…
1
vote
0 answers

Bayesian GLM in R using inverse gaussian family

I am trying to fit a bayesian glm model to my data assuming an inverse family of distribution and link=(identity). I am getting the following message: Error in if (iter > 1 & abs(state$dev - devold)/(0.1 + abs(state$dev)) < : missing value where…
0
votes
1 answer

Incorporating Prior Information in a Ridge Regression (RAPM) in R

I am currently using R’s glmnet package to run a weighted ridge regression on hockey data. I have a sparse matrix with dummy variables denoting whether a player is on the ice playing offense or defense for a given shift, in addition to a few other…
-3
votes
2 answers

Logistic regression without an intercept gives fitting warning message

I am trying to run the logistic regression without an intercept. Firstly, I tried the function glm but I got the following error: Warning message: glm.fit: fitted probabilities numerically 0 or 1 occurred Since…
Eric
  • 528
  • 1
  • 8
  • 26