# NOT RUN {
data(snps); data(snps.imputed); data(pheno)
opts = mPhen.options(c("regression","pheno.input"))
res = mPhen(snps, pheno, phenotypes = "all",
covariates = c('testPheno3', 'testPheno4'),opts = opts)
# performs a MultiPhen analysis, with snp as outcome,
# and phenotypes testPheno1, testPheno2 as predictors,
#with testPheno3 and testPheno4 as covariates using ordinal regression
res = mPhen(snps, pheno, phenotypes = c('testPheno1', 'testPheno2'),
covariates = c('testPheno3', 'testPheno4'), resids = 'testPheno5', opts = opts)
# the same as above, with the fifth phenotype as residual
res = mPhen(snps[,2, drop = FALSE], pheno, phenotypes = c('testPheno1', 'testPheno2'),
covariates = 'testPheno3', opts = opts)
# please note the use use of drop = FALSE if analysing only one SNP
res = mPhen(snps.imputed, pheno, phenotypes = c('testPheno1', 'testPheno2'),
covariates = 'testPheno3', opts = opts)
# for imputed data
# }
Run the code above in your browser using DataLab