Displaying 20 results from an estimated 400 matches similar to: "Negative binomial regression for count data"
2005 Mar 11
0
Negative binomial regression for count data,
Dear list,
I would like to know:
1. After I have used the R code (http://pscl.stanford.edu/zeroinfl.r) to fit a zero-inflated negative binomial model, what criteria I should follow to compare and select the best model (models with different predictors)?
2. How can I compare the model I get from question 1 (zero-inflated negative binomial) to other models like glm family models or a logistic
2008 Apr 21
1
estimate of overdispersion with glm.nb
Dear R users,
I am trying to fully understand the difference between estimating
overdispersion with glm.nb() from MASS compared to glm(..., family =
quasipoisson).
It seems that (i) the coefficient estimates are different and also (ii) the
summary() method for glm.nb suggests that overdispersion is taken to be one:
"Dispersion parameter for Negative Binomial(0.9695) family taken to be
2011 Feb 28
1
mixture models/latent class regression comparison
Dear list,
I have been comparing the outputs of two packages for latent class
regression, namely 'flexmix', and 'mmlcr'. What I have noticed is that
the flexmix package appears to come up with a much better fit than the
mmlcr package (based on logLik, AIC, BIC, and visual inspection). Has
anyone else observed such behaviour? Has anyone else been successful
in using the mmlcr
2008 May 30
1
existing package (mmlcr) modification -- appropriate process?
All:
I am new to R and would like your help in identifying the appropriate
process to follow in order to modify the output from an existing
package. I've had difficulty finding an answer online, perhaps because
I am using incorrect terminology.
A package that I am using (mmlcr) invokes another package (multinom).
An output of multinom is the standard errors, but this output is not
2010 Feb 24
0
Extracting individual parameter estimates from mmlcr
I am new to mmlcr and am working on a latent class mixture model attempting
to identify
the trajectory and number of classes that best describes my data. I am able
to find model
parameters such as degrees of freedom, loglikelihood, and BIC.
For example, here is a cubic 3-class model I am using.
mmlcr1 <- mmlcr(outer = ~ 1 | ID, components = list(list(formula = Score ~
poly(wave,3),
class =
2008 Jan 15
1
bug in mmlcr ? (PR#10576)
Hi the list.
Is there a bug in mmlcr package ?
The following code does not compile:
mmlcrTest <- function(dataW){
dataL <-
reshape(dataW,idvar="id",timevar="T",varying=list("T0","T1","T2"),direction="long",v.names="score")
resultR <- mmlcr(outer= ~ 1 | id,
components = list(list(formula =
2005 Apr 12
1
R Package: mmlcr and/or flexmix
Greetings
I'm a relatively new R user and I'm trying to build a latent class model.
I've used the 'R Site Search' and it appears there's not much dialogue on
these packages
On mmlcr, I've gotten it working, but not sure if I'm using it correctly.
On flexmix, I can only seem to get results for one class.
I'm attaching my code below - if anyone
2006 Feb 18
1
truncated negative binomial using rnegbin
Dear R users,
I'm wanting to sample from the negative binomial distribution using the
rnegbin function from the MASS library to create artificial samples for the
purpose of doing some power calculations. However, I would like to work
with samples that come from a negative binomial distribution that includes
only values greater than or equal to 1 (a truncated negative binomial), and
I
2011 May 18
1
Changing order of facet grid in ggplot2
Hi I am running the following code:
sym <- c(sym1,sym2,sym4)
lifedxm <- c("O-BD","O-WELL","O-UNI")
life <- c(lifedxm,lifedxm,lifedxm)
tp <- c("TP-ANY","TP-ANY", "TP-ANY", "TP-SUB", "TP-SUB", "TP-SUB", "TP-CLIN"
, "TP-CLIN", "TP-CLIN")
data <-
2011 Sep 06
1
"Continious Repo" vs. 'normal' Centos-Base/Updates questions
I have some questions about the "Continious Repo".
Does the "Continious Repo" replace the Centos-Base/Updates repo?
Is the "Continious Repo" in a standard place on the CentOS mirrors? Ie.
can I just add another line to my rsync script to get this repo? It is
not possible for me to just update directly off the net (I have a slow
and unreliable network connection)
2009 Oct 26
1
GLMMPQL and negbinomial: trouble with the X-axis in PREDICT
I'm having some difficulty with graphing outputs of a GLM model I've
been working. I have count data for both my predictor (only 1) and
response variables, and I have pseudoreplication which I've modeled as
a random effect. The odTest() from pscl:: indicated that the negative
binomial distribution fit better than Poisson, and I then proceeded by
estimating theta from glm.nb.
My
2004 Feb 10
1
generate random sample from ZINB
I want to generate 1,000 random samples of sample size=1,000 from ZINB.
I know there is a rnegbin() to generate random samples from NB, and I know
I can use
the following process:
do i=1 to 1000
n=0
do i=1 to 1000
if runi(1)>0.1 then x(i) = 0; else
x(i)=rnegbin();
n=n+1;
if n>1000 then stop;
end;
output;
end;
Anybody can help me out with the R code?
Thanks very much ahead of time.
2011 May 04
1
hurdle, simulated power
Hi all--
We are planning an intervention study for adolescent alcohol use, and I
am planning to use simulations based on a hurdle model (using the
hurdle() function in package pscl) for sample size estimation.
The simulation code and power code are below -- note that at the moment
the "power" code is just returning the coefficients, as something isn't
working quite right.
The
2006 Jul 14
2
Negative Binomial: Simulation
Hi R-Users!
I fitted a negative binomial distribution to my count data using the
function glm.nb() and obtained the calculated parameters
theta (dispersion) and mu.
I would like to simulate values from this negative binomial distribution.
Looking at the function rnbinom() I was looking at the relationship
between the two possible parametrizations of the negative binomial and found
that for this
2001 Feb 07
3
Goodness of fit to Poisson / NegBinomial
All,
I have some data on parasites on apple leaves and want to do a
goodness of fit test to a Poisson distribution. This seems to
do it:
mites <- c(rep(0,70),
rep(1,38),
rep(2,17),
rep(3,10),
rep(4,9),
rep(5,3),
rep(6,2),
rep(7,1))
tab <- table(mites)
NSU <- length(mites)
N <-
2010 Oct 06
4
problem with abline
Hi All,
I am running a scatter plot and trying to add a best fit line. I use an abline function, but get no line drawn over the points. I also get no error. I arm using V 2.10.0 on Windows 7.
Here is my code, including the SAS transport file import:
require (foreign)
require (chron)
require (Hmisc)
require (lattice)
clin <- sasxport.get("y:\\temp\\subset.xpt")
attach(clin)
2007 Feb 15
2
Problems with 'delay'/'delayedAssign' when installing data package
I downloaded:
http://www.bioconductor.org/data/metaData/hgu95av2_1.7.0.tar.gz
described as:
Package: hgu95av2
Title: A data package containing annotation data for hgu95av2
Version: 1.7.0
Created: Wed Jan 12 16:57:23 2005
Author: Lin,Chenwei
Description: Annotation data file for hgu95av2 assembled using data
from public data repositories
Maintainer:
2006 Nov 16
0
(no subject)
Dear List,
Does anyone have experience using mmlcr Package? I am working on a
longitudinal dataset. The model fitting is fine. However, I had a problem
with the command "plot.mmlcr". It seems to me it can not plot a very
nice trajectory plot for longitudinal dataset. I wonder whether somebody can
share the experience, i.e. how to make a nice trajectory plot for
longitudinal data.
2007 Jan 11
2
overdispersion
How can I eliminate the overdispersion for binary data apart the use of the quasibinomial?
help me
Eva Iannario
------------------------------------------------------
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://click.libero.it/infostrada11gen07
2005 Nov 23
2
negative binomial overdispersion question
Hello,
I'm a grad student in the Intelligent Transportation Systems lab at Portland
State Univ. in Portland, OR, USA. I'm trying to learn the basics of R to run a
negative binomial in the near future, and so I ran a test regression on roadway
crash data obtained from "Statistical and Econometric Methods for
Transportation Data Analysis" by Washington et al (p. 250). I ran the