Displaying 20 results from an estimated 10000 matches similar to: "simulate zero-truncated Poisson distribution"
2010 Nov 15
2
Zero truncated Poisson distribution & R2WinBUGS
I am using a binomial mixture model to estimate abundance (N) and
detection probability (p) using simulated count data:
-Each site has a simulated abundance that follow a Poisson
distribution with lambda = 5
-There are 200 simulated sampled sites
-3 repeated counts at each site
- only 50 percent of the animals are counted during each count (i.e,
detection probability p =0.5, see codes)
We removed
2009 Mar 17
2
bigglm() results different from glm()
Dear all,
I am using the bigglm package to fit a few GLM's to a large dataset (3
million rows, 6 columns). While trying to fit a Poisson GLM I noticed
that the coefficient estimates were very different from what I obtained
when estimating the model on a smaller dataset using glm(), I wrote a
very basic toy example to compare the results of bigglm() against a
glm() call. Consider the
2007 Feb 07
3
Sample Poisson Distribution
Hi,
I'm completely new to R, I am all at sea with the interface and the
confusing help files, so would appreciate some help to do a simple task.
Need to present the mean and variance of 100 different samples of poisson
distributions (N=1000, with fixed lambda) in a file in two columnns, and
then produce histograms.
So far I have figured out:
> N <- 1000
> x <- rpois(N, 3.1) ,
2010 Jan 05
1
Multivariate Poisson GLM??
Dear R Users,
I'm working on a problem where I have a multivariate response vector of
counts and a continuous predictor.
I've thought about doing this the same way you would do a Multvariate
regression model with normally distributed data, but since these data are
counts, they are probably better modeled with a Poisson distribution.
For example
y1<-rpois(100,3.5)
y2<-rpois(100,1.5)
2006 Feb 06
3
power and sample size for a GLM with poisson response variable
Hi all,
I would like to estimate power and necessary sample size for a GLM with
a response variable that has a poisson distribution. Do you have any
suggestions for how I can do this in R? Thank you for your help.
Sincerely,
Craig
--
Craig A. Faulhaber
Department of Forest, Range, and Wildlife Sciences
Utah State University
5230 Old Main Hill
Logan, UT 84322
(435)797-3892
2011 Jul 31
2
zero truncated poisson regression
Dear friends,
does anyone know how I can run a zero truncated poisson regression using R (or even SPSS)?
Dr. Iasonas Lamprianou
Department of Social and Political Sciences
University of Cyprus
[[alternative HTML version deleted]]
2007 Jan 26
1
Bayesian inference: Poisson distribution with normal (!) prior
Hello,
for a frequency modelling problem I want to combine expert knowledge with
incoming real-life data (which is not available up to now). The frequency
has to be modelled with a poisson distribution. The parameter lambda has to
be normal distributed (for certain reasons we did not NOT choose gamma
althoug it would make everything easier).
I've started with the subsequent two functions to
2009 Feb 02
2
logLik for poisson models
Dear all,
I have a very basic question:
how does the logLik function work for poisson models?
Example:
I simulate 20 observations from a Poisson distribution with mean 800.
y <- rpois(20,800)
model <- glm(y ~ 1, family=poisson())
logLik(model)
I would like to know what's the exact formula the function logLik uses.
I looked at ?extractAIC but I cannot sort it out.
Can you please
2006 Mar 08
1
power and sample size for a GLM with Poisson response variable
Craig, Thanks for your follow-up note on using the asypow package. My
problem was not only constructing the "constraints" vector but, for my
particular situation (Poisson regression, two groups, sample sizes of
(1081,3180), I get very different results using asypow package compared
to my other (home grown) approaches.
library(asypow)
pois.mean<-c(0.0065,0.0003)
info.pois <-
2007 Sep 21
2
duplicated names and values
Dear list,
I am sorry about this simple question, but somehow I can not figure out
how to solve my problem, may be you could help?
I have a vector mir3:
> length(mir3)
[1] 220671
>head(mir3)
rno-miR-30c rno-miR-30c rno-miR-30d
rno-miR-30e "ENSRNOT00000049288" "ENSRNOT00000049288"
"ENSRNOT00000049288"
2008 Dec 16
1
Prediction intervals for zero inflated Poisson regression
Dear all,
I'm using zeroinfl() from the pscl-package for zero inflated Poisson
regression. I would like to calculate (aproximate) prediction intervals
for the fitted values. The package itself does not provide them. Can
this be calculated analyticaly? Or do I have to use bootstrap?
What I tried until now is to use bootstrap to estimate these intervals.
Any comments on the code are welcome.
2006 Feb 10
8
Fitdistr and MLE for parameter lambda of Poisson distribution
Hello!
I would like to get MLE for parameter lambda of Poisson distribution. I
can use fitdistr() for this. After looking a bit into the code of this
function I can see that value for lambda and its standard error is
estimated via
estimate <- mean(x)
sds <- sqrt(estimate/n)
Is this MLE? With my poor math/stat knowledge I thought that MLE for
Poisson parameter is (in mixture of LaTeX
2011 May 16
1
simulation from truncated poisson
Dear all,
I need to simulate values from a Poisson distribution which is truncated at
certain value 'a'. Can anyone tell me if there is in-built package in R
which can simulate from a truncated Poisson? If not, what should be the
steps to write a function which would do that?
Thanks in advance.
Cassie
[[alternative HTML version deleted]]
2005 Sep 12
1
poisson mean hypothesis
Dear R-users,
Is there a way to get p-values for a one-sided hypothesis test about a
poisson mean?
Thanks,
Jan Wijffels
University Center for Statistics
W. de Croylaan 54
3001 Heverlee
Belgium
tel: +32 (0)16 322784
fax: +32 (0)16 322831
<http://www.kuleuven.be/ucs> http://www.kuleuven.be/ucs
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
[[alternative HTML version
2008 Jun 25
0
Goodness-of-fit for zero-truncated poisson distribution
Hi there,
I am trying to write a function to perform GOF test of data to a
zero-truncated Poisson distribution. I am facing 2 problems.
1) How can I obtain a frequency table for all values within the range of
observed values?
For instance if the observations are
obs <- c("A", "A", "A", "A", "B", "C", "C", "D",
2009 Jan 15
1
Confidence Intervals for Poisson
Hi folks!
I run the following code to get a CI for a Poisson with lambda=12.73
library(MASS)
set.seed(125)
x <- rpois(100,12.73)
lambda_hat<-fitdistr(x, dpois, list(lambda=12))$estimate
#Confidence Intervals - Normal Approx.
alpha<-c(.05,.025,.01)
for(n in 1:length(alpha)) {
LowerCI<-mean(x)-(qnorm(1-alpha[n]/2, mean = 0, sd =
1)*sqrt(var(x)/length(x)))
2012 Apr 29
1
Specifying special poisson maximum likelihood
Hi everyone
I am stuck on specifying my own maximum likelihood function for a
special poisson model.
My poisson model is as follow: O ~ Pois(b*N + b*RR*E)
With
O = observed cases
b = constant (known)
N = number of unexposed persons (known)
E = number exposed persons (known)
RR = relative risk (value is assumed under a scenario, e.g. RR=2.0)
I used rpois to simulate the values of O for several
2010 May 03
3
how to rewrite this for loops in matrix form without loop
x0=rnorm(100)
y0=rpois(100,3)+1
ind=as.data.frame(table(y0))
ind1=ind[,1]
ind2=ind[,2]
phi=NULL
for (i in 1:length(ind2)){
phi[i]=sum(x0[y0==ind1[i]])/ind2[i]
}
[[alternative HTML version deleted]]
2011 Oct 21
2
glm-poisson fitting 400.000 records
Hi,
I am trying to fi a glm-poisson model to 400.000 records. I have tried biglm
and glmulti but i have problems... can it really be the case that 400.000
are too many records???
I am thinking of using random samples of my dataset.....
Many thanks,
--
View this message in context: http://r.789695.n4.nabble.com/glm-poisson-fitting-400-000-records-tp3925100p3925100.html
Sent from the R help
2000 Mar 16
2
glm: offset in poisson
R-users,
Can an offset term be included in a Poisson model?
I get an error message when trying that:
>r3o <- glm(tax ~ areal + offset(o), family=poisson)
Error in (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y, :
inner loop 1; can't correct step size
In addition: Warning message:
Step size truncated due to divergence in: (if (is.empty.model(mt))