[R] How does the r-distribution function work

2007-07-06 Thread pieter claassen
I am trying to understand what rbinom function does. Here is some sample code. Are both the invocations of bfunc effectively doing the same or I am missing the point? Thanks, Pieter bfunc - function(n1,p1,sims) { c-rbinom(sims,n1,p1) c } a=c() b=c() p1=.5 for (i in 1:1){

Re: [R] How does the r-distribution function work

2007-07-06 Thread Peter Dalgaard
pieter claassen wrote: I am trying to understand what rbinom function does. Here is some sample code. Are both the invocations of bfunc effectively doing the same or I am missing the point? There are some newbie issues with your code (you are extending a on every iteration, and your

Re: [R] How does the r-distribution function work

2007-07-06 Thread matthew5555
Hi, I have a problem. how can I solve a problem without t.test for example: x-c(1,2,3,4,5,6) y-c(7,8,9) t.test(x,y,alternative=less,paired=FALSE,var.equal=TRUE,con.level=0.95) sorry for my english :) -- View this message in context: http://www.nabble.com/How-does-the-r-distribution

[R] distribution graph

2007-06-12 Thread Wentzel-Larsen, Tore
The following gives two functions for producing distribution graphs: distribution-graph produces a single graph, and multiple.distribution.graph produces a number of graphs side by side. Regards, Tore Wentzel-Larsen statistician Centre for Clinical research Armauer Hansen house Haukeland

[R] distribution of peaks in random data results

2007-05-31 Thread João Fadista
Dear all, I have the positions of N points spread through some sequence of length L (LN), and I would like to know how can do the following: 1- Permute the positions of the N points along the whole sequence. Assuming a uniform distribution I did: position1 - runif(N, 1, L) 2- Apply a

[R] distribution graph

2007-03-23 Thread Plessen, Christian von
I am looking for a way to produce a distribution graph as in the example: (http://cecsweb.dartmouth.edu/release1.1/datatools/dgraph.php?year=2003geotype=STD_HRRevent=A01_DISeventtype=UTIL Anybody who can help? Christian von Plessen Department of Pulmonary Medicine Haukeland university

Re: [R] distribution graph

2007-03-23 Thread Michael Kubovy
?violinplot (You need to install the UsingR package first.) On Mar 23, 2007, at 4:06 AM, Plessen, Christian von wrote: I am looking for a way to produce a distribution graph as in the example: (http://cecsweb.dartmouth.edu/release1.1/datatools/dgraph.php?

Re: [R] distribution graph

2007-03-23 Thread Ted Harding
On 23-Mar-07 11:06:49, Plessen, Christian von wrote: I am looking for a way to produce a distribution graph as in the example: (http://cecsweb.dartmouth.edu/release1.1/datatools/dgraph.php?year=2003; geotype=STD_HRRevent=A01_DISeventtype=UTIL Anybody who can help? Christian von

Re: [R] distribution graph

2007-03-23 Thread Marc Schwartz
On Fri, 2007-03-23 at 14:22 +, [EMAIL PROTECTED] wrote: [Apologies -- there were errors in the code I posted previously. A corrected version is below] On 23-Mar-07 11:06:49, Plessen, Christian von wrote: I am looking for a way to produce a distribution graph as in the example:

Re: [R] distribution graph

2007-03-23 Thread Ted Harding
On 23-Mar-07 16:55:40, Marc Schwartz wrote: [...] How about something like this: DistPlot - function(x, digits = 1, ...) { x - round(x, digits) Tab - table(x) Vals - sapply(Tab, function(x) seq(x) - mean(seq(x))) X.Vals - unlist(Vals, use.names = FALSE) tmp -

[R] distribution overlap - how to quantify?

2007-01-25 Thread Doktor, Daniel
Dear R-Users, my objective is to measure the overlap/divergence of two probability density functions, p1(x) and p2(x). One could apply the chi-square test or determine the potential mixture components and then compare the respective means and sigmas. But I was rather looking for a simple measure

Re: [R] distribution of daily rainfall values in binned categories

2006-06-28 Thread Martin Maechler
] To: r-help@stat.math.ethz.ch Subject: [R] distribution of daily rainfall values in binned categories Date: Tue, 27 Jun 2006 11:28:59 -0700 (PDT) Hi, I'm a newbie in using R and I would like to have a few clues as to how I could compute and plot a distribution

Re: [R] distribution of daily rainfall values in binned categories

2006-06-28 Thread Francisco J. Zagmutt
PROTECTED] Reply-To: Martin Maechler [EMAIL PROTECTED] To: Francisco J. Zagmutt [EMAIL PROTECTED] CC: [EMAIL PROTECTED], r-help@stat.math.ethz.ch Subject: Re: [R] distribution of daily rainfall values in binned categories Date: Wed, 28 Jun 2006 10:39:58 +0200 FJZ == Francisco J Zagmutt [EMAIL

Re: [R] questions on local customized R distribution CD

2006-06-27 Thread Liaw, Andy
From: Duncan Murdoch On 6/26/2006 3:14 PM, Dongseok Choi wrote: Hello all! I hope this is the right place to post this question. The Oregon Chapter of ASA is working with local high school teachers as one of its outreaching program. We hope to use and test R as

Re: [R] questions on local customized R distribution CD

2006-06-27 Thread Prof Brian Ripley
On Tue, 27 Jun 2006, Liaw, Andy wrote: From: Duncan Murdoch On 6/26/2006 3:14 PM, Dongseok Choi wrote: Hello all! I hope this is the right place to post this question. The Oregon Chapter of ASA is working with local high school teachers as one of its outreaching program. We hope

Re: [R] questions on local customized R distribution CD

2006-06-27 Thread Duncan Murdoch
On 6/27/2006 8:05 AM, Liaw, Andy wrote: From: Duncan Murdoch On 6/26/2006 3:14 PM, Dongseok Choi wrote: Hello all! I hope this is the right place to post this question. The Oregon Chapter of ASA is working with local high school teachers as one of its outreaching

[R] distribution of daily rainfall values in binned categories

2006-06-27 Thread etienne
Hi, I'm a newbie in using R and I would like to have a few clues as to how I could compute and plot a distribution of daily rainfall intensity in different categories. I have daily values (mm/day) for several years and I need to show the frequency of 0-1, 1-2.5, 2.5-5, 5-10, 10-20, 20+ mm/day.

Re: [R] distribution of daily rainfall values in binned categories

2006-06-27 Thread Jim Porzak
?hist read about breaks On 6/27/06, etienne [EMAIL PROTECTED] wrote: Hi, I'm a newbie in using R and I would like to have a few clues as to how I could compute and plot a distribution of daily rainfall intensity in different categories. I have daily values (mm/day) for several years

Re: [R] distribution of daily rainfall values in binned categories

2006-06-27 Thread Francisco J. Zagmutt
@stat.math.ethz.ch Subject: [R] distribution of daily rainfall values in binned categories Date: Tue, 27 Jun 2006 11:28:59 -0700 (PDT) Hi, I'm a newbie in using R and I would like to have a few clues as to how I could compute and plot a distribution of daily rainfall intensity in different categories. I have

[R] questions on local customized R distribution CD

2006-06-26 Thread Dongseok Choi
Hello all! I hope this is the right place to post this question. The Oregon Chapter of ASA is working with local high school teachers as one of its outreaching program. We hope to use and test R as teaching tools. So, we think that a menu system (like R commander) with a few packages

Re: [R] questions on local customized R distribution CD

2006-06-26 Thread Duncan Murdoch
On 6/26/2006 3:14 PM, Dongseok Choi wrote: Hello all! I hope this is the right place to post this question. The Oregon Chapter of ASA is working with local high school teachers as one of its outreaching program. We hope to use and test R as teaching tools. So, we think that a

[R] Distribution Fitting

2006-05-26 Thread Lorenzo Isella
Hi, I know this is a bit off-topic, but I am quite puzzled. I am going through several papers about aerosol physics and in this field you often have determine the parameters of a distribution to match your experimental data (one typically uses a Gaussian mixture). However, in many cases people

[R] Distribution Identification/Significance testing

2006-05-23 Thread Sachin J
Hi, What are methods for identifying the right distribution for the dataset? As far as I know Fisher test (p alpha) for stat. significance or min(square error) are two criteria for deciding. What are the other alternatives? - CONFIDENCE INTERVAL?. If any, how can I accomplish them in R.

Re: [R] distribution of the product of two correlated normal

2006-04-25 Thread Peter Ruckdeschel
Yu, Xuesong schrieb: Many thanks to Peter for your quick and detailed response to my question. I tried to run your codes, but seems like u is not defined for functions fp and fm. what is u? I believe t=X1*X2 nen0 - m2+c0*u ## for all u's used in integrate: never positive no, this is

Re: [R] distribution of the product of two correlated normal

2006-04-24 Thread Peter Ruckdeschel
Yu, Xuesong writes: Does anyone know what the distribution for the product of two correlated normal? Say I have X~N(a, \sigma1^2) and Y~N(b, \sigma2^2), and the \rou(X,Y) is not equal to 0, I want to know the pdf or cdf of XY. Thanks a lot in advance. There is no closed-form expression

[R] distribution of the product of two correlated normal

2006-04-23 Thread Yu, Xuesong
Hi, Does anyone know what the distribution for the product of two correlated normal? Say I have X~N(a, \sigma1^2) and Y~N(b, \sigma2^2), and the \rou(X,Y) is not equal to 0, I want to know the pdf or cdf of XY. Thanks a lot in advance. yu [[alternative HTML version deleted]]

[R] distribution maps

2006-01-06 Thread Rogério Rosa da Silva
Dears, I would like to know if there is a R package(s) on CRAN that can generate distribution maps of species. I think that this issue not has been discussed, but I did not search extensively on CRAN or help archives. Best regards Rogério __

Re: [R] distribution maps

2006-01-06 Thread Roger Bivand
On Fri, 6 Jan 2006, Rogério Rosa da Silva wrote: Dears, I would like to know if there is a R package(s) on CRAN that can generate distribution maps of species. I think that this issue not has been discussed, but I did not search extensively on CRAN or help archives. Could I suggest

Re: [R] Distribution fitting problem

2005-11-08 Thread Bernardo Rangel Tura
At 10:32 2/11/2005, you wrote: I am using the MASS library function fitdistr(x, dpois, list(lambda=2)) but I get Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) : Function cannot be evaluated at initial parameters In addition: There were 50 or more warnings (use warnings()

[R] Distribution fitting problem

2005-11-02 Thread Mark Miller
I am using the MASS library function fitdistr(x, dpois, list(lambda=2)) but I get Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) : Function cannot be evaluated at initial parameters In addition: There were 50 or more warnings (use warnings() to see the first 50) and all

Re: [R] Distribution fitting problem

2005-11-02 Thread Dieter Menne
Mark Miller mmiller at nassp.uct.ac.za writes: I am using the MASS library function fitdistr(x, dpois, list(lambda=2)) but I get Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) : Function cannot be evaluated at initial parameters In addition: There were 50 or

Re: [R] Distribution fitting problem

2005-11-02 Thread Mark Miller
Can you advise another distribution, was thinking of exponential, but was advised poisson since independent, forgot about requiring integers On Wednesday 02 November 2005 14:44, you wrote: Mark Miller wrote: I am using the MASS library function fitdistr(x, dpois, list(lambda=2)) but

Re: [R] Distribution fitting problem

2005-11-02 Thread Adelchi Azzalini
On Wed, 2 Nov 2005 14:32:52 +0200, Mark Miller wrote: MM I am using the MASS library function MM MM fitdistr(x, dpois, list(lambda=2)) MM MM but I get MM MM Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) : MM Function cannot be evaluated at initial parameters MM In

Re: [R] Distribution fitting problem

2005-11-02 Thread Sundar Dorai-Raj
Hi, Mark, Not without seeing you data. You only provide the first value is a warning message below. --sundar Mark Miller wrote: Can you advise another distribution, was thinking of exponential, but was advised poisson since independent, forgot about requiring integers On Wednesday 02

Re: [R] Distribution

2005-02-21 Thread Sean Davis
the bioconductor project (www.bioconductor.org). Hope this helps, Sean - Original Message - From: Srinivas Iyyer [EMAIL PROTECTED] To: Rhelp r-help@stat.math.ethz.ch Sent: Monday, February 21, 2005 6:21 PM Subject: [R] Distribution Dear group, apologies for asking a simple question. I have

Re: [R] Distribution

2005-02-21 Thread Spencer Graves
Have you considered qqnorm or hist? If yes, PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html;. It might help you phrase your question so you are more likely to get a useful response -- and it might help you get the answer for yourself without waiting for

RE: [R] Distribution

2005-02-21 Thread Liaw, Andy
You can use table(cut(intensity, breaks)), where `intensity' is the vector of intensity values, and `breaks' are the boundaries of the bins (e.g., c(0, 150, 250, ...)). Andy From: Srinivas Iyyer Dear group, apologies for asking a simple question. I have a file where the data looks like

Re: [R] Distribution

2005-02-21 Thread Adaikalavan Ramasamy
from the bioconductor project (www.bioconductor.org). Hope this helps, Sean - Original Message - From: Srinivas Iyyer [EMAIL PROTECTED] To: Rhelp r-help@stat.math.ethz.ch Sent: Monday, February 21, 2005 6:21 PM Subject: [R] Distribution Dear group, apologies for asking

Re: [R] Distribution of Data (was: your reference on this problem highly appreciated)

2004-07-11 Thread Spencer Graves
There are many tools for this, e.g., qqnorm, density, and in library(MASS) fitdistr. Also do a literature search on transformations (especially to transformations to normality) and on mixture distributions, esp. Titterington, Smith and Makov (1986) Statistical Analysis of Finite Mixture

[R] distribution of second order statistic

2003-12-15 Thread Eugene Salinas (R)
Hi, I am getting some weird results here and I think I am missing something. I am trying to program a function that for a set of random variables drawn from uniform distributions plots that distribution of the second order statistic of the ordered variables. (ie I have n uniform distributions

Re: [R] distribution of second order statistic

2003-12-15 Thread Prof Brian Ripley
The order statistics have a beta distribution, so pbeta is all you need. On Mon, 15 Dec 2003, Eugene Salinas (R) wrote: I am getting some weird results here and I think I am missing something. I am trying to program a function that for a set of random variables drawn from uniform

[R] Distribution transformations

2003-11-23 Thread Viola Rossini
Dear R-Users, I have a question that bothers me in the last few days. It is supposed to be easy but I can't come up with a solution. Are there any functions in R dealing with transforming empirical and parametric distributions? I have two data sets of observed variables that I want to transform

Re: [R] Distribution transformations

2003-11-23 Thread Rolf Turner
You wrote: Dear R-Users, I have a question that bothers me in the last few days. It is supposed to be easy but I can't come up with a solution. Are there any functions in R dealing with transforming empirical and parametric distributions? I have two data sets of observed variables that I

Re: [R] Distribution transformations

2003-11-23 Thread Spencer Graves
For the uniform distribution, have you considered something like (((1:n)-0.5)/n))[order(x)]? For the Frechet distribution, a search - R site search from www.r-project.org exposed something that should help. The information you need seems to be there. hope this helps. spencer

Re: [R] Distribution transformations

2003-11-23 Thread Viola Rossini
I am still not getting it. I am trying to understand multivariate distributions and copulas. In the beginning of each article it is said that the observed data must be transformed to uniform or frechet distribution by means of probability integral transform. Apparently this is something easy

Re: [R] Distribution transformations

2003-11-23 Thread kjetil
On 23 Nov 2003 at 19:35, Viola Rossini wrote: The frechet dirtribution is in the evd (extreme value dist) package on CRAN. The basic preinciple is that if U is uniform (0,1) anf F is a cumulative distrubution function, then F^{-1}(U) is distributed as F. Kjetil Halvorsen I am still not

Re: [R] Distribution transformations

2003-11-23 Thread Peter Dalgaard
[EMAIL PROTECTED] writes: On 23 Nov 2003 at 19:35, Viola Rossini wrote: The frechet dirtribution is in the evd (extreme value dist) package on CRAN. The basic preinciple is that if U is uniform (0,1) anf F is a cumulative distrubution function, then F^{-1}(U) is distributed as F.