myGWAS_fit: Fit a stan model.

Description Usage Arguments Value Author(s) See Also Examples

Description

Fit a stan model.

Usage

1
2
3
myGWAS_fit(model = "dummy", method = "dummy", type = "dummy",
  cov = NULL, geno = NULL, pheno = NULL, prior_non = 1, prior_inf = 0,
  iter = 1000, warmup = 200, chains = 3, cores = 3)

Arguments

model

A stan model of rstan:stanmodel class.

method

Method to estimate model parameters ("optimizing", or "sampling").

type

Variable type of the response variable ("linear", "binary", "categorical").

cov

A matrix of model covariates.

geno

A vector of variant genotype data (0, 1, 2).

pheno

A vector of response variable data.

Value

A list of model fit.

Author(s)

Xulong Wang, xwang@jax.org

See Also

rstan package which this function wraps

Examples

1
2
3
4
5
6
7
8
9
myGWAS_fit(mymodel, rebuild = F)
data("sample", package = "bayes.glmm")
pheno = data$pheno
geno = data$geno
cov = data$cov
L <- t(chol(data$K))
mymodel = stan_models(model = "glm")
y1 = myGWAS_fit(model = mymodel, method = "optimizing", type = "categorical", cov = cov, geno = geno[c(1, 3), ], pheno = pheno)
y2 = myGWAS_fit(model = mymodel, method = "sampling", type = "categorical", cov = cov, geno = geno[c(1, 3), ], pheno = pheno)

xulong82/bayes.glmm documentation built on May 4, 2019, 1:27 p.m.