extract.sim.morph: Extract Results from a Morphometric Simulation Study

View source: R/simulate.R

extract.sim.morphR Documentation

Extract Results from a Morphometric Simulation Study

Description

Extracts results from each model fitted in a simulation study conducted using sim.morph().

Usage

extract.sim.morph(sim.res, FUN = summary, n.cores = 1)

Arguments

sim.res

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

FUN

A function to apply to each model fit. Defaults to summary.lme.morph(), which extracts parameter estimates and standard errors.

n.cores

Integer. The number of cores for parallel processing.

Value

An array containing the results of applying FUN to each model fit.

Examples

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


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