modelStan: Bayesian mixed linear regression modelling

Description Usage Arguments Value See Also Examples

View source: R/modelStan.R

Description

To fit longitudinal dataset using linear mixed model by calling stan package.

Usage

1
modelStan(y_var, x_var, id_var = "ID", dat, seed = 1, ...)

Arguments

y_var

Character of response variable

x_var

Character vector of random effect variables

id_var

Character of id variable

dat

Longitudinal data input

seed

Random seed to pass to sampling

...

Additional arguments passed to sampling

Value

dataframe of posterior output from Bayesian mixed linear regression

See Also

Other BayesPC main functions: clustKL(), pcFit(), postMean()

Examples

1
df_of_draws <- modelStan("Record", paste0("Z", 1:10), "ID", DATASET, seed=1, iter = 2, chain = 1)

maoyinan/BayesPC documentation built on Dec. 21, 2021, 1:48 p.m.