Hoffman2:Software Tools:brms: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Use R library brms in Hoffman module load R/4.1.2 module load gcc/5.3.0 export R_LIBS='/u/project/CCN/apps/R_libs/rh7/4.1.2 Start R R >require(rstan) >require(brms) To...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Use R library brms in Hoffman | Use R library brms in Hoffman | ||
[http://https://mc-stan.org/users/interfaces/brms Official Website] | |||
module load R/4.1.2 | module load R/4.1.2 | ||
module load gcc/5.3.0 | module load gcc/5.3.0 | ||
export R_LIBS='/u/project/CCN/apps/R_libs/rh7/4.1.2 | export R_LIBS='/u/project/CCN/apps/R_libs/rh7/4.1.2' | ||
Start R | Start R | ||
R | R | ||
>require(rstan) | >require(rstan) | ||
>require(brms) | >require(brms) | ||
To run a test of brms (load rstan and brms first as above) | To run a test of brms (load rstan and brms first as above) | ||
>fit1 <- brm(count ~ zAge + zBase * Trt + (1|patient), | >fit1 <- brm(count ~ zAge + zBase * Trt + (1|patient), | ||
data = epilepsy, family = poisson()) | data = epilepsy, family = poisson()) |
Latest revision as of 23:27, 26 July 2022
Use R library brms in Hoffman
module load R/4.1.2 module load gcc/5.3.0 export R_LIBS='/u/project/CCN/apps/R_libs/rh7/4.1.2'
Start R
R >require(rstan) >require(brms)
To run a test of brms (load rstan and brms first as above)
>fit1 <- brm(count ~ zAge + zBase * Trt + (1|patient), data = epilepsy, family = poisson())