checkdata {GLIDE} | R Documentation |
It is used to check the core inputs of function glide
checkdata(formula,exposure_coeff,genotype_columns,data)
formula |
A an object of class "formula": outcome ~ adjusting covariates. |
exposure_coeff |
A named mumeric vector or a one-column dataframe for the external coefficients for genotype-exposure associations. |
genotype_columns |
An integer vector, column indices of data in which genotype data are stored. |
data |
A data frame composed of formula-related components and snp genotype columns. |
James Y. Dai and X. Wang
#load an example data; it includes a dataframe "simdat" and a one-column dataframe "coeff" data(simdata) simdat=simdata$simdat coeff=simdata$coeff formula=as.formula("outcome~age+sex+pc1+pc2+pc3") genotype_columns=which(grepl("^SNP",colnames(simdat))) checkdata(formula=formula,exposure_coeff=coeff,genotype_columns,data=simdat)