similar to: Help with Ecdf function

Displaying 20 results from an estimated 3000 matches similar to: "Help with Ecdf function"

2004 Feb 18
2
Area between CDFs
Dear List: I am trying to find the area between two ECDFs. I am examining the gap in performance between two groups, males and females on a student achievement test in math, which is a continuous metric. I start by creating a subset of the dataframe male<-subset(datafile, female="Male") female<-subset(datafile, female="Female") I then plot the two CDFs via
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") >
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
2011 Aug 22
2
CDFs
Hello all, I have two columns of numbers. I would like to do the following: (1) Plot both cdfs, F1 and F2 on the same graph. (2) Find smoothed approximations of F1 and F2 lets call them F1hat and F2hat (3) Find values for F1hat when we substitue a value of x in it. (4) Find the corresponding densities of the cdfs. Any ideas? -- Thanks, Jim. [[alternative HTML version deleted]]
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
2008 Jul 15
1
Supressing printing from a function: ecdf
Dear R Users, I am trying to suppress the information printed by the ecdf function during an assignment. Various alternatives have failed me so far: > a=summary(ecdf(rnorm(100)))["1st Qu."] Empirical CDF: 100 unique values with summary > invisible(a=summary(ecdf(rnorm(100)))["1st Qu."]) Empirical CDF: 100 unique values with summary > (function()
2009 Mar 25
1
Confusion about ecdf
Hi, I'm bit confused about ecdf (read the help files but still not sure about this). I have an analytical expression for the pdf, but want to get the empirical cdf. How do I use this analytical expression with ecdf? If this helps make it concrete, the pdf is: f(u) = \sum_{t = 1}^T 1/n_t \sum_{i = 1}^{n_t} 1/w K((u - u_{it})/w) where K = kernel density estimator, w = weights, and u_{it} =
2007 Nov 18
2
Obtaining x-values from ECDF
Dear Group, I am using the ecdf function as follows: cawa.cdp <- ecdf(cawaocc$LEFF80) summary(cawa.cdp) Empirical CDF: 223 unique values with summary Min. 1st Qu. Median Mean 3rd Qu. Max. 0.07918 1.35700 1.68600 1.61000 1.91200 2.70000 I can see by the summary that the y-value for the 3rd quartile is 1.912. How can I obtain the x-value for a specified y-value (e.g., 0.8)?
2007 Jul 12
3
multiple plots in a graph
Hi, I have to generate 10 cdfs in a graph. I need to compare the cdf's nature by plotting ten cdfs in a graph. Thus, I need multiple plots in a graph. I would appreciate if you could give some solution to the problem asap. Thanking you, Sincerely, Ajay. -- Ajay Singh Research Scientist, SOM, IIT-Bombay, Powai, MUMBAI-400076, MH (INDIA).
2009 Sep 07
1
Plot 2 ecdf in one graph
Hi r-users,   I would like to compare the cdf between historical and predicted. My x.obs and x.pre are the frequency data in classes of 0-300. I tried: plot(ecdf(x.obs),ecdf(x.pre),type="l",col="red")   and it gives me: Error in plot.stepfun(x, ..., ylab = ylab, verticals = verticals, pch = pch) :   argument 4 matches multiple formal arguments   Thank you so much for any
2007 Jun 09
1
What ECDF function?
Hello! I want to plot a P-P plot. So I've implemented this function: ppplot <- function(x,dist,...) { pdf <- get(paste("p",dist,sep=""),mode="function"); x <- sort(x); plot( pdf(x,...), ecdf(x)(x)); } I have two questions: 1. Is it right to draw as reference line the following: xx <- pdf(x,...); yy <- ecdf(x)(x); l <- lm(
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
2012 Jul 04
1
Error in hclust?
Dear R users, I have noted a difference in the merge distances given by hclust using centroid method. For the following data: x<-c(1009.9,1012.5,1011.1,1011.8,1009.3,1010.6) and using Euclidean distance, hclust using centroid method gives the following results: > x.dist<-dist(x) > x.aah<-hclust(x.dist,method="centroid") > x.aah$merge [,1] [,2] [1,] -3 -6
2006 Dec 04
0
How to calculate area between ECDF and CDF?
Hi all, I'm working with data to which I'm fitting three-parameter weibull distributions (shape, scale & shift). The data are of low sample sizes (between 10 and 80 observations), so I'm reluctant to check my fits using chi-square (also, I'd like to avoid bin choice issues). I'd use the Kolmogorov-Smirnov test, but of course this is invalid when the distribution
2013 Mar 03
2
Kolmogorov-Smirnov: calculate p value given as input the test statistic
Dear all, I calculate the test statistic for the KS test outside R, and wish to use R only to calculate the corresponding p-value. Is there a way for doing this? (as far as I see, ks.test() requires raw data as input). Alternatively, is there a way to provide the ks.test() the two CDFs (two samples test) rather than the (x, y) data vectors? Thanks in advance, Rani
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")
2004 Jan 16
1
ecdf function
I am trying to use the ecdf function to find p-values (using a vector of numbers to represent my new distribution and a test specific t-statistic value). I am using : 1-ecdf(vector)(t-stat) vector<-c(5.386, 3.701717, 3.8289, 3.602, 4.469, 5.2087, 6.1613, 4.71181, 5.07716, 2.3517) ecdf(vector)(4.6604) [1] 0.5 R will only give me 1 significant digit after the decimal point and I am
2012 Jun 14
2
plot cdf
Good Afternoon, I'm trying to create a cdf plot, with the following code. It works well, but I have little doubt, if you can help solve. When I create the plot, like the graph line would still not appear with point #cdf x<-table(Dataset$Apcode) View(s) hist(s) *plot(ecdf(x))* x<-1 37607 2 26625 3 5856 4 25992 5 30585 6 16064 7 9850 .. ... .. 186 52 -- View this message in
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:
2006 Jun 30
1
Empirical CDF
Good day everyone, I want to assess the error when fitting a Gram-Charlier CDF to some data 'ws', that is, I want to calculate: Err = |ecdf(ws) - GCh_ser(ws)| The problem is, I cannot get the F(x) values from the ecdf. 'Summary(ecdf())' returns some of the x-axis values, but how do you get the F(x) values? Thank you for any help you can provide. Regards, Augusto