Displaying 9 results from an estimated 9 matches for "possion".
Did you mean:
passion
2012 Aug 28
1
Bionomial and possion
Make a plot in R where you compare the probability distributions for the
Binomial distributions with N=1000 trials and succes probability 0.005 and
the Possion Distribution with rate lambda=5.
My answer is
b<-binom(x, 1000, 0.005, log = FALSE)
plot(b)
p<-dpois(x, lambda, log = FALSE)
plot(p)
*Is this the right way to solve the problem?*
--
View this message in context: http://r.789695.n4.nabble.com/Bionomial-and-possion-tp4641531.html
Sent f...
2011 Jun 21
5
please help for mgcv package
...ad a book from WOOD, there's an example which is talking about the
pollutant.
library(gamair)
library(mgcv)
y<-gam(death~s(time,bs="cr",k=200)+s(pm10median,bs="cr")+s(so2median,bs="cr")+s(o3median,bs="cr")+s(tmpd,bs="cr"),data=chicago,family=Possion)
lag.sum<-function(a,10,11)
{n<-length(a)
b<-rep(0,n-11)
for(i in 0:(11-10))
b<-b+a[(i+1):(n-11+i)]
b}
death<-chicago$death[4:5114]
time<-chicago$time[4:5114]
o3<-lag.sum(chicago$o3median,0,3)
tmp<-lag.sum(chicago$tmpd,0,3)
pm10<-lag.sum(log(chicago$pm10median+40),0,3)...
2007 Jun 15
2
method of rpart when response variable is binary?
Dear all,
I would like to model the relationship between y and x. y is binary
variable, and x is a count variable which may be possion-distribution.
I think it is better to divide x into intervals and change it to a
factor before calling glm(y~x,data=dat,family=binomail).
I try to use rpart. As y is binary, I use "class" method and get the
following result.
> rpart(y~x,data=dat,method="class")
n=778 (22 ob...
2009 Oct 27
1
Poisson dpois value is too small for double precision thus corrupts loglikelihood
Hi - I have a likelihood function that involves sums of two possions:
L = a*dpois(Xi,theta1)*dpois(Yi,theta2)+b*(1-c)*a*dpois(Xi,theta1+theta3)*dpois(Yi,theta2)
where a,b,c,theta1,theta2,theta3 are parameters to be estimated.
(Xi,Yi) are observations. However, Xi and Yi are usually big (>
20000). This causes dpois to returns 0 depending on values of theta1,
th...
2006 Sep 20
1
ppois
A quick question!
The number of episodes per year of otitis media follows a Possion
distribution with lambda = 1.6 episodes per year. Wouldn't the
probability of getting 3 or more episodes of otitis media in the first
2 years of life be:
> ppois(q=3, lambda=1.6*2, lower.tail = TRUE, log.p = FALSE)
[1] 0.6025197
I am confused with the lambda and 3 or more..
thx much
2009 Apr 11
0
question related to fitting overdispersion count data using lmer quasipoisson
...dvance.
-Sean
#data simulation (modified from code at
http://markmail.org/message/j3zmgrklihe73p4p)
set.seed(100)
m <- 5
n <- 100
N <- n*m
#X <- cbind(1,runif(N))
X <- cbind(1,rnorm(N))
X <- cbind(runif(N),rnorm(N))
id <- rep(1:n,each=m)
#
Z <- kronecker(diag(n),rep(1,m))
#Possion with group level heterogeneity
z <- rpois(N, exp(X%*%matrix(c(1,2)) + Z%*%matrix(rnorm(n))))
#2*rnorm(n*m) is added to each observation to create overdispersion
z.overdis <- rpois(N, exp(X%*%matrix(c(1,2)) + Z%*%matrix(rnorm(n)) +
2*rnorm(n*m)))
#without observation-level random shock i.e.,...
2009 Apr 11
0
Sean / Re: question related to fitting overdispersion count data using lmer quasipoisson
...dvance.
-Sean
#data simulation (modified from code at
http://markmail.org/message/j3zmgrklihe73p4p)
set.seed(100)
m <- 5
n <- 100
N <- n*m
#X <- cbind(1,runif(N))
X <- cbind(1,rnorm(N))
X <- cbind(runif(N),rnorm(N))
id <- rep(1:n,each=m)
#
Z <- kronecker(diag(n),rep(1,m))
#Possion with group level heterogeneity
z <- rpois(N, exp(X%*%matrix(c(1,2)) + Z%*%matrix(rnorm(n))))
#2*rnorm(n*m) is added to each observation to create overdispersion
z.overdis <- rpois(N, exp(X%*%matrix(c(1,2)) + Z%*%matrix(rnorm(n)) +
2*rnorm(n*m)))
#without observation-level random shock i.e.,...
2002 May 13
1
GLM questions
Hi
I'm doing a glm analysis and I have two doubts (at least :)
1) When I run the function it gives a lot of warnings (see below) what
they mean ? (may be I'm ignorant about this analysis ...)
glm.poisson<-glm(log(Jkij+1)~fac.ano+fac.tri+fac.icesr+fac.mat+fac.ano:fac.icesr+fac.ano:fac.tri,family=poisson())
warnings()
40: non-integer x = 1.252763
41: non-integer x = 1.864785
42:
2010 Nov 03
2
multivariate Poisson distribution
Hello, from a search of the archives and functions, I am looking for information on creating random correlated counts from a multivariate Poisson distribution. I can not seem to find a function that does this. Perhaps, it has not yet been created. Has anyone created an R package that does this.
thanks,
Jourdan Gold
[[alternative HTML version deleted]]