similar to: Sample Poisson Distribution

Displaying 20 results from an estimated 2000 matches similar to: "Sample Poisson Distribution"

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
2011 Dec 06
2
Why can't I figure this out? :S
Hi, so I don't speak computer and I have no idea what this code is telling the program to do, but I apparently need to be able to find and isolate influencial observations. Problem, I have no idea what the error means and where it may be from in the code. error I get is below the code { ## OLS results NameC<- lm(gpanew~female+female:lastinit+agenew+canadian+mom_ed+yearstudy) ## default:
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)
2003 Feb 10
2
problems using lqs()
Dear List-members, I found a strange behaviour in the lqs function. Suppose I have the following data: y <- c(7.6, 7.7, 4.3, 5.9, 5.0, 6.5, 8.3, 8.2, 13.2, 12.6, 10.4, 10.8, 13.1, 12.3, 10.4, 10.5, 7.7, 9.5, 12.0, 12.6, 13.6, 14.1, 13.5, 11.5, 12.0, 13.0, 14.1, 15.1) x1 <- c(8.2, 7.6,, 4.6, 4.3, 5.9, 5.0, 6.5, 8.3, 10.1, 13.2, 12.6, 10.4, 10.8, 13.1, 13.3, 10.4, 10.5, 7.7, 10.0, 12.0,
2009 Jan 17
2
Confidence Interval
I am new to R and Im some trouble with the following question... Generate 100 standard normal N(0,1) samples of size 100, X1(k),...,X100(k) where k=1,...,100 (The k is and indicie in brackets) Calculate the sample mean for each sample. For each sample mean Xbark the 0.95-confidence interval for the mean mew=0 is given by... Ik= ( Xbark plus or minus 1.96/10) Find the number of intervals such
2003 Jun 18
1
Ltsreg and nsamp="exact"
I'm trying to use least trimmed squares using ltsreg with nsamp="exact". When I use the following: rg <- ltsreg(x,y,nsamp="exact") I get: Error in lqs.default(x, y, nsamp = "exact", method = "lts") : NAs in foreign function call (arg 10) In addition: Warning message: NAs introduced by coercion Incidentally, there are no missings in x or y,
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
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
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 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 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)))
2006 Apr 27
1
? bug in 'sample' (PR#8813)
I have found that specifying different "sizes" in the sample command has a funny effect on the random sampling. The code below is a condensed version of a function I wrote to simulate a bootstrap method. For simplicity, I eliminated the internal bootstrap loop, but kept a statement to draw one bootstrap sample, because this is where the problem occurs. The output (mean(y)^2) should be
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
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
2004 Sep 04
1
Append Columns
Dear all, Can I use "write.table" to append columnns? Thanks for any help -MY [[alternative HTML version deleted]]
2003 Aug 26
2
Simple simulation in R
Hello all I have a feeling this is very simple......but I am not sure how to do it My boss has two variables, one is an average of 4 numbers, the other is an average of 3 of those numbers i.e var1 = (X1 + X2 + X3 + X4)/4 var2 = (X1 + X2 + X3)/3 all of the X variables are supposed to be measuring similar constructs not surprisingly, these are highly correlated (r = .98), the question is how
2004 May 14
1
help with memory greedy storage
Hello, I've a problem with a self written routine taking a lot of memory (>1.2Gb). Maybe you can suggest some enhancements, I'm pretty sure that my implementation is not optimal ... I'm creating many linear models and store coefficients, anova p-values ... all I need in different lists which are then finally returned in a list (list of lists). The input is a matrix with 84 rows
2009 Nov 12
2
A combinatorial optimization problem: finding the best permutation of a complex vector
Hi, I have a complex-valued vector X in C^n. Given another complex-valued vector Y in C^n, I want to find a permutation of Y, say, Y*, that minimizes ||X - Y*||, the distance between X and Y*. Note that this problem can be trivially solved for "Real" vectors, since real numbers possess the ordering property. Complex numbers, however, do not possess this property. Hence the
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))