Displaying 20 results from an estimated 9000 matches similar to: "smoothing functions"
2003 Dec 15
1
distribution of second order statistic
Hi,
I am getting some weird results here and I think I am missing something.
I am trying to program a function that for a set of random variables
drawn from uniform distributions plots that distribution of the second
order statistic of the ordered variables. (ie I have n uniform
distributions on [0, w_i] for w_i different w_j and i=1..n. I want to
plot the distribution of the second order
2003 Aug 27
5
selecting by variable
Hi,
I'm a recent R convert so I haven't quite figured out
the details yet...
How do I select one variable by another one? Ie if I
want to draw the histogram of variable X only for
those individuals that also have a value Y in a
certain range?
In STATA I would give something like:
histogram X if ((Y>=A & Y<=B))
(The data is for individuals and each individual has a
number of
2004 Jan 23
1
how to take derivatives of a step function
Hi,
I have estimated a step function and need to take the derivatives of
this function at all points in the range. Does anyone know of any clever
ways to do this?
(I have already tried to fit a polynomial through the points in order to
obtain a smooth representation and then take derivatives of this. Also
tried to smooth it, and used an SG differentiator. Results are rather
poor so far, in
2004 Jul 02
1
help computing a covariance
Hi everyone,
(This is related to my posting on chi-squared from a day ago. I have
tried simulating this but I am still unable to calculate it analytically.)
Let y be an n times 1 vector of random normal variables mean zero
variance 1 and x be an n times k vector of random normal variables mean
zero variance 1. x and y are independent.
Then P is the projection matrix P=x*inv(x'*x)*x'
2003 Aug 23
2
help--kernel distribution dynamics
Deall all,
I'm just learning R, but unfortunately I need to
urgently do a rather more complex task so I need some
help. I have just learnt the very basics a few days
ago and am not ready yet to deal with panels and
kernel densities, so a soft guidance would be most
appreciated.
I have a (very) large panel data set (400,000
individuals x50 time periods) and need to display the
evolution of
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))
2005 Nov 01
2
kernel smoothing
Dear all,
I want to use kernel estimator to smooth some step funtions such as the empirical distribution and hazard function in survival analysis. Is there a function or package to deal with it in R?
How do I use it?
Thanks for your help.
Jimmy
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
2005 Jul 19
2
Taking the derivative of a quadratic B-spline
Hello,
I have been trying to take the derivative of a quadratic B-spline
obtained by using the COBS library. What I would like to do is
similar to what one can do by using
fit<-smooth.spline(cdf)
xx<-seq(-10,10,.1)
predict(fit, xx, deriv = 1)
The goal is to fit the spline to data that is approximating a
cumulative distribution function (e.g. in my example, cdf is a
2-column matrix with x
2005 Jul 07
1
CDF plot
Dear all,
I have define a discrete distribution P(y_i=x_i)=p_i, which I want to
plot a CDF plot. However, I can not find a function in R to draw it
for me after searching R and R-archive. I only find the one for the
sample CDF instead my theoretical one.
I find stepfun can do it for me, however, I want to plot some
different CDF with same support x in one plot. I can not manage how to
do it with
2008 Jan 10
1
Entropy/KL-Distance question
Dear R-Users,
I have the CDF of a discrete probability distribution. I now observe a
change in this CDF at one point. I would like to find a new CDF such that
it has the shortest Kullback-Leibler Distance to the original CDF and
respects my new observation. Is there an existing package in R which will
let me do this ?
Google searches based on entropy revealed nothing.
Kind regards,
Tolga
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
2010 Feb 09
1
how to adjust the output
Hi R-users,
I have this code below and I understand the error message but do not know how to correct it. My question is how do I get rid of “with absolute error < 7.5e-06” attach to value of cdf so that I can carry out the calculation.
integrand <- function(z)
{ alp <- 2.0165
rho <- 0.868
# simplified expressions
a <- alp-0.5
c1 <-
2007 Sep 12
1
Integrate() error message, I am at a loss
Hello!
I have a problem with integrate() in my function nctspa(). Integrate
produces an error message "evaluation of function gave a result of
wrong length". I don't know what that means. Could anyone suggest me
what is wrong with my function?
These are the examples of function calls that work OK:
nctspa(a=1:10,n=5)
nctspa(a=1:10, n=5, mu=2, theta=3, renorm=0)
This does not work:
2009 Dec 28
2
[BioC] make.cdf.package: Error: cannot allocate vector of size 1 Kb
My machine has 8GB memory. I had quit all other programs that might
take a lot of memory when I try the script (before I post the first
message in this thread). The cdf file is of only 741 MB. It is strange
to me to see the error.
On Mon, Dec 28, 2009 at 2:38 AM, Wolfgang Huber <whuber at embl.de> wrote:
> Dear Peng Yu
>
> how big is the RAM of your computer? You could try with
2006 Sep 23
1
Fitdistr() versus nls()
Hello R-Users,
I'm new to R so I apologize in advance for any big mistake I might
be doing. I'm trying to fit a set of samples with some probabilistic
curve, and I have an important question to ask; in particular I have
some data, from which I calculate manually the CDF, and then I import
them into R and try to fit: I have the x values (my original samples)
and the y values
2010 Sep 17
1
How to denote a line on the graph
Please give me some help, many thanks.
I graphed a expected CDF line of a binomial distribution on a graph,
And I have some observed points (observed CDF) from 4 groups fall on the
smooth CDF line.
I cannot really get the legend I want
legend ('topleft', c('a, 'b', 'c', 'd', 'expected CDF'), col=c(1,2,3,4),
pch=c(0,1,2, 3, '' ),
2008 May 21
3
Does backgroundrb support SSL?
Does backgroundrb support SSL like drb? I was unable to find any sample
configurations including SSL. Any help would be appreciated, thanks. -jim
salinas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080521/9588825a/attachment.html>
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.
2010 Sep 10
2
survfit question
Hi,
I am attempting to graph a Kaplan Meier estimate for some claims using the survfit function. However, I was wondering if it is possible to plot a cdf of the kaplan meier rather than the survival function. Here is some of my code:
library(survival)
Surv(claimj,censorj==0)
survfit(Surv(claimj,censorj==0)~1)
surv.all<-survfit(Surv(claimj,censorj==0)~1)
summary(surv.all)
plot(surv.all)