[R] How to plot PDF which is in the form of orthogonal polynomial

2004-10-30 Thread Yong Wang
Dear all using the orthogonal polymial on a set of data, I get an approximate density which basically is in the form: exp(-polynomial), as you know, the parameters are the converged coeeficients. obviously, It is hard, if not impossible, to use the inverse CDF method to get a sample and then p

[R] How to plot PDF which is in the form of orthogonal polynomial

2004-11-01 Thread Yong Wang
Dear all using the orthogonal polymial on a set of data, I get an approximate density which basically is in the form: exp(-polynomial), as you know, the parameters are the converged coeeficients. obviously, It is hard, if not impossible, to use the inverse CDF method to get a sample and then plo

RE: [R] How to plot PDF which is in the form of orthogonal polynomial

2004-10-30 Thread F Z
ou to read the posting guide http://lib.stat.cmu.edu/R/CRAN/ so you can get better answers From: Yong Wang <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: [R] How to plot PDF which is in the form of orthogonal polynomial Date: Sat, 30 Oct 2004 11:19:16 -0500 (CDT)

Re: [R] How to plot PDF which is in the form of orthogonal polynomial

2004-11-01 Thread Spencer Graves
Have you considered "cumsum(exp(-polynomial))"? Consider for example the following: library(polynom) b. <- polynomial(1:5) x <- seq(-2, 2, length=101) b.p <- predict(b., x) plot(x, b.p) plot(x, exp(-b.p)) cdf <- cumsum(exp(-b.p)) plot(cdf/cdf[101]) hope this helps. spencer gra