Displaying 20 results from an estimated 2000 matches similar to: "simulation"
2007 May 01
2
Simulation using parts of density function
Hi
My simulation with the followin R code works perfectly:
sim <- replicate(999, sum(exp(rgamma(rpois(1,2000), scale = 0.5, shape = 12))))
But now I do not want to have values in object "sim" exceeding 5'000'000, that means that I am just using the beginning of densitiy function gamma x < 15.4. Is there a possibility to modify my code in an easy way?
Thanks for any help!
2012 Mar 16
2
Elegant Code
Hi,
Can anyone help to write a more elegant version of my code? I am sure
this can be put into a loop but I am having trouble creating the
objects b1,b2,b3,...,etc.
b1 <- rigamma(50,1,1)
theta1 <- rgamma(50,0.5,(1/b1))
sim1 <- rpois(50,theta1)
b2 <- rigamma(50,1,1)
theta2 <- rgamma(50,0.5,(1/b2))
sim2 <- rpois(50,theta2)
b3 <- rigamma(50,1,1)
theta3 <-
2007 May 03
0
unscrible pls
On 5/2/07, r-help-request@stat.math.ethz.ch <
r-help-request@stat.math.ethz.ch> wrote:
>
> Send R-help mailing list submissions to
> r-help@stat.math.ethz.ch
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://stat.ethz.ch/mailman/listinfo/r-help
> or, via email, send a message with subject or body 'help' to
>
2000 Feb 15
1
rpois gives a large number repeatedly (PR#439)
Full_Name: Kjetil Kjernsmo
Version: 0.65.1
OS: Digital UNIX 4.0
Submission from: (NULL) (129.240.28.172)
I'm experiencing problems with rpois. Occasionally, it draws a very high
number.
Yeah, I know, this is statistics, things like that does happen, but this really
strange because a poisson distribution with a parameter of 3 shouldn't see the
number 1932 very often, but the same,
2009 Dec 30
1
Fwd: Negbin Error Warnings
Dear Clara,
Thanks for the reply. I am forwarding your message to the list, ok.
When I wrote was a way of get further information to help the helpers.
happy holidays,
milton
---------- Forwarded message ----------
From: Clara Brück <clara_brueck@web.de>
Date: 2009/12/30
Subject: Re: [R] Negbin Error Warnings
To: milton ruser <milton.ruser@gmail.com>
Dear Milton,
Thanks for
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
2005 Nov 30
1
RNG stuck via Fortran call
Having not much success with my previous question I try to reformulate it:
I'm simulating a Markow chain in Fortran interfaced with R.
Each loop of my Fortran calls various functions of the R RNG through
the wrapper given below.
In a run of 100 iterations of the Markov kernel,
after 20 iterations, the RNG seems like frozen.
For example, the first call to the RNG in my loop is:
2002 Oct 08
2
temporal simulation
Hello,
I am new to R and was wondering if anybody would be able to advice me
on the following query. Is there any package available to generate a
mixed Poisson process, temporal data, using R? If anybody has
accomplished this before or has any advice I would appreciate it.
Regards,
Elaine Hand
--
Elaine Hand
Department of Community Health & General Practice
Trinity College Dublin
2006 Nov 01
0
Misunderstanding samba [homes]
Samba do the -right- mapping of home-dirs to [homes] share
-without- knowing th name of the users???
I'll try to explain:
I have 2 winxp clients and a debian server with
dpkg -l|grep samba
ii samba 3.0.23c-2
running.
the name of the xp boxes is borg, dir
the users working there are gusi, brigitte
gusi have a passwd (on the xp box), Linux account and samba-passwd - all
the
2013 Apr 02
4
Samba4 migration
I have a question ...
How can I migrate existing LDAP users ( or schemas) on Ubuntu 10.04.2 to the
new Samba4 (Ubuntu 12.04.2) server?
Does anyone have an idea?
Thanks for support
Alex
--
View this message in context: http://samba.2283325.n4.nabble.com/Samba4-migration-tp4646168.html
Sent from the Samba - General mailing list archive at Nabble.com.
2005 Nov 30
2
R binomial RNG stuck at 1 via Fortran call
Hi,
I have some trouble with the result of a fortran function calling the R
binomial RNG:
The C function rbinom is wrapped as in the file attached.
My main fortran program starts as
call rndstart()
and ends as
call rndend()
I happen to call the binomial RNG within a loop as
b = ggrbinom(1.d0,0.5d0)
write(*,*) 'b=',b
In certain cases, after a few iterations in the loop,
b get
2009 Mar 17
3
R does not compile any more on FreeBSD 8.0-CURRENT
On a recent FreeBSD 8.0-CURRENT (i386) building R (any version) breaks
with the following messages:
----------------------------------------------------------------------
[...snip...]
gcc -std=gnu99 -I. -I../../src/include -I../../src/include
-I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c wilcox.c -o wilcox.o
gcc -std=gnu99 -I. -I../../src/include -I../../src/include
-I/usr/local/include
2003 Feb 24
5
XP irratic delay in opening files....
Hi all
I am fairly new to samba and XP. I have a client who we set up a samba
server for, they are complaining about documents taking about 30 secs
-2-3mins to open but only sometimes (it can be very frequent). I have
seen this and captured a piece of the log file I wonder if any one can
make any sense of it...
I have been looking on the net and trying various things all day but to
no avail...
2004 Feb 05
5
rgamma question
I was trying to generate random numbers with a gamma distribution. In R the
function is:
rgamma(n, shape, rate = 1, scale = 1/rate). My question is that if
X~gamma(alpha, beta) and I want to generate one random number where do I
plug alpha and beta in rgamma? and, what is the meaning and use of rate?
Thanks for your attention,
Jorge
[[alternative HTML version deleted]]
2008 Jul 07
4
Plot Mixtures of Synthetically Generated Gamma Distributions
Hi,
I have the following vector
which is created from 3 distinct distribution (three components) of gamma:
x=c(rgamma(30,shape=.2,scale=14),rgamma(30,shape=12,scale=10),rgamma(30,shape=5,scale=6))
I want to plot the density curve of X, in a way that it shows
a distinct 3 curves that represent each component.
How can I do that?
I tried this but doesn't work:
lines(density(x))
Please
2006 Nov 02
2
simulation with "rpois"
Hi there, I need some helpo with one simulation.
I have a matrix of 4x21
I want ro generate 100 random Chi2 distribution but inly from the first
row of my matrix.
This is what I try:
Option (a):
>lambda=1:100
>f=function(x)chisq(4,0,x)
>lapply(lambda,f)
It doesn't work!
option(b):
>m=mean(matrix[1,])
>x<-rpois(100,lambda=m)
Works, but only generates a row of 25 values.
2005 Jul 27
7
gamma distribution
Hi R Users
This is a code I wrote and just want to confirm if the first 1000 values are raw
gamma (z) and the next 1000 values are transformed gamma (k) or not. As I get
2000 rows once I import into excel, the p - values beyond 1000 dont look that
good, they are very high.
--
sink("a1.txt");
for (i in 1:1000)
{
x<-rgamma(10, 2.5, scale = 10)
y<-rgamma(10, 2.5, scale = 10)
2012 Jul 14
2
rgamma function
Hi,
Has anyone encountered the problem of rgamma function in C? The
following simplified program always dies for me, and I wonder if anyone
can tell me the reason.
#include <Rmath.h>
#include <time.h>
#include <Rinternals.h>
SEXP generateGamma ()
{
srand(time(NULL));
return (rgamma(5000,1));
}
Has anyone encountered a similar problem before? Is there another way
2000 Apr 14
1
rgamma with negative shape and scale parameters works?
Dear R people,
This is a possibly silly question, but the rgamma function takes the shape
and scale arguments and simulates gamma rvs corresponding to those values,
right? But the shape and scale parameters have to be positive, right?
However, rgamma quite happily returns to me values for negative values of
shape and scale, and in some cases returns negative values eg.
> rgamma(1, 1, -1)
[1]