Displaying 20 results from an estimated 3000 matches similar to: "Confusion about ecdf"
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 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()
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)?
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
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(
2008 Dec 26
2
Computational Probability
Hi
Firstly , happy Christmas to R-Help! Secondly, I wonder if anyone can help
me with the following query: I am trying to reproduce some explicit
probability calculations performed in APPL (a Maple extension for
computational probability). For instance, in APPL, to compute the
probability that the sum of 10 iid uniform variables [0,1] will be between 4
and 6, (i..e Pr( 4 < \sum_{i=1}^{10}X_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
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 Apr 25
2
AW: numericDeriv and ecdf
> On only ten points, what did you expect ? Even with 1000
> observations, estimating a density is difficult, and has
> been the subject of a century of research. Kernel density
> estimates are among the most successful. For your immediate
> application, try plot(density(rnorm(10)), type="l"), etc.
wait, you misunderstood me!
I'd like to see 10 or 9 points with
2011 Aug 18
2
Concatenate two strings in one in a string matrix
Dear R-Users
I have the following matrix
> out$desc [,1] [,2]
[1,] "" ""
[2,] "y_{01}(k-001)" ""
[3,] "y_{01}(k-002)" ""
[4,] "y_{01}(k-003)" ""
[5,] "u_{01}(k-001)" ""
[6,] "u_{01}(k-002)" ""
[7,] "u_{01}(k-003)" ""
2009 Nov 02
1
AR Simulation with non-normal innovations - Correct
Dear Users,
I would like to simulate an AR(1) (y_t=ct1+y_t-1+e_t) model in R where the innovations are supposed to follow a t-GARCH(1,1) proccess.
By t-GARCH I want to mean that:
e_t=n_t*sqrt(h_t) and
h_t=ct2+a*(e_t)^2+b*h_t-1.
where n_t is a random variable with t-Student distribution.
If someone could give some guidelines, I can going developing the model.
I did it in matlab, but the loops
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
2011 Mar 14
1
Math characters in column heading using latex() in Hmisc
Hi Everybody
I want to print a latex table containing math characters in the column
heading
These are the formulae I want to use as column headings. It prints OK from
TeX
$\sum_{i}\sum_{j}C_{P,i,j,y}\times\mathit{FC}_{i}$, $XU_{alt,y}$, $n$,
$\bar{C}_{P,y}$
My plan was to create a character vector with these and later rbind the
values to them. When I create the vector like:
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.
2005 Feb 04
1
(no subject)
Hi.
I have a problem that I can't seem to find an optimal way of solving other
than by doing things manually. I'm trying to subset a data frame by the
number of observations that occurred at a given row but want to take into
account the number of observations of preceding rows. Here's an example.
I'm looking at intervals of data [10,20), [10, 30), ....., [10,120) which
contain a
2007 Jun 28
0
maximum difference between two ECDF's
Hello,
I have a vector of samples x of length N. Associated with each
sample x_i is a certain weight w_i. All the weights are in another
vector w of the same length N.
I have another vector of samples y of length n (small n). All
these samples have equal weights 1/n. The ECDF of these samples
is defined as for example at
http://en.wikipedia.org/wiki/Empirical_distribution_function and
I can
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
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