similar to: simulation with "rpois"

Displaying 20 results from an estimated 900 matches similar to: "simulation with "rpois""

1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the order of the arguments. This is an example: > rpois(n=1,lambda=2) [1] 3 > rpois(lambda=2,n=1) [1] 2 0 It obviously uses the first argument as the number of samples to be drawn, which is wrong. I used Version 0.49 Beta (April 23, 1997). Fredrik
1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the order of the arguments. This is an example: > rpois(n=1,lambda=2) [1] 3 > rpois(lambda=2,n=1) [1] 2 0 It obviously uses the first argument as the number of samples to be drawn, which is wrong. I used Version 0.49 Beta (April 23, 1997). Fredrik
2007 Oct 10
5
chi2
Hello, I want to use the quantile function so I read the doc but I don't understand with this > qchisq(seq(0.05,0.95,by=0.05),df=(length(don)-1)) [1] 62667.11 62795.62 62882.42 62951.47 63010.74 63064.00 63113.39 63160.27 63205.65 63250.33 63295.04 63340.48 63387.48 63437.03 63490.53 63550.14 63619.68 [18] 63707.24 63837.16 Can you help me please?
2012 Nov 13
1
Simulation with cpm package
Hi, I am running the following code based on the cpm vignette's code. I believe the code is syntactically correct but it just seems to hang R. I can get this to run if I set the sims to 100 but with 2000 it just hangs. Any ideas why? Thanks, Chris library(cpm) cpmTypes <- c("Kolmogorov-Smirnov","Mann-Whitney","Cramer-von-Mises") changeMagnitudes <- c(1, 2,
2005 Dec 13
8
superimpose density line over hist
Hi all, I'm trying to superimpose a rchisq density line over a histogram with something like: hist(alnlength) lines(density(rchisq(length(alnlength), 4)),col="red") But the rchisq line won't appear anywhere, Anyone knows what I am missing here? Thanks in advance, Albert.
2012 Dec 04
3
monte carlo simulation on R
Hello, How can I make a monte carlo simulation on R? Regards Adel -- PhD candidate in Computer Science Address 3 avenue lamine, cité ezzahra, Sousse 4000 Tunisia tel: +216 97 246 706 (+33640302046 jusqu'au 15/6) fax: +216 71 391 166 [[alternative HTML version deleted]]
2015 Oct 23
3
resolución de ecuación
Se ha borrado un adjunto en formato HTML... URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20151023/300f7387/attachment.html>
2010 Aug 17
2
plotting functions of chi square
Hi! This is going to be a real newbie question, but I can't figure it out. I'm trying to plot densities of various functions of chi-square. A simple chi-square plot I can do with dchisq(). But e.g. chi.sq/degrees of freedom I only know how to do using density(rchisq()/df). For example: plot(1, type="n", xlab="", ylab="", xlim=c(0,2), ylim=c(0,7)) for (i
2012 Aug 22
2
Samba4 successful deployment
I've just installed samba4 beta 7 with defaults and everything went OK. As I download bind9.9.1 tarball and compiled it I had to follow steve's advice: to declare we'll be using DLZ_DLOPEN_VERSION 2 in /samba-master/source4/dns_server/dlz_minimal.h /*#ifdef BIND_VERSION_9_8 #define DLZ_DLOPEN_VERSION 1 #else #define DLZ_DLOPEN_VERSION 2 #endif */ #define DLZ_DLOPEN_VERSION 2 I
2006 Jul 01
1
noncentral F-distributed random numbers (PR#9055)
Full_Name: Long Qu Version: 2.3.1 OS: Windows XP Submission from: (NULL) (64.113.93.235) The QQ-plot of two versions of simulating noncentral F-distributed random numbers has quite different scales: > qqplot(rf(1000,2,15,3),qf(runif(1000),2,15,3)) The rf() function reads: > rf function (n, df1, df2, ncp = 0) { if (ncp == 0) .Internal(rf(n, df1, df2)) else rchisq(n, df1,
2010 Nov 07
3
Integrate and mapply
Hi, I need some help on integrating a function that is a vector. I have a function - vector which each element is different. And, naturally, function integrate() does not work I checked the article of U. Ligges and J. Fox (2008) about code optimization "How Can I Avoid This Loop or Make It Faster?" on http://promberger.info/files/rnews-vectorvsloops2008.pdf. Their advice did not help
2012 Sep 03
3
Windows boxes cannot find the file server
Hi I have a Samba4 AD running samba and a Samba3 machine joined to the domain as a file server. I have smbd and winbind running on the samba3 box. Samba4: hh30.hh3.site Samba3: hh32.hh3.site I can browse the shares (netlogon and sysvol) on the S4 machine by typing \\hh30 into explorer but if I type \\hh32 I get: Windows cannot find '\\hh32'. Check the spelling. . .etc. When I start
2006 Dec 19
3
Bug in rt() ? (PR#9422)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 <<insert bug report here>> Reproduced on Debian and Windows ... On 2.4.x if you execute set.seed(12345) t.1 <- rt(n = 1000, df = 20) set.seed(12345) t.2 <- rt(n = 1000, df = 20, ncp = 0) all.equal(t.1, t.2) ## Not close to true This appears to be due to the fact that in 2.4.x rt is now rt function (n, df, ncp = 0) { if
2002 Jun 13
3
Bug in rnorm. (PR#1664)
There appears to be a mild bug, or at least a deficiency, in rnorm. The bug becomes apparent when one looks at extremes of the squares of the values generated by rnorm; rnorm is not generating quite enough extreme values. The R version that I am using is 1.4.1; I never got around to installing 1.5.0, and now since 1.5.1 is about to come out .... However, checking the 1.5.0 release notes
2008 Jul 08
4
Histogram with colors according to factor
Given a data frame with a continuous variable and a factor. I would like to generate a histogram of the continuous variable, where each bar is filled with different colors according to the percentage of factor values falling into this region of the continuous variable. I looked into packages like 'lattice' and 'ggplot2'. Searching R-help revealed that 'histogram' is
2008 Oct 20
2
folded normal distribution in R
Dear R useRs, i wanted to ask if the folded normal destribution (Y = abs(X) with X normal distributed) with density and random number generator is implemented in R or in any R-related package so far? Maybe i can use the non-central chi-square distribution and rchisq(n, df=1, ncp>0) here? Thanks and best regards Andreas
2010 Aug 16
1
lm prediction strange error
Dear all, I have an error in the simple prediction function for lm(). Maybe someone experienced the same? xma <- matrix(data = 0, nrow = 100, ncol = 2) xma[, 1] <- rnorm(100) xma[, 2] <- rchisq(100, df = 3) m1 <- lm(xma[, 1] ~ xma[, 2]) predict(m1, as.data.frame(seq(-13, 13, 0.5))) Thanks a lot, Trafim [[alternative HTML version deleted]]
2012 Nov 30
3
protentially serious R error
Hi guy, I have recently encountered a problem while I was just trying to generate some random numbers with the function "rnorm", the problem is shown below: ########case 1############ > rnorm(20*0.2) [1] -1.2765922 -0.5732654 -1.2246126 -0.4734006 ########case 2########### *> rnorm(20*(1-0.8)) [1] -0.62036668 0.04211587 -0.91092165* #########case 3############ > a<-0.2 >
2006 Jun 30
1
Random numbers from noncentral t-distribution
Hi there: I'd thought these two versions of noncentral t-distribution are essentially the same: > qqplot(rt(1000,df=20,ncp=3),qt(runif(1000),df=20,ncp=3)) But, the scales of the x-axis and the y-axis are quite different according to the QQ-plot. Did I make any mistakes somewhere? Thanks, Long ---------------------------------
2003 Dec 07
5
A hint to start ESS-xemacs
I'm trying to use ESS & xemacs under debian linux testing and KDE. My problem is that I didn't find any document in the internet explaining a **step by step** session with R and xemacs. The (wrong) procedure I follow (to no avail!) is: 1) I start R in a terminal window; 2) I start xemacs and open a file with the extension .R (test.R); 3) I issue M-x R RET and I can see an Rd new