similar to: simulation from truncated poisson

Displaying 20 results from an estimated 30000 matches similar to: "simulation from truncated poisson"

2010 Nov 09
2
simulation from pareto distn
Dear all, I am trying to simulate from truncated Pareto distribution. I know there is a package called PtProcess for Pareto distribution...but it is not for truncated one. Can anyone please help me with this? Thanks in advance. Cassie [[alternative HTML version deleted]]
2005 May 01
2
simulate zero-truncated Poisson distribution
Dear All I would like to know whether it is possible with R to generate random numbers from zero-truncated Poisson distribution. Thanks in advance, Galina
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
2011 Apr 08
4
Simulation from discrete uniform
Dear all, I am trying to simulate from discrete uniform distribution. But I could not find any in-built code in R. Could anyone help me please? Thanks in advance for the time and help. Cassie [[alternative HTML version deleted]]
2003 Apr 08
1
truncated poisson in glm / glmmPQL
Hi I'm a postgrad in ecology, and have recently started to use R. I'm planning to model various sets of animal abundance (i.e. count) data in relation to habitat data using glm's and/or glmmPQL's. However, some of my potential response variables have many zeros. From what I gather the "family = ..." option in the command line does not allow for the direct
2009 Jul 14
1
Simulation functions for underdispered Poisson and binomial distributions
Dear R users I would like to simulate underdispersed Poisson and binomial distributions somehow. I know you can do this for overdispersed counterparts - using rnbinom() for Poisson and rbetabinom() for binomial. Could anyone share functions to do this? Or please share some tips for modifying existing functions to achieve this. Thank you very much for your help and time Shinichi
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]]
2010 Nov 14
2
replace a row in a matrix
Dear all, I created a n*2 matrix and I want to replace the ith row with a vector. Can anyone suggest me what is the simple way to do it? Sorry for bothering you with such simple question. I appreciate any hints or advice. Thanks in advance. Cassie [[alternative HTML version deleted]]
2007 Aug 27
0
Robust Standar Errors in Zero-Truncated Poisson
Hi. I would like to know if is it possible to estimate zero-truncated count models with robust standard errors in R. In Stata that is possible. I already made some searches and attempts but not obtained it. In R I made the estimation of the truncated poisson by the vglm command of VGAM package . -- View this message in context:
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))
2007 Sep 16
2
are hurdle logit-poisson model and posson model nested?
Dear Listers, I have a general statistical question. Are hurdle logit-poisson model and posson model nested? Thank you so much?
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
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",
2007 Jun 02
2
spatial simulation
Dear R-users, I'm trying to do some spatial simulation. I have two covariates, Z and C. I want to examine their relationship under different spatial distribution. I have no problem simulating completely spatial random process but I'm totally stuck on poisson (cluster) pattern. I already have a dataset with Z and C (obs=575) and I know the relationship between them. Using these 575
2007 Aug 02
1
simulate() and glm fits
Dear All, I have been trying to simulate data from a fitted glm using the simulate() function (version details at the bottom). This works for lm() fits and even for lmer() fits (in lme4). However, for glm() fits its output does not make sense to me -- am I missing something or is this a bug? Consider the following count data, modelled as gaussian, poisson and binomial responses: counts
2012 Apr 10
1
how to convert seconds to 12 hour time format
Hello everyone, I am wondering if there is any routine in R which can convert time given in 'seconds' unit to the 12 hour time format. For example, suppose the data set looks like x=c(36885,84000,20) #x in seconds I want to get the output as [1] " 11:14:45 AM" [2] " 11:20:00 PM" [3] "12:20:00 AM" Does anyone have any idea? Thanks in advance. Cassie
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
2019 Dec 27
2
"simulate" does not include variability in parameter estimation
Hello, All: ????? The default "simulate" method for lm and glm seems to ignore the sampling variance of the parameter estimates;? see the trivial lm and glm examples below.? Both these examples estimate a mean with formula = x~1.? In both cases, the variance of the estimated mean is 1. ??? ??????? * In the lm example with x0 = c(-1, 1), var(x0) = 2, and
2006 Aug 17
1
Simulate p-value in lme4
Dear list, This is more of a stats question than an R question per se. First, I realize there has been a lot of discussion about the problems with estimating P-values from F-ratios for mixed-effects models in lme4. Using mcmcsamp() seems like a great alternative for evaluating the significance of individual coefficients, but not for groups of coefficients as might occur in an experimental design
2006 Oct 08
1
Simulate p-value in lme4
Dear r-helpers, Spencer Graves and Manual Morales proposed the following methods to simulate p-values in lme4: ************preliminary************ require(lme4) require(MASS) summary(glm(y ~ lbase*trt + lage + V4, family = poisson, data = epil), cor = FALSE) epil2 <- epil[epil$period == 1, ] epil2["period"] <- rep(0, 59); epil2["y"] <- epil2["base"]