data(pheno)
data(geno)
data(pedigree)
data(resVCmtx)
foo <- gls.batch.get(
phenfile=pheno,
genfile=data.frame(t(geno)),
pedifile=pedigree,
outfile="example_output.txt",
covmtxfile.in=NULL,covmtxfile.out=paste(phen,"_cov_matrix.txt",sep=""),
phen="Zscore", covars = "IsFemale",
med = "rfgls", sizeLab = "OOPP", Mz = TRUE, Bo = TRUE, Ad = TRUE, Mix = TRUE,
indobs = TRUE, col.names = TRUE, pediheader = FALSE,
pedicolname=c("FAMID","ID","PID","MID","SEX"),
sep.phe = "", sep.gen = "", sep.ped = "")
bar <- fgls(
fixed=Zscore ~ snp.1 + IsFemale, data=foo$test.dat, sizelist=foo$sizelist,
tlist=foo$tlist,
sizeLab="OOPP",Mz = TRUE, Bo = TRUE, Ad = TRUE, Mix = TRUE, indobs = TRUE,
get.hessian=FALSE,
vmat = resVCmtx, #<--Resid. cov. matrix from fgls onto IsFemale only.
subset=NULL, weights=NULL, na.action=NULL)
bar$ctable
## To simultaneously estimate residual covariance matrix
## and regression coefficients for snp.1 & IsFemale,
## use the same syntax, except with vmat = NULL .
Run the code above in your browser using DataLab