This is an old post but it did not reveal how to do the paired analysis with dmpFinder. When I try with my own data I get an error re the length of pheno. However looking at the length of beta and pheno both show 102 samples. What am I missing...?
Thanks.
Kristian
> person<-factor(pd$person)
> time<-factor(pd$time, levels=c("1","2"))
> pheno<-model.matrix(~person+time)
> dmpFinder(beta, pheno=pheno, type = "categorical", qCutoff = 1)->paired
Error in dmpFinder(beta, pheno = design, type = "categorical", qCutoff = 1) :
length of pheno does not equal number of samples
>
> str(beta)
num [1:467971, 1:102] 0.8239 0.6063 0.0693 0.1704 0.0586 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:467971] "cg13869341" "cg14008030" "cg12045430" "cg20826792" ...
..$ : chr [1:102] "3999840155_R05C01" "3999840155_R04C02" "3999840091_R02C02" "3999840097_R03C02" ...
> str(pheno)
num [1:102, 1:52] 1 1 1 1 1 1 1 1 1 1 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:102] "1" "2" "3" "4" ...
..$ : chr [1:52] "(Intercept)" "personB02" "personB03" "personB04" ...
- attr(*, "assign")= int [1:52] 0 1 1 1 1 1 1 1 1 1 ...
- attr(*, "contrasts")=List of 2
..$ person: chr "contr.treatment"
..$ time : chr "contr.treatment"
You are missing the fact that the 'pheno' argument is intended to be a single factor, not a design matrix. I think the help page is pretty explicit about that. Anyway, dmpFinder()
is just a wrapper to allow people to use limma without having to know how to use limma. For any more sophisticated analyses you should just forgo the wrapper and analyze using limma directly.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.