Displaying 20 results from an estimated 4000 matches similar to: "How to calculate area between ECDF and CDF?"
2003 May 08
1
AW: approximation of CDF
> Almost any method of fitting a density estimate would work on
> integrating (numerically) the result.
it is a nice idea concerning the monotony property, which
will be obtained automatically, but I am going to use results
of approximation analytically
> In particular, look at package polspline, where
> p(old)logspline does the integration for you.
thank you, I am going to
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
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()
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")
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
2009 Aug 03
1
Help with Ecdf function
Dear R users,
I'm using Ecdf (Hmisc library) to plot four cdf in a same graphic. In this
graphic I also plot the 0.99 quantile for these cdf. I successfully plot
cdfs using different types of line to distinguish them, but I can't
determine the type of lines showing 0.99 quantile.
Is there a way to assign different line types for quantile lines in Ecdf
plot?
Best regards,
--
Mateus da
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
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
2010 Feb 18
0
2 ecdf from different set of data
Hi r-users,
I have 2 sets of data and I would like to superimpose this cumulative density in one graph.
I know how to put the 2 graphs in one same graph but my problem is the data are different.
> z[1:20]
[1] 2.02347388 3.19514379 0.05188875 1.41333812 3.50249892 4.34272676 6.65639581 5.01533819 4.18207505
[10] 2.87615551 2.28202152 0.49431541 0.06570579 5.68352438
2003 Apr 28
0
AW: AW: numericDeriv and ecdf
Dear Prof. Brian Ripley,
first of all thank you for your answer, I do appreciate
how do you manage to keep successfully all your
activities and answer posts in this forum!
> An empirical CDF is a step function: it does not have a
> derivative at the jump points, and has a zero
> derivative everywhere else.
of course!
Let me add few words concerning my simple motivation.
1.
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 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 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)?
2010 Nov 22
1
need smooth cdf lines
Hi,
I would like to overlap the cdf curve for observed and generated data Here is
my code:
plot(cdf,main ="CDF of the sum for winter
season-Hume",cex.axis=1.2,xlab="Rainfall (mm)",
xaxs="i",yaxs="i",col=c("black","red"), lty=c(1,1),ylab="Cumulative
probability", xlim=c(0,800),lwd=1)
lines(ecdf(datobs))
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 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
2003 May 08
2
approximation of CDF
Hi all,
is there any package in R capable of smooth approximation of CDF
basing on given sample?
(Thus, I am not speaking about ecdf)
In particular, I expect very much that the approximation should
subject to the property:
f(x0)<=f(x1) for x0<x1, where x0 and x1 belong to range of
the sample given.
Polynomial approximation could be OK for me as well.
P.S.
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
2008 Dec 16
1
How to make a smooth ( linear ) CDF plot?
This question might seem silly, because I felt that it MUST be in the
mailing list archives or help files somewhere, but I simply couldn't find
it.
I want to make some simple CDF (cumulative distribution function) plots
to check whether distributions are Gaussian / normal. But in order to check
how "normal" the distribution is, I really need the y-axis to be Gaussian as
well
2007 Mar 20
1
How does glm(family='binomial') deal with perfect sucess?
Hi all,
Trying to understand the logistic regression performed by glm (i.e. when
family='binomial'), and I'm curious to know how it treats perfect
success. That is, lets say I have the following summary data
x=c(1,2,3,4,5,6)
y=c(0,.04,.26,.76,.94,1)
w=c(100,100,100,100,100,100)
where x is y is the probability of success at each value of x,
calculated across w observations.