search for: ecdf

Displaying 20 results from an estimated 274 matches for "ecdf".

2011 Oct 16
2
ecdf
...263 8 321 10 361 10 364 28 365 25 366 23 367 34 I load my data using: fs<-read.csv(file="C:\\num_students_inallmodules.csv",header=T, sep=',') I want to get the ecdf. So, I looked at the ?ecdf which says usage:ecdf(x) So I expected ecdf(fs$numstudents) to work Instead it just returned: Call: ecdf(fs$numstudents) x[1:210] = 1, 2, 3, ..., 3717, 4538 After Googling, got this to work: ecdf(fs$numstudents)(unique(fs$numstudents)) But I don...
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 c...
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...
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') Error in ecdf(x, what = "1-F") : unused argument(s) (what = "1-F") I believe that this is b...
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...
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, s...
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)) lines(ecdf(x2),col.h="red") 2) gx.ecdf() from package 'rgr'. It is easily possible to plot log-scales, but I don't know...
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) offVector<-seq(101:200) myecdfOn<-function(on...
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...
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...
2006 Jan 18
0
R: ecdf - linear
...which should be used to discuss R feature enhancements. >>>>> "Norman" == Norman Warthmann <norman at warthmann.com> >>>>> on Wed, 18 Jan 2006 11:33:22 +0100 writes: Norman> .......... Norman> Is there a specific reason why in the ecdf-function Norman> the variable method="constant" is hard-coded? yes, see below Norman> I would like to use method="linear" and I have created Norman> a new function based on yours just changing this and Norman> it seems to work. I am now wondering whe...
2013 Oct 24
0
TR: problem with ecdf : "missing C_R_approxfun" message
Hi again, this is a follow-up of my previous post : I've noticed that > attr(first.list[[1]]$size.ecdf,"call") gives ecdf(test.moms[, "m.pxs"]) and that there is no "test.moms" field in my records (a local variable named test.moms was used inside a function, but it was stored under another name in the list, outside the function) May this be the answer (and I've be...
2012 May 26
1
Kolmogorov-Smirnov test and the plot of max distance between two ecdf curves
...00,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 out$statistic f.a<-ecdf(log10(a+1)) f.b<-ecdf(log10(b+1)) plot(f.a, verticals=TRUE, do.points=FALSE, col="red") plot(f.b, verticals=TRUE, do.points=FALSE, col="green", add=TRUE) #inverse of ecdf a x.a<-get("x", environment(f.a)) y.a<-get("y", environment(f.a)) # inve...
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: ###################################...
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 learning...
2013 Oct 31
1
Extracting values from a ecdf (empirical cumulative distribution function) curve
Hi R users, I am a new user, still learning basics of R. Is there anyway to extract y (or x) value for a known x (or y) value from ecdf (empirical cumulative distribution function) curve? Thanks in advance. Mano. [[alternative HTML version deleted]]
2010 Aug 04
2
discrete ECDF
...ast with Excel or OO.org by putting a formula of the form =sum($A1:A$1) in an upper-corner of a section and then doing a "fill" procedure by dragging the lower-rt corner down and to the right. When divided by the grand sum of the entries this function then calculates a 2D-discrete-ECDF. I keep thinking I am missing the obvious, but I did try searching. Here is my effort at creating that functionality: ecdf.tbl <- function (.dat) { .dat <- data.matrix(.dat) #speeds up calculations .sdat <- matrix(0, nrow(.dat), ncol(.dat) ) .sdat[] <- sapply(1:nc...
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 = 'http://www.stat.osu.edu/~pkapat/miscl/...
2006 Dec 04
0
How to calculate area between ECDF and CDF?
...gorov-Smirnov test, but of course this is invalid when the distribution parameters are estimated from the data. So I'm tinkering with an alternative method (excuse my naivet? if this is a bad idea, I'm a relative statistical novice) that calculates the area of the difference between the ECDF of the data and the CDF of the estimated function (somewhat like KS, which looks at the greatest distance between these). My thought is to compare this observed area to a distribution of simulated areas derived by monte carlo simulation (draw N random samples from the estimated function, calcul...
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. #####...