samplesCorrel {BRugs}R Documentation

Correlation

Description

This function calculates the correlation matrix between two vectors of variables.

Usage

samplesCorrel(node0, node1, beg = samplesGetBeg(), 
    end = samplesGetEnd(), firstChain = samplesGetFirstChain(), 
    lastChain = samplesGetLastChain(), thin = samplesGetThin())

Arguments

node0, node1

Character vectors of length 1, name of variables in the model.

beg, end

Arguments to select a slice of monitored values corresponding to iterations beg:end.

firstChain, lastChain

Arguments to select a sub group of chains to calculate correlation(s) for.

thin

to only use every thin-th value of the stored sample for statistics.

Details

If the variable of interest is an array, slices of the array can be selected using the notation variable[lower0:upper0, lower1:upper1, ...].

If the arguments are left at their defaults the whole sample for all chains will be used for calculation.

Value

Correlation matrix.

Note

If the MCMC simulation has an adaptive phase it will not be possible to make inference using values sampled before the end of this phase.

See Also

BRugs, help.WinBUGS


[Package BRugs version 0.9-2.1 Index]