unpack {brxx} | R Documentation |
unpack: Unpack Stan output for factor analysis samples from Stan
Description
This function unpacks raw Stan samples output.
Usage
unpack(Samples, Format)
Arguments
Samples |
S by theta matrix of sample parameter estimates. |
Format |
list formatted data file provided for Stan |
Value
Returns four matrices:
1). S by Q latent score matrix, x.
2). S by Q*P loading matrix, lambda.
3). S by P mean matrix, tau.
4). S by P loading variance matrix, alpha.
Examples
## Not run:
your_data_s=standardize(your_data)
formatted_data=prep(your_data_s,nfactors=3)
out=sampling(model, data=formatted_data, iter=5000, seed=999)
res=as.matrix(out)
unpacked=unpack(Samples=res,Format=formatted_data)
## End(Not run)
[Package brxx version 0.1.2 Index]