View source: R/ScoreTestSupportMixedModel.R
ScoreTestSupportMixedModel | R Documentation |
Generate the support list for score test To construct a score test, we need to first fit the model under the null hypothesis. This function fitts the model under the null hypothesis, then saved all the necessary results into a list to pass to the score test function.
ScoreTestSupportMixedModel( y, baselineonly = NULL, additive = NULL, pairwise.interaction = NULL, saturated = NULL, missingTumorIndicator = 888, delta0 = NULL, cutoff = 10 )
y |
the phenotype file. The first column is the case control disease status. The other columns are the tumor characteristics status |
baselineonly |
the covariates to be adjusted used baseline effect only model. This assumes the odds ratio of the covariates for all the subtpes to be the same. |
additive |
the covariates to be adjusted used the additive two-stage model |
pairwise.interaction |
the covariates to be adjusted used the pairwise interaction two-stage model |
saturated |
the covariates to be adjusted used the saturated two-stage model. This model assumes every subtype has their specific odds ratio. It's equivalent to the polytmous model. |
missingTumorIndicator |
The indicators to show the tumor characteristics are missing. In the example, we put missing tumor characteristics as 888. Note, for all the controls subjects, they don't have tumor characteristics. So their tumor characteristics are put as NA instead of 888 to differentiate with cases missing tumor characteristics. |
delta0 |
|
cutoff |
by default, the model will remove the subtypes with less than 10 cases, the user can specify other values by changing the cutoff. But we don't recommend to set the cutoff too low, since the asymptotic convergence requires enough sample size |
return a list for score test function
data(data, package="TOP") #load in the breast cancer example #this is a simulated breast cancer example #there are around 5000 breast cancer cases and 5000 controls, i.e. people without disease data[1:5,] #four different tumor characteristics were included, ER (positive vs negative), PR (positive vs negative), HER2 (positive vs negative), grade (ordinal 1, 2, 3) #the phenotype file y <- data[,1:5] #one SNP and one Principal components (PC1) are the covariates SNP <- data[,6,drop=F] PC1 <- data[,7,drop=F] #fit the additive two-stage model under the null hypothesis that the second stage parameters of SNP is 0 score.support <- ScoreTestSupportMixedModel(y=y, additive=PC1, missingTumorIndicato#'r=888)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.