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.
You might like to look at this post about suggested packages: should statmod be a dependency of limma and not a suggests?