extractIRT: Extract and replace pieces of an item response theory mcmc

Description Usage Arguments Value

Description

extractIRT and replaceIRT are only to be used in interactive mode (i.e. not used within functions). see http://adv-r.had.co.nz/Computing-on-the-language.html#calling-from-another-function. It is much safer and easier to read to use the x, b, and a functions, which are used to extract and replace all gradient values, species slopes, and species intercepts (note these functions return as arrays). getAxisParamArray and setAxisParamArray are mostly for internal use, because usually x, b, and a will provide everything someone might need.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
extractIRT(mcmc, condition, index)

replaceIRT(mcmc, condition, value, index)

a(mcmc, index)

b(mcmc, index)

x(mcmc, index)

abx(mcmc, index)

a(mcmc) <- value

b(mcmc) <- value

x(mcmc) <- value

getAxisParamArray(mcmc, index, param = c("beta", "theta"))

setAxisParamArray(mcmc, index, param = c("beta", "theta"), value)

Arguments

mcmc

An mcmc object from a fitted IRT model.

condition

An expression evaluating to a logical vector the same length as the number of columns (parameters) in mcmc.

index

Optional (not really needed)

value

Replacement value.

param

Which parameter to obtain/replace (theta, beta, or alpha).

Value

Another mcmc object with (1) only the extracted piece (for extractIRT) or (2) the replaced values (for replaceIRT).


stevencarlislewalker/ecoBayesIRT documentation built on May 30, 2019, 4:42 p.m.