Error Estimating the NB Dispersion of a Dataset
2
0
Entering edit mode
@humberto_munoz-10903
Last seen 8.3 years ago

I am following the user guide to estimate the dispersion of a dataset and got the following error messages:

> Patient <- factor(c(8,8,33,33,51,51))
> Tissue <- factor(c("N","T","N","T","N","T"))
> data.frame(Sample=colnames(y),Patient,Tissue)
  Sample Patient Tissue
1     8N       8      N
2     8T       8      T
3    33N      33      N
4    33T      33      T
5    51N      51      N
6    51T      51      T
> design <- model.matrix(~Patient+Tissue)
> rownames(design) <- colnames(y)
> design
    (Intercept) Patient33 Patient51 TissueT
8N            1         0         0       0
8T            1         0         0       1
33N           1         1         0       0
33T           1         1         0       1
51N           1         0         1       0
51T           1         0         1       1
attr(,"assign")
[1] 0 1 1 2
attr(,"contrasts")
attr(,"contrasts")$Patient
[1] "contr.treatment"

attr(,"contrasts")$Tissue
[1] "contr.treatment"

> y <- estimateDisp(y, design, robust=TRUE)
Error in locfitByCol(loglik, covariate, span = span, degree = 0) : 
  locfit required but is not available
> y$common.dispersion
NULL
> y <- estimateDisp(y, design, robust=FALSE)
Error in locfitByCol(loglik, covariate, span = span, degree = 0) : 
  locfit required but is not available
> plotBCV(y)
Error in plotBCV(y) : No dispersions to plot
>

Any suggestion to fix the error will be appreciated. 

dispersion edgeR • 2.3k views
ADD COMMENT
1
Entering edit mode
@ryan-c-thompson-5618
Last seen 28 days ago
Icahn School of Medicine at Mount Sinai…

The error message is telling you that you need to Install the locfit package. So do that and try your code again.

ADD COMMENT
0
Entering edit mode
@humberto_munoz-10903
Last seen 8.3 years ago

Thanks so much

ADD COMMENT
0
Entering edit mode

You might like to look at this post about suggested packages: should statmod be a dependency of limma and not a suggests?

ADD REPLY

Login before adding your answer.

Traffic: 593 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6