| readPheMaster | R Documentation |
Read covariates and phenotype(s) from the provided file path. Exclude individuals that contain any missing value in the covariates, miss all phenotype values or do not have corresponding genotypes.
readPheMaster( phenotype.file, psam.ids, family, covariates, phenotype, status, split.col, configs )
phenotype.file |
the path of the file that contains the phenotype values and can be read as as a table. There should be FID (family ID) and IID (individual ID) columns containing the identifier for each individual, and the phenotype column(s). (optional) some covariate columns and a column specifying the training/validation split can be included in this file. |
psam.ids |
a vector of ids read from the psam file. |
family |
the type of the phenotype: "gaussian", "binomial", or "cox". |
covariates |
a character vector containing the names of the covariates included in the lasso fitting, whose coefficients will not be penalized. The names must exist in the column names of the phenotype file. |
phenotype |
the name of the phenotype. Must be the same as the corresponding column name in the phenotype file. |
status |
the column name for the status column for Cox proportional hazards model. When running the Cox model, the specified column must exist in the phenotype file. |
split.col |
the column name in the phenotype file that specifies the membership of individuals to the training or the validation set. The individuals marked as "train" and "val" will be treated as the training and validation set, respectively. When specified, the model performance is evaluated on both the training and the validation sets. |
configs |
a list of other config parameters. See more description in the 'snpnet' function. |
a data.table including the requested columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.