Displaying 20 results from an estimated 6000 matches similar to: "Plot 2 ecdf in one graph"
2009 Jul 03
3
Color of ecdf plots
Hi.
I have the following two ecdf plots in one graph:
plot(
ecdf(....),
do.points=FALSE,
verticals=TRUE,
main=paste("Ecdf of distances ",DIM,sep=""),
col="red"
);
lines(
ecdf(....),
do.points=FALSE,
verticals=TRUE
);
How do I change the color of the resulting graph? Adding col="red" to either plot or lines results in an error
2010 Feb 19
1
color graph in multiple plots
Hi,
I would like to distinguish my plots using colors but I got error message. How do I correct that?
plot(ecdf(z), main ="CDF for observed and simulated weighted sum",type="l",lwd=2,col="blue",
xlab="Weighted sum (mm)", ylab="Cumulative Percent", xlim=c(0,15), xaxs ='i', yaxs ='i',ylim=c(0,1))
par(new=TRUE)
2010 Nov 25
1
overlap cdf plots and add colors and etc
Hi r-users,
I would like to overlap 2 ecdf plots.
I tried this below and it gives me two plots of ecdf but just both just in
black.
par(mar=c(4,4,2,1.2),oma=c(0,0,0,0),xaxs="i", yaxs="i")
plot(ecdf(datobs))
lines(ecdf(gam_sum_gen))
Then I try to add colors etc and also the legend but fail.
par(mar=c(4,4,2,1.2),oma=c(0,0,0,0),xaxs="i", yaxs="i")
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
2007 Jul 10
3
ECDF, distribution of Pareto, distribution of Normal
Hello all,
I would like to plot the emperical CDF, normal CDF and pareto CDF in the
same graph and I amusing the following codes. "z" is a vector and I just
need the part when z between 1.6 and 3.
plot(ecdf(z), do.points=FALSE, verticals=TRUE,
xlim=c(1.6,3),ylim=c(1-sum(z>1.6)/length(z), 1))
x <- seq(1.6, 3, 0.1)
lines(x,pgpd(x, 1.544,0.4373,-0.2398), col="red")
y
2005 Nov 02
2
help with the coordinates of the ECDF object
Hi all R users
I would like to know how acess the coordinates
of the ECDF object.
I look for the example,
in this part:
######################
print(ls.Fn12 <- ls(env= environment(Fn12)))
######################
but I do not know to extract
the Y coordinate and put it in other variable.
My objective is to make a plot
and identify the points with labels.
############# Example by
2004 Jun 03
1
ecdf plots, lines, and y values
Hi,
I have a question for the group, perhaps someone can help me
figure this out. I've already looked in the help files and they were
no help to me.
I have a vector of values and I am plotting an ecdf graph.
1. How can i draw a continuous line through the ecdf points? (lines
and type for the plot with an ecdf object does not work)
2. Supposing I have this line drawn. I can add a
2005 Nov 17
3
ECDF values
Dear UseRs,
maybe is a silly question: how can I get Empirical CDF
values from an object created with ecdf()?? Using
print I obtain:
Empirical CDF
Call: ecdf(t)
x[1:57] = 4.1, 4.4, 4.5, ..., 491.3,
671.27
Thanks in advance.
Regards,
Vito
Diventare costruttori di soluzioni
Became solutions' constructors
"The business of the statistician is to catalyze
the scientific
2006 Aug 25
2
plot question
Hi everyone,
I have what may appear to be a newbie question, but I have looked
everywhere I can think to look and I cannot find an answer. On page 35
of "An Introduction to R" the following command appears:
plot(ecdf(eruptions), do.points=FALSE, verticals=TRUE). What is the
do.points argument? I know what it does (suppresses printing of the
points) but where can I find help on it?
2007 May 30
1
Sort in ecdf
Hi!
I've noticed the ecdf() R code (R ver. 2.5.0) contains two call to sort:
--- [R-code] ---
ecdf <- function(x)
x <- sort(x)
n <- length(x)
if (n < 1)
stop("'x' must have 1 or more non-missing values")
vals <- sort(unique(x))
rval <- approxfun(vals, cumsum(tabulate(match(x, vals)))/n,
method
2002 Jul 25
1
Calling the correct one of 2 conflicting functions
Hello,
My specific system is
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 1
minor 5.1
year 2002
month 06
day 17
language R
Each of the hmisc and stepfun packages has a function
2006 Jun 04
2
slanted ends of horizontal lines for certain line widths
Hello,
if I plot a horizontal line, e.g.,
plot(c(1,2),c(1,1),xlim=c(0,3),lwd=2,type="l")
or
plot(c(1,2),c(1,1),xlim=c(0,3),lwd=4,type="l")
then the left end (1st example) or both ends (2nd example) of the lines
are not rectangular but slanted on the graphical display (screen).
That behavour first occurred when I was trying to plot a stepfun, e.g.,
y <-
2007 Jul 10
1
Fraction ECDF
Hi all,
I would like to plot part of the emperical CDF. Suppose the variable is x, I
just need the part when x>1,therefore, I am using the following codes.
tail <- x>1
plot(ecdf(x[tail]), do.points=FALSE, verticals=TRUE)
The "x" value starts from 1, but the yaxs still begins from 0, not the
corresponding value when "x" is 1. How can I make it match?
Could anyone
2004 Oct 17
3
ecdf with lots of ties is inefficient (PR#7292)
Full_Name: Martin Frith
Version: R-2.0.0
OS: linux-gnu
Submission from: (NULL) (134.160.83.73)
I have large vectors containing 100,000 to 20,000,000 numbers. However, they
only contain a few hundred *distinct* numbers (e.g. positive integers < 200).
When I do ecdf(v), it either runs out of memory, or it succeeds, but when I plot
the ecdf with postscript, the output is unnecessarily bloated
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
2008 Nov 08
2
lines, ecdf and colors
Hi. I'm trying to plot two ecdf's on the same graph using two
different colors. I can plot using the same color, but it doesn't
work when I change colors? Any suggestions? Thanks in advance for
your help.
x <- c(0.80, 0.83, 1.89, 1.04, 1.45, 1.38, 1.91, 1.64, 0.73, 1.46)
y <- c(1.15, 0.88, 0.90, 0.74, 1.21)
plot(ecdf(x))
# it works without col='blue', but doesn't
2011 Sep 24
2
two ecdf in the same figure
Hello,
is ot possible to draw two ecdf of vectors (say s1 and s2) on the same
figire with R.
plot function draws a new plot and there is no function like points or lines
to draw a second ecdf on the figure.
Regards
--
*PhD candidate in Computer Science
Address
3 avenue lamine, cité ezzahra, Sousse 4000
Tunisia
tel: +216 97 246 706
fax: +216 71 391 166*
[[alternative HTML version deleted]]
2001 Oct 22
3
Two questions
Greetings,
I have two questions that I could not answer from the
documentation.
A - ecdf and confidence intervals : Is there a (simple) way to generate
confidence intervals (95%) for a ecdf?
B - cross-validation of rpart trees : a colleague is using S to
generate decision tree and mentioned to me the use of cross-validation. Is
this function enabled in R ? if so, how should one proceed to
2008 Aug 14
1
ecdf manipulation
I’m using the edcf function to look at a number of empirical distributions
graphically for run-time analyses of stochastic optimization algorithms.
When dealing with problems where the optimal solution for these problems is
always found everything is fine and the graphs are very useful for
comparative observations. These distributions have a vertical axis height of
one i.e. a probability of one.
2002 Nov 25
1
Plotting continuous line types w/large datasets
Hi, R-Folks,
I have 3 large datasets that I combined in a single plot with
plot(ecdf(x1...),...)
plot(ecdf(x2...),add=TRUE,...)
plot(ecdf(x3...),add=TRUE,...)
The datasets are very similar, so it is difficult to get visual
separation among them. I tried many different line types without
success -- the lines all came out solid. Checking further, plot.ecdf()
calls plot.stepfun(), which calls