bdlimglmall: BDLIM for glm

View source: R/bdlimglmall.R

bdlimglmallR Documentation

BDLIM for glm

Description

This estimates the model for a single group or the overall effect

Usage

bdlimglmall(Y, X, Z, G, B, model, niter, nburn, nthin, prior, family = family)

Arguments

Y

Outcome vector

X

Exposure matrix

Z

Matrix of covariates. An intercept will be added

G

Vector indicating group membership

B

Basis object from build.basis

model

Indicator of how G enters the model. If 'bw' both the betas and weight functions will vary between groups. If 'b' then only the betas will vary between groups. If 'w' then only the wieght function will vary by group. If "n" then neither beta or the wieght function will vary by group. If a vector of any combination of the four choices is provided then those models will be run and compared. The option 'all' runs all four models and compares them.

niter

Number of MCMC iterations

nburn

Number of MCMC iterations to be discarded as burning

nthin

Number of draws taken to obtain one sample

prior

List with the entries: betavar = the prior variance for beta; and gamma = the prior variance for the covarites. The priors on beta and gamma are iid normal mean zero.

family

Family as a funciton for glm

Author(s)

Ander Wilson


AnderWilson/regimes documentation built on Aug. 5, 2023, 8:30 a.m.