An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111012/91f6932c/attachment.pl>
Generelized Negative Binomial model in R
3 messages · Akram Khaleghei Ghosheh balagh, Steve Lianoglou, Ben Bolker
Hi, On Wed, Oct 12, 2011 at 11:23 AM, Akram Khaleghei Ghosheh balagh
<a.khaleghei at gmail.com> wrote:
Hello; Does anybody knows that R have a function for Generelized Negative Binomial model, something like "gnbreg" in "STATA" where dispersion parameter itself is a function of covaraites ?
Take a look at the edgeR (and DESeq) package in bioconductor. edgeR uses a GLMs w/ negative binomial to assess differential expression of genomic regions using count data (aka next generation sequencing data). http://www.bioconductor.org/packages/release/bioc/html/edgeR.html http://www.bioconductor.org/packages/release/bioc/html/DESeq.html HTH, -steve
Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
Steve Lianoglou <mailinglist.honeypot <at> gmail.com> writes:
Hi, On Wed, Oct 12, 2011 at 11:23 AM, Akram Khaleghei Ghosheh balagh <a.khaleghei <at> gmail.com> wrote:
Hello; Does anybody knows that R have a function for Generelized Negative Binomial model, something like "gnbreg" in "STATA" where dispersion parameter itself is a function of covaraites ?
Take a look at the edgeR (and DESeq) package in bioconductor. edgeR uses a GLMs w/ negative binomial to assess differential expression of genomic regions using count data (aka next generation sequencing data). http://www.bioconductor.org/packages/release/bioc/html/edgeR.html http://www.bioconductor.org/packages/release/bioc/html/DESeq.html
You could code it fairly easily in mle2, e.g.
mle2(y~dnbinom(exp(logmu),exp(logk)),
data=..., start=...,
parameters=list(logmu~...,logk~...)
where the ... within parameters specify linear models for the log-mean
and log-overdispersion parameters.
You do have to specify your own starting conditions, and it doesn't
do anything clever in terms of special-purpose optimization -- it just
uses the optimizers built into optim() [with a few other choices, e.g.
those from the optimx package]