toLoo: Compute approximate leave-one-out (LOO) cross-validation for...

Description Usage Arguments Value See Also Examples

View source: R/fit.R

Description

You must use an ‘_ll’ model variation (see findModel).

Usage

1
toLoo(fit, ...)

Arguments

fit

a stanfit object

...

Additional options passed to loo.

Value

a loo object

See Also

outlierTable, loo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
palist <- letters[1:10]
df <- twoLevelGraph(palist, 300)
theta <- rnorm(length(palist))
names(theta) <- palist
df <- generateItem(df, theta, th=rep(0.5, 4))

df <- filterGraph(df)
df <- normalizeData(df)
dl <- prepCleanData(df)
dl$scale <- 1.5


m1 <- pcStan("unidim_ll", dl)

loo1 <- toLoo(m1, cores=1)
print(loo1)

pcFactorStan documentation built on Sept. 25, 2021, 5:06 p.m.