search for: shiazy

Displaying 8 results from an estimated 8 matches for "shiazy".

Did you mean: shady
2007 May 30
1
Sort in ecdf
Hi! I've noticed the ecdf() R code (R ver. 2.5.0) contains two call to sort: --- [R-code] --- ecdf <- function(x) x <- sort(x) n <- length(x) if (n < 1) stop("'x' must have 1 or more non-missing values") vals <- sort(unique(x)) rval <- approxfun(vals, cumsum(tabulate(match(x, vals)))/n, method
2007 Jun 20
4
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 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 either "cat"
2007 Mar 03
3
How to convert List object to function arguments?
Dear R gurus, I have a function "goftests" that receives the following arguments: * a vector "x" of data values; * a distribution name "dist"; * the dots list ("...") containing a list a parameters to pass to CDF function; and calls several goodness-of-fit tests on the given data values against the given distribution. That is: ##### BEGIN CODE SNIP #####
2007 May 18
0
Anderson-Darling GoF
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 well known it's more sensible to tail data. Looking at R packages the only AD test is
2007 May 18
0
Anderson-Darling GoF (re-sent)
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 well known it's more sensible to tail data. Looking at R packages the only AD test is
2007 May 27
1
Parametric bootstrapped Kolmogorov-Smirnov GoF: what's wrong
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, ..., alternative=c("two.sided", "less", "greater"), B = 1000 ) {
2007 Aug 15
1
Polynomial fitting
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 length m+1 containing the polynomial coefficients in descending powers: p(x) = c[1]*x^n +
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(