MLPE.lmm: Run maximum likelihood population effects mixed effects model...

View source: R/MLPE.R

MLPE.lmmR Documentation

Run maximum likelihood population effects mixed effects model (MLPE)

Description

Runs MLPE as detailed by Clarke et al. (2002). This function will run the model and return lmer object

Usage

MLPE.lmm(resistance, 
                pairwise.genetic, 
                REML = FALSE, 
                ID = NULL, 
                ZZ = NULL,
                scale = TRUE)

Arguments

resistance

Path to pairwise resistance distance matrix (resistances.out) from CS results. Alternatively, provide the pairwise resistances created from optimizing with 'gdistance' (result of Run_gdistance).

pairwise.genetic

Lower half of pairwise genetic distance matrix

REML

Logical. If TRUE, mixed effects model will be fit using restricted maximum likelihood. Default = FALSE

ID

The to_from ID list for the MLPE model. The function will automatically create this object, but it can be specified directly from the output of CS.prep or gdist.prep (Default = NULL)

ZZ

The sparse matrix object for the MLPE model. The function will automatically create this object, but it can be specified directly from the output of CS.prep or gdist.prep (Default = NULL)

scale

Specify whether the pairwise distance values be scaled and centered (Default = TRUE)

Details

An AIC value will only be returned if REML = FALSE

Value

A lmer object from the fitted model

Author(s)

Bill Peterman <Peterman.73@osu.edu>

References

Clarke, R. T., P. Rothery, and A. F. Raybould. 2002. Confidence limits for regression relationships between distance matrices: Estimating gene flow with distance. Journal of Agricultural, Biological, and Environmental Statistics 7:361-372.

Examples

 
## Not run:
## *** TO BE COMPLETED *** ##

## End (Not run)

wpeterman/ResistanceGA documentation built on Nov. 20, 2023, 11:50 p.m.