This is the main function for bin model analysis.
binmod(x, y, map, beta0=NA, binsizelist=-1, full.search=FALSE, foldid=NA, ...)
input matrix, of dimensions nobs*nvars; each row is a observation vector of an individual and each column is a genotypic indicator vector for a molecular marker.
a matrix of response variable (phenotypic observations), of dimensions nobs*1.
A data frame for linkage map or physical map.
Estimated SNP effects obtained by univariate analysis. By default, the glm function in R will be called by the binmod to calculate the estimates of effects.
A list of binsizes to be considered in the analysis. A default list will be generated if the option was ignored or an invalid list has been specified.
A logic indicator selecting search strategies. If FALSE was assigned, the binmod will complete the running as soon as the optimal binsize was found. Otherwise, analysis will be conducted for all binsizes on the list.
An optional vector of values between 1 and nfold identifying what fold each observation is in. If not supplied, a random vector is generated under nfold=10.
Other parameters need to be passed to glmnet/r and glm/r.
information of all searched binsizes
a 'data.frame': nbinsizes of 4 variables # A list of mean square errors
size settings of the bins, eight in bp or cM.
mean square error
the standard deviation of MSEs
number of bins under the binsize setting
optimal binsize
order of the optimal binsize in the grid
result obtained under the optimal binsize
phentypic values and its' predicted values under the optimal model.
original phenotypic observations
predictions by 10-fold cross-validation.
estimated bin parameters
bin effect
sum of square of bin indicator
residual error
estimating error of bin effect
Wald-test statistics
LOD-test statistics
indicator matrix of the bins under the optimal binsize
'data.frame': of 5 variables: #bin map
chromosome id
bin position
mean of the orders of markers in the bin
the order the first maker in a bin
the order the last maker in a bin
optimal binsize
cross-validation results
binsize
number of bins under the binsize setting
mean squared error obtained from cross-validation
Pearson's correlation coefficient obtained from cross-validation
SNP information
linkage map or physical map
chromosome id
marker position
marker order
single marker analysis result
SNP effect
sum of square of genotypic indicator
residual variance
estimating error of marker effect
Wald-test statistics
LOD test statistics
a brief summary of the map
chromosome id
the position of the first marker on the chromosome
the position of the last marker on the chromosome
length of the chromosome
number of markers on the chromosome
average interval of the chromosome
the smallest interval size on the chromosome
A cv.glmnet project. See manual of glmnet for details.
The function invokes binmod analysis for genomic value prediction. The default settings are strongly suggested for new users.
Zhiqiu Hu, Zhiquan Wang, and Shizhong Xu (2012) An infinitesimal model for quantitative trait genomic value prediction. PloS ONE
# NOT RUN {
#load PAS library
library (PAS)
#load the demo data
data (beef)
#perform binmod analysis under the default settings.
binmod.result=binmod (x , y , map)
#plot binmod result
plot(binmod.result)
str(binmod.result)
#Output the predicted phenotypic values that was obtained
#by 10-fold cross validation .
predict(binmod.result)
#predict the phenotypic values for new individuals
x1=x[sample(1:NROW(x) , 20), ]
bin.pred.x1=predict(binmod.result, newx=x1)
str(bin.pred.x1)
# }
Run the code above in your browser using DataLab