BayesSizeAndShape
Package Features
Function Documentation
BayesSizeAndShape.SizeAndShapeWithReflectionMCMC — FunctionSizeAndShapeWithReflectionMCMC(
landmarks::Array{Float64,3},
fm::FormulaTerm,
covariates::DataFrame,
iterations::NamedTuple{(:iter, :burnin, :thin),Tuple{Int64,Int64,Int64}},
betaprior::ContinuousUnivariateDistribution,
sigmaprior::ContinuousMatrixDistribution
)Posterior samples from the size-and-shape model - in this version, only two-dimensional data with reflection information are allowed.
The functions returns an object of type SizeAndShapeModelOutput.
Arguments
Let
nbe the number of objects;k+1be the number of recorded landmark for each objectpbe the dimension of each landmark (only p=2 or p=3)
The arguments of the functions are
landmarks: a three-dimensionalArrayof dimension $(k+1)\times p \times n$ with the data;fm: aformula, where on the left-hand side there must be 1 and on the right-hand side there is the actual regressive formula - an intercept is needed;covariates: aDataFrameof covariates. The formulafmsearch for the covariates in theDataFramecolumn names;iterations: aNamedTuplewithiter,burnin, andthinvalues of the MCMC algorithmbetaprior: aNormaldistribution that is used as prior for all regressive coefficientssigmaprior: anInverseWishartdistribution that is used as prior for the covariance matrix.
BayesSizeAndShape.sizeshape_helmertproduct_reflection — Functionsizeshape_helmertproduct_reflection(dataset::Array{Float64,3})The function computes the Size-And-Shape version of the data dataset, with reflection information. The output is computed using the helmert matrix and the SVD trasformation
Posterior Samples
BayesSizeAndShape.posterior_samples_sigma — Functionposterior_samples_sigma(modeloutput::SizeAndShapeModelOutput{KeepReflection,RL,P,DoNotRemoveSize,GramSchmidtMean,<:MCMCNormalDataKeepSize,<:LinearMean,<:MCMCLinearMean,CT,CM,PS}) where {
RL<:RemoveLocation,
CT<:TypeModelCoVariance,
CM<:MCMCTypeModelCoVariance,
PS<:MCMCObjectOUT,
P<:ValueP
}The function extract the posterior sample of the covariance matrix from an object of type SizeAndShapeModelOutput
BayesSizeAndShape.posterior_samples_beta — Functionposterior_samples_beta(modeloutput::SizeAndShapeModelOutput{KeepReflection,RL,P,DoNotRemoveSize,GramSchmidtMean,<:MCMCNormalDataKeepSize,<:LinearMean,<:MCMCLinearMean,CT,CM,PS}) where {
RL<:RemoveLocation,
CT<:TypeModelCoVariance,
CM<:MCMCTypeModelCoVariance,
PS<:MCMCObjectOUT,
P<:ValueP
}The function extract the posterior sample of the regressive coefficients from an object of type SizeAndShapeModelOutput