Type: | Package |
Title: | Various Linear Mixed Model Analyses |
Version: | 2.0.0 |
Author: | Jixiang Wu |
Maintainer: | Jixiang Wu <jixiang.wu@sdstate.edu> |
Description: | This package offers three important components: (1) to construct a use-defined linear mixed model, (2) to employ one of linear mixed model approaches: minimum norm quadratic unbiased estimation (MINQUE) (Rao, 1971) for variance component estimation and random effect prediction; and (3) to employ a jackknife resampling technique to conduct various statistical tests. In addition, this package provides the function for model or data evaluations.This R package offers fast computations for large data sets analyses for various irregular data structures. |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | yes |
RoxygenNote: | 7.0.2 |
NeedsCompilation: | no |
Packaged: | 2019-12-19 20:44:17 UTC; Jixiang.Wu |
Repository: | CRAN |
Date/Publication: | 2019-12-19 22:00:06 UTC |
Various Linear Mixed Model Analyses
Description
This package offers three important components: (1) to construct a use-defined linear mixed model, (2) to employ one of linear mixed model approaches: minimum norm quadratic unbiased estimation (MINQUE) (Rao, 1971) for variance component estimation and random effect prediction;(3) to employ a jackknife resampling technique to conduct various statistical tests; and (4) to conduct various model evaluations. This R package offers fast computations for large data sets analyses for various irregular data structures.
Details
Package: | minque |
Type: | Package |
Version: | 2.0 |
Date: | 2019-12-18 |
License: | GPL-3 |
An overview of how to use the package, including the most important functions
Author(s)
Jixiang Wu, Associate Professor of Quantitative Genetics/Biostatistics, \Jixiang Wu <jixiang.wu@sdstate.edu>
References
Miller, R. G. 1974. The jackknife - a review. Biometrika, 61:1- 15.
Patterson, H. D. and Thompson, R. 1971. Recovery of inter-block information when block sizes are unequal. Biometrika, 58: 545-554.
Rao, C.R. 1971. Estimation of variance and covariance components-MINQUE theory. J Multiva Ana 1:19
Rao, C. R. and Kleffe, J. 1980. Estimation of variance components. In Handbook of Statistics. Vol. l: 1-40. Krishnaiah, P. R. ed. New York. North-Holland.
Searle, S. R., Casella, G. and McCulloch, C. E. 1992. Variance Components. John Wiley & Sons, Inc. New York.
Wu J (2012) GenMod: An R package for various agricultural data analyses. ASA, CSSA, and SSSA 2012 International Annual Meetings, Cincinnati, OH, p 127
Wu J., Bondalapati K., Glover K., Berzonsky W., Jenkins J.N., McCarty J.C. 2013. Genetic analysis without replications: model evaluation and application in spring wheat. Euphytica. 190:447-458
Zhu J. 1989. Estimation of Genetic Variance Components in the General Mixed Model. Ph.D. Dissertation, NC State University, Raleigh, U.S.A
Zhu J. 1993. Methods of predicting genotype value and heterosis for offspring of hybrids. (Chinese). Journal of Biomathematics, 8(1): 32-44
Cotton boll retention rate data
Description
This data set contains boll retention of 10 cotton plants for 5 genotypes and 13 nodes. This data set can be analyzed in many ways: factorial factor design (genotype and position) or as split-plot design. For example, this data set can be analyzed by user-defined model as shown in the example.
Usage
data(brate)
Format
A data frame with 338 observations on the following 5 variables.
Year
year of 2009
Geno
genotypes from 1 to 5
Pos
plant nodes from 5 to 17
Rep
field blocks from 1 to 4
Brate
mean boll retention for the first position over 10 plants
Details
No other details are needed
Source
No references or URLs available.
References
No reference available
Examples
library(minque)
data(brate)
head(brate)
brate$Geno=factor(brate$Geno)
brate$Pos=factor(brate$Pos)
brate$Rep=factor(brate$Rep)
res=lmm(Brate~1|Geno*Pos+Rep,data=brate)
res$Var
res$FixedEffect
res$RandomEffect
res=lmm.jack(Brate~1|Geno*Pos+Rep,data=brate,JacNum=10,JacRep=1,ALPHA=0.05)
res$Var
res$PVar
res$FixedEffect
res$RandomEffect
## end
Twenty four cotton genotypes with four agronomic traits
Description
Twentype four cotton genotypes were evaluated under two locations at the Mississippi State University Research Farm.
Usage
data(cot)
Format
A data frame with 288 observations on the following 7 variables.
LOC
location
Geno
genotypes
REP
field blocks
BN
Boll number
BS
Boll size
LP
Lint percentage
LY
Lint yield
Details
No other details are needed
Source
Not available
References
To be added
Examples
##Sample R codes used to analyze the data set: cot
library(minque)
data(cot)
names(cot)
cot$Geno=factor(cot$Geno)
cot$Loc=factor(cot$LOC)
cot$Rep=factor(cot$REP)
res=lmm(LY~1|Geno*Loc+Loc:Rep,data=cot)
res$Var
res$FixedEffect
res$RandomEffect
res=lmm.jack(LY~1|Geno*Loc+Loc:Rep,data=cot,JacNum=10,JacRep=1,ALPHA=0.05)
res$Var
res$PVar
res$FixedEffect
res$RandomEffect
##End
An R function for linear mixed model analysis.
Description
An R function for linear mixed model analysis with REML and/or MINQUE approaches
Usage
lmm(formula,data = list(), method = NULL, ALPHA = NULL)
Arguments
formula |
A linear mixed model formula. |
data |
Data frame. It can be default. |
method |
The default linear mixed model approach is MINQUE. Users can choose both or one of two linear mixed model approaches, REML and MINQUE. |
ALPHA |
A preset nominal probability level. |
Details
No data frame is needed when more than one response variables are analyzed
Value
Return list of simulated results for variance components
Author(s)
Jixiang Wu <jixiang.wu@sdstate.edu>
References
Miller, R. G. 1974. The jackknife - a review. Biometrika, 61:1- 15.
Rao, C.R. 1971. Estimation of variance and covariance components-MINQUE theory. J Multiva Ana 1:19
Rao, C. R. and Kleffe, J. 1980. Estimation of variance components. In Handbook of Statistics. Vol. l: 1-40. Krishnaiah, P. R. ed. New York. North-Holland.
Searle, S. R., Casella, G. and McCulloch, C. E. 1992. Variance Components. John Wiley & Sons, Inc. New York.
Wu J (2012) GenMod: An R package for various agricultural data analyses. ASA, CSSA, and SSSA 2012 International Annual Meetings, Cincinnati, OH, p 127
Wu J., Bondalapati K., Glover K., Berzonsky W., Jenkins J.N., McCarty J.C. 2013. Genetic analysis without replications: model evaluation and application in spring wheat. Euphytica. 190:447-458
Zhu J. 1989. Estimation of Genetic Variance Components in the General Mixed Model. Ph.D. Dissertation, NC State University, Raleigh, U.S.A
Examples
library(minque)
data(ncii)
res=lmm(Yld~1|Female*Male+Rep,data=ncii)
res$Var
res$FixedEffect
res$RandomEffect
#End
An R function to obtain information from a linear mixed model
Description
Sometimes users may need run some simulations for a given data structure and/or a model. This function will give users the information used for simulation.
Usage
lmm.check(formula, data = list())
Arguments
formula |
A linear mixed model formula |
data |
A data frame used for modelling. It can be default |
Value
Return the information that will be used to preset values for simulation
comp1 |
Number of variance components including one for random error |
comp2 |
Names for all variance components not including the one for random error |
comp3 |
Levels of effects for each fixed effect component |
comp4 |
Names of all fixed effects |
Author(s)
Jixiang Wu <jixiang.wu@sdstate.edu>
Examples
library(minque)
data(ncii)
ncii$Female=factor(ncii$Female)
lmm.inf=lmm.check(Yld~Female|Female*Male+Rep,data=ncii)
lmm.inf
#End
An R function for linear mixed model analysis
Description
An R function for linear mixed model analysis with integration two linear mixed model approaches (REML and MINQUE) and a jackknife technique.
Usage
lmm.jack(formula, data=list(),method = NULL, JacNum = NULL,
JacRep = NULL, ALPHA = NULL)
Arguments
formula |
A linear mixed model formula. |
data |
A data frame used for analysis,it can be default. |
method |
The default linear mixed model approach is MINQUE. Users can choose both or one of two linear mixed model approaches, REML and MINQUE. |
JacNum |
The groups of jackknife to be used. The default number is 10. |
JacRep |
The times of jackknife process being repeated. The default is 1 |
ALPHA |
The nomial alpha value being used for statistical tests. The default value is 0.05 |
Value
Return a list of matrices each including mean estimated variance components, standard error, and power
Author(s)
Jixiang Wu <jixiang.wu@sdstate.edu>
References
Miller, R. G. 1974. The jackknife - a review. Biometrika, 61:1- 15.
Rao, C.R. 1971. Estimation of variance and covariance components-MINQUE theory. J Multiva Ana 1:19
Rao, C. R. and Kleffe, J. 1980. Estimation of variance components. In Handbook of Statistics. Vol. l: 1-40. Krishnaiah, P. R. ed. New York. North-Holland.
Searle, S. R., Casella, G. and McCulloch, C. E. 1992. Variance Components. John Wiley & Sons, Inc. New York.
Wu J (2012) GenMod: An R package for various agricultural data analyses. ASA, CSSA, and SSSA 2012 International Annual Meetings, Cincinnati, OH, p 127
Wu J., Bondalapati K., Glover K., Berzonsky W., Jenkins J.N., McCarty J.C. 2013. Genetic analysis without replications: model evaluation and application in spring wheat. Euphytica. 190:447-458
Zhu J. 1989. Estimation of Genetic Variance Components in the General Mixed Model. Ph.D. Dissertation, NC State University, Raleigh, U.S.A
Examples
library(minque)
data(ncii)
res=lmm.jack(Yld~1|Female*Male+Rep,data=ncii,
JacNum=10,JacRep=1,ALPHA=0.05)
res$Var
res$PVar
res$FixedEffect
res$RandomEffect
#End
An R function for linear mixed model analysis and permutation test
Description
An R function for linear mixed model analysis with integration two linear mixed model approaches (REML and MINQUE) and a permutation test.
Usage
lmm.perm(formula, data = list(), method = NULL, PermNum = NULL)
Arguments
formula |
A linear mixed model formula. |
data |
Data frame. It can be default. |
method |
The default linear mixed model approach is MINQUE. Users can choose both or one of two linear mixed model approaches, REML and MINQUE. |
PermNum |
Permutation number. The default number is 100 |
Value
Return a list of matrices each including mean estimated variance components, standard error, and power
Author(s)
Jixiang Wu <jixiang.wu@sdstate.edu>
References
Miller, R. G. 1974. The jackknife - a review. Biometrika, 61:1- 15.
Rao, C.R. 1971. Estimation of variance and covariance components-MINQUE theory. J Multiva Ana 1:19
Rao, C. R. and Kleffe, J. 1980. Estimation of variance components. In Handbook of Statistics. Vol. l: 1-40. Krishnaiah, P. R. ed. New York. North-Holland.
Searle, S. R., Casella, G. and McCulloch, C. E. 1992. Variance Components. John Wiley & Sons, Inc. New York.
Wu J (2012) GenMod: An R package for various agricultural data analyses. ASA, CSSA, and SSSA 2012 International Annual Meetings, Cincinnati, OH, p 127
Wu J., Bondalapati K., Glover K., Berzonsky W., Jenkins J.N., McCarty J.C. 2013. Genetic analysis without replications: model evaluation and application in spring wheat. Euphytica. 190:447-458
Zhu J. 1989. Estimation of Genetic Variance Components in the General Mixed Model. Ph.D. Dissertation, NC State University, Raleigh, U.S.A
Examples
library(minque)
data(ncii)
res=lmm.perm(Yld~1|Female*Male+Rep,data=ncii)
res
#End
An R function for linear mixed model simulation.
Description
An R function for linear mixed model simulation with generated data set and a given model.
Usage
lmm.simu(formula, method = NULL, ALPHA = NULL)
Arguments
formula |
A linear mixed model formula. |
method |
The default linear mixed model approach is MINQUE. Users can choose both or one of two linear mixed model approaches, REML and MINQUE. |
ALPHA |
A preset nominal probability level. |
Details
No data frame is needed when more than one response variables are analyzed
Value
Return list of simulated results for variance components
Author(s)
Jixiang Wu <jixiang.wu@sdstate.edu>
References
Miller, R. G. 1974. The jackknife - a review. Biometrika, 61:1- 15.
Rao, C.R. 1971. Estimation of variance and covariance components-MINQUE theory. J Multiva Ana 1:19
Rao, C. R. and Kleffe, J. 1980. Estimation of variance components. In Handbook of Statistics. Vol. l: 1-40. Krishnaiah, P. R. ed. New York. North-Holland.
Searle, S. R., Casella, G. and McCulloch, C. E. 1992. Variance Components. John Wiley & Sons, Inc. New York.
Wu J (2012) GenMod: An R package for various agricultural data analyses. ASA, CSSA, and SSSA 2012 International Annual Meetings, Cincinnati, OH, p 127
Wu J., Bondalapati K., Glover K., Berzonsky W., Jenkins J.N., McCarty J.C. 2013. Genetic analysis without replications: model evaluation and application in spring wheat. Euphytica. 190:447-458
Zhu J. 1989. Estimation of Genetic Variance Components in the General Mixed Model. Ph.D. Dissertation, NC State University, Raleigh, U.S.A
Examples
library(minque)
data(ncii)
lmm.inf=lmm.check(Yld~1|Female*Male+Rep,data=ncii)
lmm.inf ##there are five variance components
v=c(20,20,20,20,20) ##there are five variance components
b=as.vector(100) ##there is only population mean as fixed effect
Y=lmm.simudata(Yld~1|Female*Male+Rep,data=ncii,v=v,b=b,SimuNum=50)
Female=factor(ncii$Female)
Male=factor(ncii$Male)
Rep=factor(ncii$Rep)
res=lmm.simu(Y~1|Female*Male+Rep)
res
#End
An R function for linear mixed model simulation.
Description
An R function for linear mixed model simulation with integration two linear mixed model approaches (REML and MINQUE) and a jackknife technique.
Usage
lmm.simu.jack(formula, method = NULL, JacNum = NULL, JacRep = NULL, ALPHA = NULL)
Arguments
formula |
A linear mixed model formula. |
method |
The default linear mixed model approach is MINQUE. Users can choose both or one of two linear mixed model approaches, REML and MINQUE. |
JacNum |
The groups of jackknife to be used. The default number is 10. |
JacRep |
The times of jackknife process being repeated. The default is 1 |
ALPHA |
The nomial alpha value being used for statistical tests. The default value is 0.05 |
Value
Return a list of matrices each including mean estimated variance components, standard error, and power
Author(s)
Jixiang Wu <jixiang.wu@sdstate.edu>
References
Miller, R. G. 1974. The jackknife - a review. Biometrika, 61:1- 15.
Rao, C.R. 1971. Estimation of variance and covariance components-MINQUE theory. J Multiva Ana 1:19
Rao, C. R. and Kleffe, J. 1980. Estimation of variance components. In Handbook of Statistics. Vol. l: 1-40. Krishnaiah, P. R. ed. New York. North-Holland.
Searle, S. R., Casella, G. and McCulloch, C. E. 1992. Variance Components. John Wiley & Sons, Inc. New York.
Wu J (2012) GenMod: An R package for various agricultural data analyses. ASA, CSSA, and SSSA 2012 International Annual Meetings, Cincinnati, OH, p 127
Wu J., Bondalapati K., Glover K., Berzonsky W., Jenkins J.N., McCarty J.C. 2013. Genetic analysis without replications: model evaluation and application in spring wheat. Euphytica. 190:447-458
Zhu J. 1989. Estimation of Genetic Variance Components in the General Mixed Model. Ph.D. Dissertation, NC State University, Raleigh, U.S.A
Examples
library(minque)
data(ncii)
lmm.inf=lmm.check(Yld~1|Female*Male+Rep,data=ncii)
lmm.inf ##there are five variance components
v=c(20,20,20,20,20) ##there are five variance components
b=as.vector(100) ##there is only population mean as fixed effect
Y=lmm.simudata(Yld~1|Female*Male+Rep,data=ncii,v=v,b=b,SimuNum=50)
Female=factor(ncii$Female)
Male=factor(ncii$Male)
Rep=factor(ncii$Rep)
res=lmm.simu.jack(Y~1|Female*Male+Rep)
res
#End
An R function to generate a simulated data set
Description
An R function to generate a simulated data set with given parameters, model, and data structure.
Usage
lmm.simudata(formula, data = list(), v, b, SimuNum = NULL)
Arguments
formula |
A linear mixed model formula |
data |
A data frame. It can be default. |
v |
A vector of preset variance components |
b |
A vector of present fixed effects. |
SimuNum |
The number of simulations. The default number is 200. |
Value
Return a simulated data set which is a matrix.
Author(s)
Jixiang Wu <jixiang.wu@sdstate.edu>
References
Rao, C.R. 1971. Estimation of variance and covariance components-MINQUE theory. J Multiva Ana 1:19
Rao, C. R. and Kleffe, J. 1980. Estimation of variance components. In Handbook of Statistics. Vol. l: 1-40. Krishnaiah, P. R. ed. New York. North-Holland.
Searle, S. R., Casella, G. and McCulloch, C. E. 1992. Variance Components. John Wiley & Sons, Inc. New York.
Wu J (2012) GenMod: An R package for various agricultural data analyses. ASA, CSSA, and SSSA 2012 International Annual Meetings, Cincinnati, OH, p 127
Wu J., Bondalapati K., Glover K., Berzonsky W., Jenkins J.N., McCarty J.C. 2013. Genetic analysis without replications: model evaluation and application in spring wheat. Euphytica. 190:447-458
Zhu J. 1989. Estimation of Genetic Variance Components in the General Mixed Model. Ph.D. Dissertation, NC State University, Raleigh, U.S.A
Examples
library(minque)
data(ncii)
lmm.inf=lmm.check(Yld~1|Female*Male+Rep,data=ncii)
lmm.inf ##there are five variance components
v=c(20,20,20,20,20) ##there are five variance components
b=as.vector(100) ##there is only population mean as fixed effect
Y=lmm.simudata(Yld~1|Female*Male+Rep,data=ncii,v=v,b=b,SimuNum=50)
#End
Maize variety trial
Description
Maize variety trial with two years and multi-locations in China.
Usage
data(maize)
Format
A data frame with 260 observations (rows) on the following 4 variables (columns).
Cultivar
cultivar names
Year
testing year
Location
testing locations
Yld
maize yield
Details
No other details available
Source
Fan X.M., Kang M.S., Chen H.M., Zhang Y.D., Tan J., Xu C.X. (2007) Yield stability of maize hybrids evaluated in multi-environment trials in Yunnan, China. Agronomy Journal.99:220-228
References
Fan X.M., Kang M.S., Chen H.M., Zhang Y.D., Tan J., Xu C.X. (2007) Yield stability of maize hybrids evaluated in multi-environment trials in Yunnan, China. Agronomy Journal.99:220-228
Examples
library(minque)
data(maize)
#names(maize)
res=lmm(Yld~1|Cultivar*Year+Cultivar*Location+Year*Location,data=maize)
res$Var
res$FixedEffect
res$RandomEffect
res=lmm.jack(Yld~1|Cultivar*Year+Cultivar*Location+Year*Location,
data=maize,JacNum=10,JacRep=1,ALPHA=0.05)
res$Var
res$PVar
res$FixedEffect
res$RandomEffect
##End
NC design II F1 data
Description
A genetic data set can be analyzed by ANOVA or MIQNUE approaches.
Usage
data(ncii)
Format
A data frame with 60 observations on the following 4 variables.
Female
female parents
Male
male parents
Rep
replications
Yld
yield
Details
No other details available
Source
Not available
References
To be added
Examples
library(minque)
data(ncii)
res=lmm(Yld~1|Female*Male+Rep,data=ncii)
res$Var
res$FixedEffect
res$RandomEffect
res=lmm.jack(Yld~1|Female*Male+Rep,data=ncii,
JacNum=10,JacRep=1,ALPHA=0.05)
res$Var
res$PVar
res$FixedEffect
res$RandomEffect