bayes_fosr: Bayesian Function-on-scalar regression

Description Usage Arguments Author(s) References Examples

Description

Wrapper function that implements several approaches to Bayesian function- on-scalar regression. Currently handles real-valued response curves; models can include subject-level random effects in a multilevel framework. The residual curve error structure can be estimated using Bayesian FPCA or a Wishart prior. Model parameters can be estimated using a Gibbs sampler or variational Bayes.

Usage

1
2
bayes_fosr(formula, data = NULL, est.method = "VB", cov.method = "FPCA",
  ...)

Arguments

formula

a formula indicating the structure of the proposed model. Random intercepts are designated using re().

data

an optional data frame, list or environment containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which the function is called.

est.method

method used to estimate model parameters. Options are "VB", "Gibbs", and "GLS" with "VB" as default. Variational Bayes is a fast approximation to the full posterior and often provides good point estimates, but may be unreliable for inference. "GLS" doesn't do anything Bayesian – just fits an unpenalized GLS estimator for the specified model.

cov.method

method used to estimate the residual covariance structure. Options are "FPCA" and "Wishart", with default "FPCA"

...

additional arguments that are passed to individual fitting functions.

Author(s)

Jeff Goldsmith ajg2202@cumc.columbia.edu

References

Goldsmith, J., Kitago, T. (Accepted). Assessing Systematic Effects of Stroke on Motor Control using Hierarchical Function-on-Scalar Regression. Journal of the Royal Statistical Society: Series C.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
data(DTI)
DTI = subset(DTI, select = c(cca, case, pasat))
DTI = DTI[complete.cases(DTI),]
DTI$gender = factor(sample(c("male","female"), dim(DTI)[1], replace = TRUE))
DTI$status = factor(sample(c("RRMS", "SPMS", "PPMS"), dim(DTI)[1], replace = TRUE))

fosr.dti = bayes_fosr(cca ~ pasat, data = DTI)
fosr.dti2 = bayes_fosr(cca ~ pasat, data = DTI, Kp = 4, Kt = 10)
fosr.dti2 = bayes_fosr(cca ~ pasat, data = DTI, Kp = 4, Kt = 10, est.method = "Gibbs", cov.method = "Wishart")

## End(Not run)

jeff-goldsmith/BayesFoSR documentation built on May 19, 2019, 1:45 a.m.