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
n
be the number of objects;k+1
be the number of recorded landmark for each objectp
be the dimension of each landmark (only p=2 or p=3)
The arguments of the functions are
landmarks
: a three-dimensionalArray
of 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
: aDataFrame
of covariates. The formulafm
search for the covariates in theDataFrame
column names;iterations
: aNamedTuple
withiter
,burnin
, andthin
values of the MCMC algorithmbetaprior
: aNormal
distribution that is used as prior for all regressive coefficientssigmaprior
: anInverseWishart
distribution 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