predict.binmod: predict

Description Usage Arguments Examples

View source: R/binmod.R

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

1
2
## S3 method for class '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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#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)

PAS documentation built on May 2, 2019, 11:11 a.m.