Crabb, David
2004-Aug-12 08:44 UTC
[R] Help with generating data from a 'not quite' Normal distriburtion
I would be very grateful for any help from members of this list for what might be a simple problem... We are trying to simulate the behaviour of a clinical measurement in a series of computer experiments. This is simple enough to do in R if we assume the measurements to be Gaussian, but their empirical distribution has a much higher peak at the mean and the distribution has much longer tails. (The distribution is quite symmetrical) Can anyone suggest any distributions I could fit to this data, and better still how I can then generate random data from this 'distribution' using R? ----------------------------------------------- Dr. David Crabb School of Science, The Nottingham Trent University, Clifton Campus, Nottingham. NG11 8NS Tel: 0115 848 3275 Fax: 0115 848 6690
Dimitris Rizopoulos
2004-Aug-12 08:50 UTC
[R] Help with generating data from a 'not quite' Normal distriburtion
Hi David,
you could try a Student's t distribution with appropriate degrees of
freedom and extra scale paremter, i.e.,
?rt
rgt <- function(n, mu=0, sigma=1, df=stop("no df arg"))
mu+sigma*rt(n,
df=df)
I hope this helps.
Best,
Dimitris
----
Dimitris Rizopoulos
Doctoral Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/396887
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
----- Original Message -----
From: "Crabb, David" <david.crabb at ntu.ac.uk>
To: <r-help at stat.math.ethz.ch>
Sent: Thursday, August 12, 2004 10:44 AM
Subject: [R] Help with generating data from a 'not quite' Normal
distriburtion
> I would be very grateful for any help from members of this list for
what> might be a simple problem...
>
> We are trying to simulate the behaviour of a clinical measurement in
a> series of computer experiments. This is simple enough to do in R if
we> assume the measurements to be Gaussian, but their empirical
distribution> has a much higher peak at the mean and the distribution has much
longer> tails. (The distribution is quite symmetrical) Can anyone suggest
any> distributions I could fit to this data, and better still how I can
then> generate random data from this 'distribution' using R?
>
> -----------------------------------------------
> Dr. David Crabb
> School of Science,
> The Nottingham Trent University,
> Clifton Campus, Nottingham. NG11 8NS
> Tel: 0115 848 3275 Fax: 0115 848 6690
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
Vito Ricci
2004-Aug-12 08:55 UTC
[R] Help with generating data from a 'not quite' Normal distriburtion
Hi, the Student's t distribution could be considered: it's symmetrical, but with a low number of degree of freedom is different from Normal distribution I think in the way you said:"has a much higher peak at the mean and the distribution has much longer tails. " Try to use: rt(n, df) where n=number of obs. df=degree of freedom. for samples simulations. Best Vito I would be very grateful for any help from members of this list for what might be a simple problem... We are trying to simulate the behaviour of a clinical measurement in a series of computer experiments. This is simple enough to do in R if we assume the measurements to be Gaussian, but their empirical distribution has a much higher peak at the mean and the distribution has much longer tails. (The distribution is quite symmetrical) Can anyone suggest any distributions I could fit to this data, and better still how I can then generate random data from this 'distribution' using R? ----------------------------------------------- Dr. David Crabb School of Science, The Nottingham Trent University, Clifton Campus, Nottingham. NG11 8NS Tel: 0115 848 3275 Fax: 0115 848 6690 ====Diventare costruttori di soluzioni Visitate il portale http://www.modugno.it/ e in particolare la sezione su Palese http://www.modugno.it/archivio/cat_palese.shtml
Vito Ricci
2004-Aug-12 08:59 UTC
[R] Help with generating data from a 'not quite' Normal distriburtion
Hi, Also the Cauchy's distribution could be good: rcauchy(n, location = 0, scale = 1) Best Vito I would be very grateful for any help from members of this list for what might be a simple problem... We are trying to simulate the behaviour of a clinical measurement in a series of computer experiments. This is simple enough to do in R if we assume the measurements to be Gaussian, but their empirical distribution has a much higher peak at the mean and the distribution has much longer tails. (The distribution is quite symmetrical) Can anyone suggest any distributions I could fit to this data, and better still how I can then generate random data from this 'distribution' using R? ----------------------------------------------- Dr. David Crabb School of Science, The Nottingham Trent University, Clifton Campus, Nottingham. NG11 8NS Tel: 0115 848 3275 Fax: 0115 848 6690 ====Diventare costruttori di soluzioni Visitate il portale http://www.modugno.it/ e in particolare la sezione su Palese http://www.modugno.it/archivio/cat_palese.shtml
Kahra Hannu
2004-Aug-12 13:06 UTC
[R] Help with generating data from a 'not quite' Normal distriburtion
Consider using the HyperbolicDist package. With the package you can both fit the hyperbolic distribution to your data and generate random numbers from the distribution. Hyperbolic distribution/s provide/s good fit to financial returns that commonly exhibit high peaks and heavy tails. Hannu Kahra -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Crabb, David Sent: Thursday, August 12, 2004 10:44 AM To: r-help at stat.math.ethz.ch Subject: [R] Help with generating data from a 'not quite' Normal distriburtion I would be very grateful for any help from members of this list for what might be a simple problem... We are trying to simulate the behaviour of a clinical measurement in a series of computer experiments. This is simple enough to do in R if we assume the measurements to be Gaussian, but their empirical distribution has a much higher peak at the mean and the distribution has much longer tails. (The distribution is quite symmetrical) Can anyone suggest any distributions I could fit to this data, and better still how I can then generate random data from this 'distribution' using R? ----------------------------------------------- Dr. David Crabb School of Science, The Nottingham Trent University, Clifton Campus, Nottingham. NG11 8NS Tel: 0115 848 3275 Fax: 0115 848 6690 ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html