iccstan: intra-class correlations in rstan

Description Usage Arguments Author(s) See Also Examples

Description

calculating intra-class correlations(ICC) in rstan.

Usage

1
iccstan(y, group, model=NULL, iter=2000, warmup = NULL, chains= 2, thin=1, cores=NULL, parallel=TRUE)

Arguments

y

list.

group

vector.

model

compiled stanmodel.

iter

rstan parameter: total number of samples, including warmup.

warmup

rstan parameter: number of adaptation samples.

chains

rstan parameter: number of chains.

thin

rstan parameter: A positive integer specifying the period for saving sample.

parallel

If TRUE, run the stanmodel in parallel using doparallel package.

cores

Number of cores to use when executing the chains in parallel.

Author(s)

Hiroshi Shimizu

See Also

glmmstan,stan

Examples

1
2
3
4
5
6
7
data(baseball)

#intra-class correlations
model <- iccmodel()
y <- subset(baseball,select=c(HR,HIT))
fit <- iccstan(y,baseball$team,model=model)
output_icc(fit)

norimune/glmmstan documentation built on May 23, 2019, 9:33 p.m.