Hi everybody!
I'm looking some way to do in R a polynomial fit, say like polyfit
function of Octave/MATLAB.
For who don't know, c = polyfit(x,y,m) finds the coefficients of a
polynomial p(x) of degree m that fits the data, p(x[i]) to y[i], in a
least squares sense. The result c is a vector of
Dear R-users,
I have a problem with the IF-ELSE syntax.
Please look at the folllowing code and tell me what's wrong:
a - TRUE
if ( a )
{
cat(TRUE,\n)
}
else
{
cat(FALSE,\n)
}
If I try to execute with R I get:
Error: syntax error, unexpected ELSE in else
The strange thing is
: Shiazy Fuzzy [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Sent: Wednesday, June 20, 2007 11:41 AM
Subject: [R] Got Unexpected ELSE error
Dear R-users,
I have a problem with the IF-ELSE syntax.
Please look at the folllowing code and tell me what's wrong:
a - TRUE
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 -
On 6/9/07, Robert A LaBudde [EMAIL PROTECTED] wrote:
At 12:57 PM 6/9/2007, Marco wrote:
snip
2.I found various version of P-P plot where instead of using the
ecdf function use ((1:n)-0.5)/n
After investigation I found there're different definition of ECDF
(note i is the rank):
*
On 6/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
hi all:
ecdf() is the empirical cumulative distribution function, but I need the
INVERSE cumulative distribution.
how can I calculate it?
Two ways:
1. eccdf - function(x) { return( 1 - ecdf(x)(x) ) }
This returns an array of element,
Yes!!
sorry I've confused Inverse CDF with Complementary CDF.
-- Marco
On 6/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Doesn't quantile() do what you want?
HTH,
Ranjan
hi all:
ecdf() is the empirical cumulative distribution function, but I need the
INVERSE cumulative
Hi all,
I'd like to plot an empirical LLCD (log-log-CCDF, where CCDF == 1-CDF).
It seems ecdf() and plot(ecdf()) can't do it. I'd like to reuse some
graphics features of ECDF plot.
The fastest way I've found is to copypaste the ecdf code and writing
this function:
--- [R-code] ---
eccdf -
(... sorry! the first post was in HTML format ...)
Dear R-users,
I want to perform a One-Sample parametric bootstrapped
Kolmogorov-Smirnov GoF test (note package Matching provides
ks.boot which is a 2-sample non-parametric bootstrapped K-S
version).
So I wrote this code:
---[R Code] ---
Dear R-users,
I want to perform a One-Sample parametric bootstrapped Kolmogorov-Smirnov
GoF test (note package Matching provides ks.boot which is a 2-sample
non-parametric bootstrapped K-S version).
So I wrote this code:
---[R Code] ---
ks.test.bootnp - function( x, dist, ...,
Hi,
I'm not a statistician so sorry for possible trivial questions ...
I want to perform a GoF test on sample data against several distribution
(like Extreme Value, Phase Type, Pareto, ...).
Since I suspect a long-tailed behaviour on data I want to use
Anderson-Darling (AD) GoF test because it's
11 matches
Mail list logo