Displaying 20 results from an estimated 5000 matches similar to: "many curves to the same plot"
2013 May 03
0
Empirica Copula
Dear users
I am reposting this and hope it will be accepted this time.
I am using copula package to fit my bivariate data and simulation. As
explained in package documentation we can use our own data distribution to
feed on copula as long as we have d, p and q (pdf, cdf and quantile)
functions are available. Hence my code for those are:
# Make the functions for data distribution
2012 Apr 24
2
Function from ecdf to ccdf
Dear all,
I would like to calculate the complementary cumulative distribution function. As it is known, the ccdf is the 1-ecdf(X)==1-F(x). (From ?ecdf help is shown that ecdf returns a function which is the F(x)
I would like to use that function inside my function and after call curve (which accepts function as input). My code looks like that
onVector<-seq(1:100)
2012 Mar 24
1
plotting with line types... bit confusing
Dear all,
I would like to print an empirical cdf on a vector I have
while the plot(ecdf(myVector)) works great when I try to specify the line type to be a line (I get points) with
plot(ecdf(myVector),type="lines")
Error in plot.default(NA, NA, type = "n", xlim = xlim, ylim = ylim, xlab = xlab, :
formal argument "type" matched by multiple actual arguments
I get
2012 May 26
1
Kolmogorov-Smirnov test and the plot of max distance between two ecdf curves
Hi all,
given this example
#start
a<-c(0,70,50,100,70,650,1300,6900,1780,4930,1120,700,190,940,
760,100,300,36270,5610,249680,1760,4040,164890,17230,75140,1870,22380,5890,2430)
length(a)
b<-c(0,0,10,30,50,440,1000,140,70,90,60,60,20,90,180,30,90,
3220,490,20790,290,740,5350,940,3910,0,640,850,260)
length(b)
out<-ks.test(log10(a+1),log10(b+1))
# max distance D
2012 Jul 02
1
Fitting and Plotting the fitted distributions
Dear all,
I have wrote some sample code that would allow me easier fit fast many distributions and check which of the fits performs better. My sample code (that you can of course execute it looks like that)
distrList<-list( "exponential", "geometric", "log-normal", "normal",
"Poisson")
fitfunction<-function(Type,x){
return
2002 Oct 15
1
Plotting two ecdf curves on same axes
Dear R listers
Could somebody please advise me how to draw two empirical cumulative distribution
functions on the same set of axes?
I know I should be using the ecdf command but I'm not sure what to add to it to force it
to plot twice on the axes
Thanks
Jane
______________________________________________________
Check out all the latest outrageous email attachments on the Outrageous Email
2012 May 04
1
Absolute cumulative curve with ecdf/stepfun?
Hi,
I have two variables ranging both from 0 to 1 (n=500 each).
Now I am interested in plotting them both in one plot (using ggplot2).
So far I used ecdf() (from an example I found with google) to get
values for the cumulatice distribution function which gives a relative
curve. I also want to do the same plot but using absolute cumulative
values instead of relative. Can that be done with ecdf or
2012 May 02
1
Two ecdf with log-scales
Hi,
i want to plot empirical cumulative density functions for two variables in
one plot. For better visualizing the differences in the two cumulative curves I'd like to log-scale the axis.
So far I found 3 possible functions to plot ecdf:
1) ecdf() from the package 'stats'. I don't know how to successfully set the log.scales? Combining two plots is not a problem:
plot(ecdf(x1))
2011 May 17
2
pdf (probability distribution function) and cdf
Dear all,
I would like for a given vector to calculate the pdf and the cdf and then plot these two graphs.
Is there in R any toolkit that can help me do that fast?
Regards
Alex
2010 Apr 30
1
Trouble using Ecdf () from the Hmisc library
Hello:
[Kindly Cc when replying]
The question in a nutshell is this: Is there a more robust alternative
to Ecdf ()?
The details:
I've used Ecdf () _a lot_ over the past few years and I have learned
to live with its warnings. But I am running short on time and patience
now [*] Here is a reproducible example:
> library (Hmisc)
> x <- read.csv ( file =
2010 Jan 29
1
combine 3 affybatches
Hello,
Im trying to combine 3 affybatches (1x hgu133+2 array and 2x hgu133a array)
Im useing this script:
library(matchprobes)
library(affy)
library(AnnotationDbi)
library(hgu133plus2probe)
library(hgu133aprobe)
library(hgu133a.db)
u133p2 = ReadAffy() # reading hgu133 +2 cel file into affybatch
u133a1 = ReadAffy() # reading hgu133a cel file into affybatch
u133a2 = ReadAffy() # reading hgu133a
2004 May 03
1
plotting in R
Hi there, I have 2 questions which I cannot find answers for in Dalgaard
or the helpfiles currently available.
(1) I wish to plot 3 ecdf plots on one graph. Is there any way of
holding a figure to plot all on the same plot. I can't get an ecdf for
any plot command other than "plot" or "ecdf.plot" so using lower level
command is no good, have also tried x11().
(2) If
2011 Oct 16
2
ecdf
Hi,
Newbie here. I read the R for Beginners but i still don't get this.
I have the following data (this is just an example) in a CSV file:
courseid numstudents
101 209
141 13
246 140
263 8
321 10
361 10
364 28
365 25
366 23
367
2011 Jun 02
4
[Plea to the R Gods] Theoretical and Empirical CDFs
http://r.789695.n4.nabble.com/file/n3567636/ecdfs.jpg ecdfs.jpg
http://r.789695.n4.nabble.com/file/n3567636/ecdf_curve.gif ecdf_curve.gif
Hello,
I have generated a plot of two empirical CDFs (attachment 1). As a result,
they are stepwise when plotted. The following code was used:
> plot(ecdf(mut), do.points=FALSE, verticals=TRUE, xlim=range(mut, non),
> col="red")
>
2011 Jan 26
2
2 functions with same name - what to do to get the one I want
There seems to be 2 functions call ecdf...
http://lib.stat.cmu.edu/S/Harrell/help/Hmisc/html/ecdf.html
http://127.0.0.1:11885/library/stats/html/ecdf.html
How do I get the one ecdf {Hmisc} to run instead of the ecdf {stats}
A pointer in the right direction would be greatly appreciated.
Tried to instal Hmisc but got this message, so I assume I have it
> utils:::menuInstallPkgs()
Warning:
2010 Feb 05
1
ecdf error
Dear friends,
Ecdf used to work nicely before.
e.g.
ecdf(df1v[,c(1:6)],group=df1v$trt,q=.5,col=1:2,label.curves=list(keys="l
ines"), datadensity="rug")
but now it does not work at all, even for a simpler code??? By the way,
I used the same libraries.
Thanks for your help.
Ahmed
[[alternative HTML version deleted]]
2011 Feb 10
1
How to determine the quantile boundary from an ECDF?
Given a dataset x, the ecdf is ecdf(x). Then I can use ecdf(x)(y) to find
the percentile of y. Given the ecdf is there a way to determine what is the
value of y that is the boundary of let's say 95 percentile? In other words,
is there a function I can call on the ecdf like:
fomeFunc( ecdf( x ), 0.95 )
Which will return the highest value of y, for which ecdf( y ) < 0.95?
The only solution
2006 Apr 20
2
smooth the ecdf plots
Hi All,
I have codes as follows to get the ecdf plots:
>
day.hos2<-c(6,4,6,6,4,6,5,4,7,5,6,6,8,6,17,9,8,4,6,3,5,8,7,12,5,10,6,4,6
,13,7,6,6,25,4,9,96,6,6,6,6,9,4,5,5,4,10,5,7,6)
>
day.hos3<-c(5,6,7,6,4,5,6,6,6,6,19,7,5,9,8,8,7,5,6,20,40,5,8,7,7,5,6,13,
11,9,4,6,9,16,6,7,6)
> f<-ecdf(day.hos2)
> plot(f,col.p='red',col.h='red')
>
2010 Apr 19
2
ecdf
Hello,
I'd like to plot an empirical cumulative distribution function, except
instead of the fraction of values < x, I'd like the fraction of values > x.
I think this can be done using the ecdf function in {Hmisc}. I installed
the package and loaded it. However, when following the example given in the
documentation, I get an error:
x <- rnorm(100)
ecdf(x,what='1-F')
2011 Jul 16
2
ecdf() to nls() - how to transform data?
Hi,
I am using ecdf-function and want to use the ecdf()-data-points for nls() as
data-parameter.
nls() expects 'list' or 'environment' as a data-type, knots(ecdf(mydata))
gives me 'numeric'.
What should I do now?
Thanks in advance - Jochen
Here is the code:
#################################################
# --- Fit ---
# Gumbel-Dist-Function, cumulative,