Learn R Programming

PAS (version 1.2.5)

binmod.predict: predict

Description

Extract predicted genomic breeding values from the 10-fold cross-validation result that has been saved in a binmod object, or predict the breeding values for a new sample.

Usage

# S3 method for binmod
predict(object, newx=NULL, ...)

Arguments

object

An object generated by the binnod function.

newx

The numeric genotype indicator matrix of a new sample, which need to be coded in the same way as the genotypicdata generating the binmod object.

...

Further parameters may also be supplied as arguments.

Examples

Run this code
# NOT RUN {
#load PAS library
library(PAS)
#load the demo data
data(beef)
#conduct bin model analysis.
binmod.result=binmod(x, y, map)
#generate a new sample by sampling 20 individuals from the demo data
x0=x[sample(1:NROW(x) , 20), ]
#predict the genomic values of the new sample.
predict(binmod.result, newx=x0)
# }

Run the code above in your browser using DataLab