sampleStep | R Documentation |
This function performs a single step of the Markov Chain Monte Carlo (MCMC) algorithm to update parameters in a hierarchical model used for identifying skips in menstrual cycle tracking.
sampleStep(
ijDat,
iDat,
rho,
pi,
Xi,
Zi,
Beta,
Gamma,
priorAlphas,
indFirst,
rhoBeta,
rhoGamma,
phi,
rhoPhi,
fixedSkips
)
ijDat |
A data.frame with individual-observation level parameters: Individual, ys, cijs, muis, tauis. |
iDat |
A data.frame with individual level parameters: Individual, mus, taus, thetas. |
rho |
Updated value of the global parameter rho. |
pi |
Updated value of the global parameter pi. |
Xi |
A matrix (numIndividuals x length(Beta)) of covariates for cycle length mean. Default is a vector of 1's. NOTE THE DIFFERENCE (from skipTrack.MCMC) IN EXPECTED DIMENSION OF X |
Zi |
A matrix (numIndividuals x length(Gamma)) of covariates for cycle length precision. Default is a vector of 1's. NOTE THE DIFFERENCE (from skipTrack.MCMC) IN EXPECTED DIMENSION OF Z |
Beta |
Matrix (1 x length(Beta)) of coefficients for cycle length mean. |
Gamma |
Matrix of (1 x length(Gamma)) coefficients for cycle length precision. |
priorAlphas |
Vector of prior alpha values for updating pi. |
indFirst |
A logical vector indicating the first occurrence of each individual. |
rhoBeta |
Updated value of the global parameter rhoBeta. |
rhoGamma |
Value of the proposal parameter rhoGamma. |
phi |
Value of the parameter phi. |
rhoPhi |
Value of the proposal parameter rhoPhi. |
fixedSkips |
Logical. If TRUE cycle skip information (cijs) is not updated in sample steps and the inputs are instead assumed to be true. |
A list containing updated parameters after performing a single MCMC step. The list includes:
A data.frame with updated parameters at the individual-observation level: Individual, ys, cijs, muis, tauis.
A data.frame with updated parameters at the individual level: Individual, mus, taus, thetas.
Updated value of the global parameter rho.
Updated value of the global parameter pi.
Matrix of covariates for cycle length mean.
Matrix of covariates for cycle length precision.
Updated matrix of coefficients for cycle length mean.
Updated matrix of coefficients for cycle length precision.
Vector of prior alpha values for updating pi.
A logical vector indicating the first occurrence of each individual.
Hyperprior parameter rhoBeta, used to update Beta.
Value of the proposal parameter rhoGamma.
Updated value of the parameter phi.
Value of the proposal parameter rhoPhi.
Logical. Indicates if skips were fixed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.