Learn R Programming

selection.index (version 2.0.0)

predict_selection_score: Predict selection index scores

Description

Predict selection index scores

Usage

predict_selection_score(index_df, data, genotypes)

Value

Data frame of selection index scores by genotype

Arguments

index_df

Data frame returned by lpsi()

data

Raw phenotypic data matrix/data frame (observations x traits)

genotypes

Vector of genotype/treatment labels for each observation

Examples

Run this code
gmat <- gen_varcov(seldata[, 3:9], seldata[, 2], seldata[, 1])
pmat <- phen_varcov(seldata[, 3:9], seldata[, 2], seldata[, 1])
cindex <- lpsi(ncomb = 1, pmat = pmat, gmat = gmat, wmat = weight[, -1], wcol = 1)
predict_selection_score(cindex, data = seldata[, 3:9], genotypes = seldata[, 2])

Run the code above in your browser using DataLab