Skip to content

Support offsets for all models in BoomSpikeSlab ? #62

@Martin-Jung

Description

@Martin-Jung

I really like using the BoomSpikeSlab package in R due to its speed.
I wonder though whether there are any plans to support offsets (or alternatively weights) in other model families? So far only poisson.spike allows the specification of an offset to the regression for poisson processes.
Offsets in the regression formula for logit.spike are ignored.

So these two models are close to identical even though in one the bmi is set as an offset.

library(BoomSpikeSlab)

data(Pima.tr, package = "MASS")
data(Pima.te, package = "MASS")
pima <- rbind(Pima.tr, Pima.te)
model1 <- logit.spike(type == "Yes" ~ npreg + glu + bp + skin, data = pima, niter = 500)
model2 <- logit.spike(type == "Yes" ~ npreg + glu + bp + skin + offset(log(bmi)), data = pima, niter = 500)

# ~ Identical
posterior::summarise_draws(model1$beta)
posterior::summarise_draws(model2$beta)

Or am I missing an option to specify this correctly somewhere?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions