pkgdown/includes/in_header.html

Skip to contents

Predict selection index scores

Usage

predict_selection_score(index_df, data, genotypes)

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

Value

Data frame of selection index scores by genotype

Examples

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])
#>    Genotypes      I_1 I_1_Rank      I_2 I_2_Rank      I_3 I_3_Rank      I_4
#> 1         G1 3.456263       19 10.24955     24.0 4.539159        1 1.491622
#> 2         G2 4.224499       13 10.38266     16.0 4.003627        4 1.582573
#> 3         G3 2.875212       23 10.78199      6.0 2.885280       22 1.115753
#> 4         G4 4.425748        9 10.58233      9.0 3.791595        8 1.494010
#> 5         G5 4.429979        8 10.51578     11.0 3.794073        7 1.540463
#> 6         G6 3.876003       17 10.31611     20.5 3.072927       18 1.278441
#> 7         G7 3.095577       22 10.31611     20.5 3.242285       16 1.188075
#> 8         G8 3.491337       18 10.98166      4.0 3.630514       12 1.404757
#> 9         G9 5.418307        1 10.31611     17.0 3.366143       15 1.794447
#> 10       G10 2.431071       25 10.51578     11.0 2.891178       21 1.370714
#> 11       G11 4.468465        7 10.71544      7.0 3.214727       17 1.536046
#> 12       G12 4.172392       14 10.31611     20.5 2.584034       23 1.681126
#> 13       G13 4.280248       11 10.38267     15.0 2.962747       19 1.577450
#> 14       G14 5.155877        2 10.31611     20.5 3.878331        5 1.916752
#> 15       G15 2.710617       24 10.64889      8.0 1.941247       25 1.790706
#> 16       G16 4.163949       15 10.44923     13.5 4.114500        3 1.534393
#> 17       G17 4.406126       10 10.44923     13.5 3.717250       10 1.429515
#> 18       G18 3.948932       16 10.31611     20.5 3.705999       11 1.804663
#> 19       G19 4.921996        4 11.18133      2.0 3.747533        9 1.158209
#> 20       G20 4.829214        5 10.11645     25.0 2.450609       24 1.905515
#> 21       G21 4.937996        3 10.98167      3.0 3.472159       13 1.438559
#> 22       G22 4.823550        6 11.78033      1.0 4.212883        2 1.327702
#> 23       G23 3.328132       21 10.51578     11.0 3.447427       14 1.264469
#> 24       G24 3.453568       20 10.31611     20.5 2.940741       20 1.072726
#> 25       G25 4.245742       12 10.84856      5.0 3.827380        6 1.043280
#>    I_4_Rank      I_5 I_5_Rank      I_6 I_6_Rank      I_7 I_7_Rank
#> 1        13 2.425143       10 4.018543       24 1.279820       15
#> 2         7 3.137633        1 4.314709       19 1.133963       24
#> 3        23 1.681191       24 4.623779        9 1.322424       12
#> 4        12 2.886623        3 4.692408        6 1.226627       17
#> 5         9 2.873967        4 4.472748       11 1.224183       18
#> 6        19 2.100105       14 4.792693        3 1.571220        8
#> 7        21 1.880386       19 4.293589       21 1.270798       16
#> 8        16 2.432325        9 4.180110       23 1.072249       25
#> 9         4 2.350293       11 4.409919       15 1.779793        1
#> 10       17 1.842155       22 3.817587       25 1.168735       22
#> 11       10 2.040485       16 4.603191       10 1.741888        3
#> 12        6 1.879490       20 4.430459       14 1.657243        5
#> 13        8 2.000945       18 4.376523       17 1.578488        7
#> 14        1 2.664352        7 4.465015       12 1.390967       10
#> 15        5 1.734347       23 4.249222       22 1.136030       23
#> 16       11 2.996593        2 4.378360       16 1.284456       14
#> 17       15 2.841061        5 4.345350       18 1.219923       19
#> 18        3 2.700421        6 4.303110       20 1.209523       20
#> 19       22 2.101719       13 5.091759        1 1.705988        4
#> 20        2 2.220664       12 5.015204        2 1.771962        2
#> 21       14 2.567523        8 4.663748        8 1.388523       11
#> 22       18 2.010891       17 4.735373        5 1.565080        9
#> 23       20 1.867931       21 4.667470        7 1.175126       21
#> 24       24 1.539349       25 4.454528       13 1.302187       13
#> 25       25 2.051917       15 4.767899        4 1.584377        6