predictblup: Predict from Observed Measurements

View source: R/predict.R

predictblupR Documentation

Predict from Observed Measurements

Description

Makes predictions for a single individual using the best linear unbiased predictor (BLUP).

Usage

predictblup(object, true = NULL, obs = NULL)

Arguments

object

An object of class lme.morph, returned by fit.morph().

true

A vector of true dimension measurements, if available. Use NA for dimensions with unknown true measurements.

obs

A matrix of measurements observed with error, where each row represents measurements from one photograph. Use NA for dimensions with measurements that were not taken from a photo.

Details

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.

Value

A numeric vector of predictions for all dimensions.

Prediction functions in 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.

See Also

predict.lme.morph()

Examples

## 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)))


morphErr documentation built on Aug. 30, 2026, 5:06 p.m.