sample.z {bayesmove}R Documentation

Internal function to sample latent clusters

Description

This function samples the latent z parameter within the Gibbs sampler. Calls on the SampleZAgg function written in C++. Not for calling directly by users.

Usage

sample.z(ntsegm, nbins, y, nmaxclust, phi, ltheta, zeroes, ndata.types)

Arguments

ntsegm

numeric. The total number of time segments from all animal IDs.

nbins

numeric. A vector of the number of bins used to discretize each movement variable. These must be in the same order as the columns within y.

y

A list where each element stores separate aggregated count data per bin per time segment for each movement variable being analyzed. These are stored as matrices.

nmaxclust

numeric. A single number indicating the maximum number of clusters to test.

phi

A list where each element stores separate proportions per bin per time segment for each movement variable.

ltheta

A matrix storing the log-transformed values from the theta parameter.

zeroes

A list of arrays that contain only zero values which are three dimensional (ntsegm,nbins[i],nmaxclust).

ndata.types

numeric. The number of data streams being analyzed.

Value

A list with estimates for z where the number of elements is equal to the number of movement variables.


[Package bayesmove version 0.2.1 Index]