ResSel: Selection on Residuals

View source: R/ResSel.R

ResSelR Documentation

Selection on Residuals

Description

This function takes measurements of multiple traits and performs a linear regression and identifies those records with the largest and smallest residual. Originally it was written to perform a regression of horn size on body size allowing for high and low selection lines.

Usage

ResSel(data, traits, percent = 10, identifier = 1, model = "linear")

Arguments

data

this is a dataframe with subject identifiers and phenotypic trait values

traits

a numeric vector indicating the column containing the predictor and response variables in that order

percent

the percentage of highest and lowest residuals that should be identified

identifier

the column which contains the record numbers to identify individuals

model

currently this is not used

Value

This function returns a list

high line

the ID numbers for the individuals selected for the high line

low line

the ID numbers of the individuals selected for the low line

Author(s)

Heath Blackmon

References

http://coleoguy.github.io/

Examples

data <- read.csv(file = system.file("horn.beetle.csv", package = "evobiR"))
ResSel(data = data, traits = c(2,3), percent = 15, identifier = 1, model = "linear")

coleoguy/evobir documentation built on July 27, 2023, 12:40 p.m.