| Title: | Measurement Error Models for Morphometric Data |
|---|---|
| Description: | Morphometric data collected on animal populations can be subject to measurement error, which leads to biased estimators using line-fitting techniques such as linear regression and reduced major axis. The models implemented in this package were described by Stevenson, Smit, and Setyawan (2026) <DOI:10.1214/26-AOAS2164>. They explicitly accommodate measurement error, allow for multivariate data, estimate relationships between dimensions, allow missing data, and provide tests for isometric relationships between dimensions. Morphometric data of the reef manta ray, collected in Raja Ampat, Indonesia, are included. |
| Authors: | Ben C. Stevenson [aut, cre, cph], Elizabeth Smit [aut] |
| Maintainer: | Ben C. Stevenson <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-09-30 10:28:33 UTC |
| Source: | https://github.com/elismit01/morpherr |
Simulates bootstrap resamples and re-fits the original morphometric model
to each one. The resulting object can be used as an argument for
summary.lme.morph() and plot.lme.morph() to provide standard errors,
confidence intervals, and p-values based on bootstrapping rather than
asymptotic approximations.
boot.morph(object, B = 1000, control = NULL, progressbar = TRUE, n.cores = 1)boot.morph(object, B = 1000, control = NULL, progressbar = TRUE, n.cores = 1)
object |
An object of class |
B |
An integer, providing the number of bootstrap resamples. |
control |
A list of control values for the estimation
algorithm to replace the default values returned by the
function |
progressbar |
Logical. If |
n.cores |
Integer. The number of cores for parallel processing. |
The original object, with additional bootstrapping
information that can be used by summary.lme.morph() and
plot.lme.morph()
## Fitting model to manta ray data. fit <- fit.morph(manta) ## Carrying out a parametric bootstrap. fit.boot <- boot.morph(fit, B = 100) ## Standard errors based on a bootstrap will be a little different ## to those based on asymptotic approximations. summary(fit) summary(fit.boot)## Fitting model to manta ray data. fit <- fit.morph(manta) ## Carrying out a parametric bootstrap. fit.boot <- boot.morph(fit, B = 100) ## Standard errors based on a bootstrap will be a little different ## to those based on asymptotic approximations. summary(fit) summary(fit.boot)
Extracts results from each model fitted in a simulation study
conducted using sim.morph().
extract.sim.morph(sim.res, FUN = summary, n.cores = 1)extract.sim.morph(sim.res, FUN = summary, n.cores = 1)
sim.res |
An object of class |
FUN |
A function to apply to each model fit. Defaults to
|
n.cores |
Integer. The number of cores for parallel processing. |
An array containing the results of applying FUN to each model fit.
## Running a small simulation study. sim.fits <- sim.morph(n.sims = 5, n.animals = 10, n.photos = 3, mus = c(315, 150, 100), sigmas = c(25, 15, 10), rhos = c(0.85, 0.80, 0.75), psis = c(10, 6, 4), phis = c(0.5, 0.4, 0.3), method = "REML", progressbar = FALSE, n.cores = 1) ## Extracting p-values from tests for isometry from each model ## fit. iso.p <- function(x) summary(x, type = "isometric-pca")[, 3] extract.sim.morph(sim.fits, FUN = iso.p)## Running a small simulation study. sim.fits <- sim.morph(n.sims = 5, n.animals = 10, n.photos = 3, mus = c(315, 150, 100), sigmas = c(25, 15, 10), rhos = c(0.85, 0.80, 0.75), psis = c(10, 6, 4), phis = c(0.5, 0.4, 0.3), method = "REML", progressbar = FALSE, n.cores = 1) ## Extracting p-values from tests for isometry from each model ## fit. iso.p <- function(x) summary(x, type = "isometric-pca")[, 3] extract.sim.morph(sim.fits, FUN = iso.p)
Fits the model described by Stevenson, Smit, and Setyawan (2026) to morphometric data.
fit.morph( data, log.transform = FALSE, method = "REML", control = list(maxIter = 1e+05, msMaxIter = 1e+05) )fit.morph( data, log.transform = FALSE, method = "REML", control = list(maxIter = 1e+05, msMaxIter = 1e+05) )
data |
A data frame containing the morphometric data. See the section below on the correct formatting of this argument. |
log.transform |
Logical. If |
method |
A character string indicating the objective function
used to fit the model. Either |
control |
A list of control values for the estimation
algorithm to replace the default values returned by the
function |
This is a special case of a linear mixed-effects model, and is
fitted via a call to nlme::lme(). Some arguments of
fit.morph() are directly passed to nlme::lme().
An object of classes lme.morph (specific to this package)
and lme (inherited from nlme::lme()). The object is the
list returned by nlme::lme() with a couple of additional
components.
Rather than inspecting the object directly, the best way to extract
understandable output from the object is using the S3 methods
summary.lme.morph(), plot.lme.morph(), and
predict.lme.morph() via the generic functions summary(),
plot(), and predict(). Other S3 methods for the lme class are
availble via nlme, such as nlme::coef.lme().
To fit a model to log-transformed measurement data, provide the
untransformed measurements in the data argument and specify
log.transform = TRUE. This will allow the S3 method
plot.lme.morph() to plot the original data with
back-transformed estimates, and the S3 method
summary.lme.morph() to carry out the correct test for isometric
growth.
data argumentThe manta object is an example of a correctly formatted
data argument. It must be a data frame with the following
columns:
animal.idAn individual identification number. Rows
with the same animal.id correspond to
measurements of the saime individual manta ray.
photo.idA photo identification number. Rows with
the same photo.id correspond to
measurements taken from the same image.
photo.idAn integer indicating the dimension the measurement is for.
measurementThe corresponding measurement.
Stevenson, B. C., Smit, E., and Setyawan, E. (2026) Measurement error models for morphometric data. Annals of Applied Statistics, 20: 945–962.
## Fitting model to manta ray data. fit <- fit.morph(manta) ## Using maximum likelihood instead of REML. fit <- fit.morph(manta, method = "ML")## Fitting model to manta ray data. fit <- fit.morph(manta) ## Using maximum likelihood instead of REML. fit <- fit.morph(manta, method = "ML")
Data collected on a drone photogrammetry survey of the reef manta ray Mobula alfredi in Raja Ampat, Indonesia.
mantamanta
mantaA data frame with four columns:
animal.idAn individual identification number. Rows
with the same animal.id correspond to
measurements of the same individual manta ray.
photo.idA photo identification number. Rows with
the same photo.id correspond to
measurements taken from the same image.
dimAn integer indicating the dimension the
measurement is for. Here, 1 is for disc width,
2 is for disc length, and 3 is for
cranial width.
measurementThe observed measurement value in centimetres.
An S3 method that plots morphometric data, estimated relationships
between dimensions, or both, from a fitted model object returned by
fit.morph().
## S3 method for class 'lme.morph' plot( x, dims = c(1, 2), type = "data", line.type = "lm", confints = !add, add = FALSE, reverse.axes = FALSE, plot.data = TRUE, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL, ... )## S3 method for class 'lme.morph' plot( x, dims = c(1, 2), type = "data", line.type = "lm", confints = !add, add = FALSE, reverse.axes = FALSE, plot.data = TRUE, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL, ... )
x |
An object of class |
dims |
An integer vector of length two, indicating which dimensions will appear on the x- and y-axes, respectively. |
type |
A character string specifying the plot type. If
|
line.type |
A character string specifying the type of fitted
line to overlay. If |
confints |
Logical. If |
add |
Logical. If |
reverse.axes |
Logical. If |
plot.data |
Logical. If |
xlim, ylim
|
Limits for the axes. |
xlab, ylab
|
Titles for the axes. |
... |
Additional arguments passed to |
No return value. Called to produce a plot.
## Fitting model to manta ray data. fit <- fit.morph(manta) ## Plotting dimensions 1 and 2 with a fitted linear regression ## line. plot(fit) ## Same again, but plotting the reduced major axis (or principal ## component axis) for dimensions 1 and 3. plot(fit, dims = c(1, 3), line.type = "pca") ## A plot showing how the ratio between dimensions 2 and 3 changes ## with the size of dimension 3. Because the line is quite flat, ## it's plausible the relationship is isometric. plot(fit, dims = c(3, 2), type = "ratio", line.type = "pca") ## On the other hand, the relationship between dimensions 1 and 2 ## is clearly allometric. plot(fit, dims = c(3, 1), type = "ratio", line.type = "pca")## Fitting model to manta ray data. fit <- fit.morph(manta) ## Plotting dimensions 1 and 2 with a fitted linear regression ## line. plot(fit) ## Same again, but plotting the reduced major axis (or principal ## component axis) for dimensions 1 and 3. plot(fit, dims = c(1, 3), line.type = "pca") ## A plot showing how the ratio between dimensions 2 and 3 changes ## with the size of dimension 3. Because the line is quite flat, ## it's plausible the relationship is isometric. plot(fit, dims = c(3, 2), type = "ratio", line.type = "pca") ## On the other hand, the relationship between dimensions 1 and 2 ## is clearly allometric. plot(fit, dims = c(3, 1), type = "ratio", line.type = "pca")
Creates scatter plots of morphometric measurements, with options for different dimension combinations and plotting of ratios.
plotmorph( data, dims = c(1, 2), plot.data = TRUE, ratios = FALSE, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL )plotmorph( data, dims = c(1, 2), plot.data = TRUE, ratios = FALSE, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL )
data |
A data frame containing the morphometric data. See the section below on the correct formatting of this argument. |
dims |
An integer vector of length two, indicating which dimensions will appear on the x- and y-axes, respectively. |
plot.data |
Logical. If |
ratios |
Logical. If |
xlim, ylim
|
Limits for the axes. |
xlab, ylab
|
Titles for the axes. |
No return value. Called to produce a plot.
data argumentThe manta object is an example of a correctly formatted
data argument. It must be a data frame with the following
columns:
animal.idAn individual identification number. Rows
with the same animal.id correspond to
measurements of the saime individual manta ray.
photo.idA photo identification number. Rows with
the same photo.id correspond to
measurements taken from the same image.
photo.idAn integer indicating the dimension the measurement is for.
measurementThe corresponding measurement.
## Plotting dimensions 1 and 2. plotmorph(manta) ## Plotting dimensions 1 and 3. plotmorph(manta, dims = c(1, 3)) ## Plotting the ratio of dimension 2 divided by dimension 1 on the ## y-axis. plotmorph(manta, dims = c(1, 2), ratios = TRUE)## Plotting dimensions 1 and 2. plotmorph(manta) ## Plotting dimensions 1 and 3. plotmorph(manta, dims = c(1, 3)) ## Plotting the ratio of dimension 2 divided by dimension 1 on the ## y-axis. plotmorph(manta, dims = c(1, 2), ratios = TRUE)
Calculates model predictions for the true size of a dimension based on true values for any subset of the remaining dimensions. Predictions for multiple individuals are available from a single call to the function.
## S3 method for class 'lme.morph' predict(object, y.dim, newdata = NULL, type = c("lm", "pca"), ...)## S3 method for class 'lme.morph' predict(object, y.dim, newdata = NULL, type = c("lm", "pca"), ...)
object |
An object of class |
y.dim |
Integer specifying which dimension to predict |
newdata |
A data frame of other dimensions to use for prediction. Column names must be of the form "dimX" where X is the dimension number. |
type |
Either |
... |
Additional arguments passed to methods |
This function computes estimated coefficients for the
appropriate linear function (as per summary.lme.morph()
with type = "betas-lm" or type = "betas-pca"), and then
evaluates the function for the provided newdata. For type = "pca", only a single column can be provided in newdata.
A matrix with estimated true sizes and standard errors. Note that these are standard errors, not prediction errors.
morphErr
There are three key differences between predict.lme.morph() and predictblup().
predict.lme.morph() only generates estimates for one
dimension based on true values for other dimensions, whereas
predictblup() can generate estimates from true values, observed
values (i.e., subject to measurement error), or a combination of
both.
predict.lme.morph() can generate estimates for multiple
individuals, whereas predictblup() only provides estimates for
a single individual.
predict.lme.morph() provides standard errors, but
predictblup() does not.
## Fitting model to manta ray data. fit <- fit.morph(manta) ## Predicting dimension 2 for a single individual with a true value ## of 90 for dimension 3. predict(fit, y.dim = 2, newdata = data.frame(dim3 = 90)) ## Predicting dimension 1 from dimensions 2 and 3 for two ## individuals, one with true values of 130 and 60 for dimensions 2 ## and 3, respectively, and one with true values of 140 and 70. predict(fit, y.dim = 1, newdata = data.frame(dim2 = c(130, 140), dim3 = c(60, 70)))## Fitting model to manta ray data. fit <- fit.morph(manta) ## Predicting dimension 2 for a single individual with a true value ## of 90 for dimension 3. predict(fit, y.dim = 2, newdata = data.frame(dim3 = 90)) ## Predicting dimension 1 from dimensions 2 and 3 for two ## individuals, one with true values of 130 and 60 for dimensions 2 ## and 3, respectively, and one with true values of 140 and 70. predict(fit, y.dim = 1, newdata = data.frame(dim2 = c(130, 140), dim3 = c(60, 70)))
Makes predictions for a single individual using the best linear unbiased predictor (BLUP).
predictblup(object, true = NULL, obs = NULL)predictblup(object, true = NULL, obs = NULL)
object |
An object of class |
true |
A vector of true dimension measurements, if
available. Use |
obs |
A matrix of measurements observed with error, where each
row represents measurements from one photograph. Use |
This function uses a BLUP to compute estimated true values for a single individual. A BLUP is computed by finding the mode of the multivariate probability density function of the true values, conditional on any provided values for true dimension sizes, dimension measurements observed with error, or a combination of both.
A numeric vector of predictions for all dimensions.
morphErr
There are three key differences between predict.lme.morph() and predictblup().
predict.lme.morph() only generates estimates for one
dimension based on true values for other dimensions, whereas
predictblup() can generate estimates from true values, observed
values (i.e., subject to measurement error), or a combination of
both.
predict.lme.morph() can generate estimates for multiple
individuals, whereas predictblup() only provides estimates for
a single individual.
predict.lme.morph() provides standard errors, but
predictblup() does not.
## Fitting model to manta ray data. fit <- fit.morph(manta) ## Estimates for the true dimension sizes of an individual with a ## known true value for dimension 2 of 130, and observed ## measurements subject to error from two photographs. The first ## photograph has # observed measurements of 300 and 135 for ## dimensions 1 and 2, respectively, while the second photograph ## has observed # measurements of 290 and 140, respectively. ## Dimension 3 is not observed in any photograph. predictblup(fit, true = c(NA, 130, NA), obs = rbind(c(300, 135, NA), c(290, 140, NA)))## Fitting model to manta ray data. fit <- fit.morph(manta) ## Estimates for the true dimension sizes of an individual with a ## known true value for dimension 2 of 130, and observed ## measurements subject to error from two photographs. The first ## photograph has # observed measurements of 300 and 135 for ## dimensions 1 and 2, respectively, while the second photograph ## has observed # measurements of 290 and 140, respectively. ## Dimension 3 is not observed in any photograph. predictblup(fit, true = c(NA, 130, NA), obs = rbind(c(300, 135, NA), c(290, 140, NA)))
Simulates morphometric data from a photogrammetry survey, with observations subject to measurement error, under the model described by Stevenson, Smit, and Setyawan (2026).
sim.measurements( n.animals = NULL, n.photos = NULL, data = NULL, mus, sigmas, rhos, psis, phis, log.transform = FALSE )sim.measurements( n.animals = NULL, n.photos = NULL, data = NULL, mus, sigmas, rhos, psis, phis, log.transform = FALSE )
n.animals |
Integer. The number of animals in the sample. |
n.photos |
Integer vector. If there are |
data |
A data frame with columns |
mus |
A vector with an element for each dimension, providing the means of the true dimension sizes in the population. |
sigmas |
A vector with an element for each dimension, providing the standard deviations for true dimension sizes in the population. |
rhos |
A vector, with one element for each pair of dimensions, providing the pairwise correlations between true dimension sizes in the population. See 'Details' for the correct order for the correlations. |
psis |
A vector with an element for each dimension, providing the standard deviations of measurement errors for the dimensions. |
phis |
A vector, with one element for each pair of dimensions, providing the pairwise correlations between measurement errors for the dimensions. See 'Details' for the correct order for the correlations. |
log.transform |
Logical. If |
For arguments rhos and phis, the elements must be
ordered so that all correlations involving
dimension 1 appear first in ascending numerical order, followed
by all remaining correlations involving dimension
2, and so on, where eqn{m} is the number of dimensions.
For example, if , then the first three elements are the
correlations between dimension 1 and dimensions 2, 3, and 4,
respectively. The following two elements are correlations between
dimension 2 and dimensions 3 and 4, respectively. The final element
is the correlation between dimension 3 and 4.
A data frame with four columns:
animal.idAn individual identification number. Rows
with the same animal.id correspond to
measurements of the same individual.
photo.idA photo identification number. Rows with
the same photo.id correspond to
measurements taken from the same image.
dimAn integer indicating the dimension the measurement is for.
measurementThe observed measurement value.
Stevenson, B. C., Smit, E., and Setyawan, E. (2026) Measurement error models for morphometric data. Annals of Applied Statistics, 20: 945–962.
sim.morph() to conduct a simulation study by
simulating multiple data sets and fitting a model to each one.
## Simulating data for ten animals, with two photos each, measuring ## three dimensions. sim.data <- sim.measurements(n.animals = 10, n.photos = 2, mus = c(315, 150, 100), sigmas = c(25, 15, 10), rhos = c(0.85, 0.80, 0.75), psis = c(10, 6, 4), phis = c(0.5, 0.4, 0.3)) head(sim.data) ## Simulating data for two animals, with different numbers of ## photos for each, and different measurements available from ## different photos. data <- data.frame(animal.id = c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2), photo.id = c(1, 1, 2, 2, 2, 1, 2, 3, 3, 4, 4), dim = c(1, 3, 1, 2, 3, 1, 1, 1, 3, 2, 3)) sim.data <- sim.measurements(data = data, mus = c(315, 150, 100), sigmas = c(25, 15, 10), rhos = c(0.85, 0.80, 0.75), psis = c(10, 6, 4), phis = c(0.5, 0.4, 0.3)) sim.data## Simulating data for ten animals, with two photos each, measuring ## three dimensions. sim.data <- sim.measurements(n.animals = 10, n.photos = 2, mus = c(315, 150, 100), sigmas = c(25, 15, 10), rhos = c(0.85, 0.80, 0.75), psis = c(10, 6, 4), phis = c(0.5, 0.4, 0.3)) head(sim.data) ## Simulating data for two animals, with different numbers of ## photos for each, and different measurements available from ## different photos. data <- data.frame(animal.id = c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2), photo.id = c(1, 1, 2, 2, 2, 1, 2, 3, 3, 4, 4), dim = c(1, 3, 1, 2, 3, 1, 1, 1, 3, 2, 3)) sim.data <- sim.measurements(data = data, mus = c(315, 150, 100), sigmas = c(25, 15, 10), rhos = c(0.85, 0.80, 0.75), psis = c(10, 6, 4), phis = c(0.5, 0.4, 0.3)) sim.data
Simulates multiple datasets and fits a model to each one.
sim.morph( n.sims, n.animals = NULL, n.photos = NULL, data = NULL, mus, sigmas, rhos, psis, phis, log.transform = FALSE, method = "REML", control = list(maxIter = 1e+05, msMaxIter = 1e+05), progressbar = TRUE, n.cores = 1 )sim.morph( n.sims, n.animals = NULL, n.photos = NULL, data = NULL, mus, sigmas, rhos, psis, phis, log.transform = FALSE, method = "REML", control = list(maxIter = 1e+05, msMaxIter = 1e+05), progressbar = TRUE, n.cores = 1 )
n.sims |
Integer. The number of data sets to simulate. |
n.animals |
Integer. The number of animals in the sample. |
n.photos |
Integer vector. If there are |
data |
A data frame with columns |
mus |
A vector with an element for each dimension, providing the means of the true dimension sizes in the population. |
sigmas |
A vector with an element for each dimension, providing the standard deviations for true dimension sizes in the population. |
rhos |
A vector, with one element for each pair of dimensions, providing the pairwise correlations between true dimension sizes in the population. See 'Details' for the correct order for the correlations. |
psis |
A vector with an element for each dimension, providing the standard deviations of measurement errors for the dimensions. |
phis |
A vector, with one element for each pair of dimensions, providing the pairwise correlations between measurement errors for the dimensions. See 'Details' for the correct order for the correlations. |
log.transform |
Logical. If |
method |
A character string indicating the objective function
used to fit the model. Either |
control |
A list of control values for the estimation
algorithm to replace the default values returned by the
function |
progressbar |
Logical. If |
n.cores |
Integer. The number of cores for parallel processing. |
An object of class lme.morph.sim. The best way to extract
results from this object is to use extract.sim.morph(). See
the example below.
extract.sim.morph() to extract results from the object
returned by this function.
## Running a small simulation study. sim.fits <- sim.morph(n.sims = 5, n.animals = 10, n.photos = 3, mus = c(315, 150, 100), sigmas = c(25, 15, 10), rhos = c(0.85, 0.80, 0.75), psis = c(10, 6, 4), phis = c(0.5, 0.4, 0.3), method = "REML", progressbar = FALSE, n.cores = 1) ## Extracting p-values from tests for isometry from each model ## fit. iso.p <- function(x) summary(x, type = "isometric-pca")[, 3] extract.sim.morph(sim.fits, FUN = iso.p)## Running a small simulation study. sim.fits <- sim.morph(n.sims = 5, n.animals = 10, n.photos = 3, mus = c(315, 150, 100), sigmas = c(25, 15, 10), rhos = c(0.85, 0.80, 0.75), psis = c(10, 6, 4), phis = c(0.5, 0.4, 0.3), method = "REML", progressbar = FALSE, n.cores = 1) ## Extracting p-values from tests for isometry from each model ## fit. iso.p <- function(x) summary(x, type = "isometric-pca")[, 3] extract.sim.morph(sim.fits, FUN = iso.p)
An S3 method that creates summaries of fitted morphometric models. This function can provide different types of summaries including parameter estimates, beta coefficients, and tests for isometry.
## S3 method for class 'lme.morph' summary(object, ..., type = "pars", y.dim, x.dim, level = 0.95)## S3 method for class 'lme.morph' summary(object, ..., type = "pars", y.dim, x.dim, level = 0.95)
object |
An object of class |
... |
Other parameters (for S3 generic compatibility). |
type |
A character string specifying type of summary. Either
|
y.dim |
An integer specifying the response dimension for when
|
x.dim |
An integer vector specifying the explanatory
dimensions for when |
level |
The confidence level for any interval estimates. |
The following summaries are available with this method,
controlled by the type argument:
type = "pars"Estimates and standard errors for the model parameters, including
the vectors for the means of the true dimension sizes,
for the standard deviations for true dimension sizes,
for the correlations between true dimension sizes,
for the standard deviations in measurement errors for
the dimensions, and for the correlations between
measurement errors for all pairs of dimensions.
type = "betas" or type = "betas-lm"
Estimates and standard errors for coefficients of a linear
combination that provides the expected value of one dimension
(specified by y.dim) using any subset of the remaining dimensions
(specified in the vector x.dim).
type = "betas-pca"An estimated intercept and slope for the reduced major axis (or
principal component axis) summarising the relationship between the
true values of dimensions specified by y.dim and x.dim.
type = "isometric-pca"Results for tests of the null hypotheses of isometric relationships between all pairs of dimensions. The p-values are obtained using normal approximations for the test statistics.
For models with log.transform = FALSE, the test statistic to test
for isometric growth between dimensions and is
, which is equal to
under the null hypothesis.
For models with log.transform = TRUE, the test statistic is the
slope for the reduced major axis (or principal component axis)
summarising the relationship between the two dimensions, which is
equal to under the null hypothesis.
A matrix or data frame containing the requested summary.
## Fitting model to manta ray data. fit <- fit.morph(manta) ## Parameter estimates and standard errors. summary(fit) ## Estimated coefficients for the linear combination that provides ## the expected value of the first dimension from only the second. summary(fit, type = "betas-lm", y.dim = 1, x.dim = 2) ## Estimated coefficients for the linear combination that provides ## the expected value of the second dimension from both the first ## and third. summary(fit, type = "betas-lm", y.dim = 2, x.dim = c(1, 3)) ## Estimated intercept and slope for the reduced major axis (or ## pricipal component axis) summarising the relationship between ## the first and second dimensions. summary(fit, type = "betas-pca", y.dim = 1, x.dim = 2) ## Tests for isometry between all pairs of dimensions. summary(fit, type = "isometric-pca")## Fitting model to manta ray data. fit <- fit.morph(manta) ## Parameter estimates and standard errors. summary(fit) ## Estimated coefficients for the linear combination that provides ## the expected value of the first dimension from only the second. summary(fit, type = "betas-lm", y.dim = 1, x.dim = 2) ## Estimated coefficients for the linear combination that provides ## the expected value of the second dimension from both the first ## and third. summary(fit, type = "betas-lm", y.dim = 2, x.dim = c(1, 3)) ## Estimated intercept and slope for the reduced major axis (or ## pricipal component axis) summarising the relationship between ## the first and second dimensions. summary(fit, type = "betas-pca", y.dim = 1, x.dim = 2) ## Tests for isometry between all pairs of dimensions. summary(fit, type = "isometric-pca")
An S3 method for extracting both parameter estimates and their variance-covariance matrix from a fitted morphometric model.
## S3 method for class 'lme.morph' vcov(object, ...)## S3 method for class 'lme.morph' vcov(object, ...)
object |
A fitted model of class "lme.morph" |
... |
Other parameters (for S3 generic compatibility). |
A list containing:
est |
Named vector of parameter estimates |
varcov |
Variance-covariance matrix |
## Fitting model to manta ray data. fit <- fit.morph(manta) ## Extracting variance-covariance matrix. vcov(fit)## Fitting model to manta ray data. fit <- fit.morph(manta) ## Extracting variance-covariance matrix. vcov(fit)