sampleSig2b {hbmem}R Documentation

Function sampleSig2b

Description

Samples posterior of the variance of a normal distibution which has the same additive structure on the mean and the log of variance. Usually used within MCMC loop, but it is broken as of version .1!

Usage

sampleSig2b(sample,y,sub,item,lag,I,J,R,nsub,nitem,s2mu,s2a,s2b,met,blockMean,sampLag)

Arguments

sample Previous sample of block variances.
y Vector of data
sub Vector of subject index, starting at zero.
item Vector of item index, starting at zero.
lag Vector of lag index, zero-centered.
I Number of subjects.
J Number of items.
R Total number of trials.
nsub Vector of length (I) containing number of trials per each subject.
nitem Vector of length (J) containing number of trials per each item.
s2mu Prior variance on the grand mean mu; usually set to some large number.
s2a Shape parameter of inverse gamma prior placed on effect variances.
s2b Rate parameter of inverse gamma prior placed on effect variances. Setting both s2a AND s2b to be small (e.g., .01, .01) makes this an uninformative prior.
met Vector of metropolis-hastins tuning parameters.
blockMean Block of parameters for the mean of the distribution.
sampLag Logical. Whether or not to sample the lag effect.

Details

This function is for a model with an additive structure on the log of the variance of a normal distribuiton. This model is under development, the code is buggy, and it might not even work in the end.

Value

The function returns a new sample of a block of Sigma2 paramters.

Author(s)

Michael S. Pratte

See Also

hbmem

Examples

#no example yet

[Package hbmem version 0.1 Index]