Hi all!
I am analyzing the variance sources of TCGA expression data using variancePartition. I want to check among others the effect of individuals in the variance, but when I specify it at the formula, I get the following errors:
> form <- ~ submitter_id
> varPart <- fitExtractVarPartModel(Filt_EXP1, form, clin)
Error in checkModelStatus(fit, showWarnings = showWarnings, colinearityCutoff) :
Colinear score = 1 > 0.999
Covariates in the formula are so strongly correlated that the
parameter estimates from this model are not meaningful.
Dropping one or more of the covariates will fix this problem
> form <- ~ (1|submitter_id)
> varPart <- fitExtractVarPartModel(Filt_EXP1, form, clin)
Error: number of levels of each grouping factor must be < number of observations
> form <- ~ (0|submitter_id)
> varPart <- fitExtractVarPartModel(Filt_EXP1, form, clin)
Error in (function (cl, name, valueClass) :
assignment of an object of class “numeric” is not valid for @‘Dim’ in an object of class “dgTMatrix”; is(value, "integer") is not TRUE
I can see why the above return an error, but at the vignette effect of individuals can be tested for. Is it a specific way I should specify it?
Thanks in advance.
R.
Hi Mikhael,
Thank you for your response. I have defined the
submitter_id
as a factor, but I keep getting the errorError: number of levels of each grouping factor must be < number of observations
.Here is the structure of my data, in case it helps.
Hope that helps!
Thank you.
How many samples do you have for every
submitter_id
? I suspect that the warning is caused because you have an equal number of observations and uniquesubmitter_id
.Exactly. It's one sample per patient. This is what I thought the problem was about too, but I don't know how I can solve for this.
What if you include other variables as random effects (such as tumor_stage)?
For
form <- ~ (1|tumor_stage)
analysis runs as normalBut in the case of
form <- ~ (1|tumor_stage) + (1|submitter_id)
Error: number of levels of each grouping factor must be < number of observations