Re: [R] lmom and lmomRFA Upper and Lower Bounds Simulation Questions

2015-05-11 Thread J. R. M. Hosking
7; are the quantiles of a GEV distribution fitted to 'zz_gev' (you can verify that 'CI_gev$Qhat' is the same as 'quagev(Fx,pelgev(samlmu(zz_gev)))'). For inference about 'max_data', 'GEV' is likely to be better. For inference about 'zz_gev',

Re: [R] Best Distribution

2014-10-01 Thread J. R. M. Hosking
27;green') # add Gumbel fit evdistq(qualn3, pelln3(samlmu(Prec), bound=0), col='blue') # lognormal legend("topleft",c("Gumbel","lognormal"),lty=1,col=c("green","blue")) J. R. M. Hosking __

Re: [R] R 14.0, ggplot2: could not find function "initRefFields"

2013-04-02 Thread J. R. M. Hosking
ggplot2 is "an implementation of the Grammar of Graphics". It seems likely that whatever you were hoping to achieve with ggplot2 can also be done natively in SPSS. J. R. M. Hosking plugin requires R 14.0 (14.2 or 15 does not work). When I install R it gives an warning: library(

Re: [R] GEV distribution fitted by L-moment graph

2012-08-08 Thread J. R. M. Hosking
? Thanks. [[alternative HTML version deleted]] The help file for function evplot() in package lmom has an example that does exactly what you ask. J. R. M. Hosking __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] Adding gamma and 3-parameter log normal distributions to L-moments ratio diagram lmrd()

2012-07-23 Thread J. R. M. Hosking
rized version of the 3-parameter lognormal distribution). Is this what you want? If not, I don't know what else you want to know about "the specification of the parameter (lmom)". J. R. M. Hosking __ R-help@r-project.org mailing list

Re: [R] Gamma distribution parameter estimation

2011-08-07 Thread J. R. M. Hosking
lower bound, by fitting a 3-parameter gamma distribution ("Pearson type III" in the terminology of package lmom), gives a visually much better fit: evdistq(quape3, pelpe3(samlmu(x)), col='blue') J. R. M. Hosking __ R-help@r-project.o

Re: [R] covariance matrix TL-moments

2011-07-03 Thread J. R. M. Hosking
t>0. Reference: J.R.M. Hosking (2007). Some theory and practical uses of trimmed L-moments. Journal of Statistical Planning and Inference, 137, 3024-3039. J. R. M. Hosking __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] Strange space characters in character strings

2010-08-24 Thread J. R. M. Hosking
; 102881" " 10" Looks fine to me. Now I can use as.numeric() to convert to numbers (leading and lagging spaces should not be a problem): as.numeric(gsub("[$,]", "", as.character(moose$V3))) [1] NA NA NA NA NA NA NA NA

Re: [R] lmomRFA-package: regsimq()

2010-08-16 Thread J. R. M. Hosking
tained, reproducible example I will see what I can do. J. R. M. Hosking R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal

Re: [R] "lmomRFA" package: error bounds/confidence intervals

2010-07-21 Thread J. R. M. Hosking
e intended to be a way of getting as close as possible to what confidence intervals would be (or ought to be, given consideration (b) above). J. R. M. Hosking Thank you in advance, Tonja __ R-help@r-project.org mailing list https://stat.ethz.

Re: [R] is there a function to find the quantile of the mean of a vector?

2010-06-19 Thread J. R. M. Hosking
an(x) p.mean <- which.min((x.sort - x.mean)^2) / x.length Another user pointed out a function suited for this purpose, findInterval() p.mean <- findInterval(x.mean, xsort) / x.length Thanks for your help, David No need to sort: x <- runif(1000) p.mean <- mean(x <= mean(x)) J. R.

Re: [R] lmom: plotting log Pearson Type III

2010-02-23 Thread J. R. M. Hosking
rst define the quantile function of the LPE3, then use it ... quaLPE3 <- function(f, para) exp(quape3(f, para)) evdistq(quaLPE3, parLPE3, col='magenta') (and thank you for providing such clear sample code) J. R. M. Hosking __ R-help

Re: [R] tapply for function taking of >1 argument?

2010-02-04 Thread J. R. M. Hosking
is to sapply as ? is to tapply ) Thanks for your help. coef(lm(data ~ -1 + as.factor(groups), weights=weights)) Not the fastest, but IMO more comprehensible than the constructions involving anonymous functions. J. R. M. Hosking __ R-help@r-project.o

Re: [R] Problems with fitdistr

2010-01-28 Thread J. R. M. Hosking
non-finite value supplied by optim Any help or suggestions are most welcomed Use function pelwei() in package lmom. J. R. M. Hosking __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide ht

Re: [R] estimate inverse gaussian in R

2009-12-06 Thread J. R. M. Hosking
package lmom. J. R. M. Hosking __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] lmomco package and confidence limits?

2009-11-17 Thread J. R. M. Hosking
rtificial 1-site region whose # frequency distribution is the one fitted to the actual data sim <- regsimq(rfit$qfunc, nrec = rdat$n, f = 1 - 1 / c(2,5,10,25,50,100)) # Compute error bounds for quantiles of the site's # frequency distribution sitequan

Re: [R] Log logistic Distribution - Parameter estimation

2009-08-18 Thread J. R. M. Hosking
parameter Log Logistic distribution to this data? Thanking in advance Maithili Log logistic is, after reparametrization, a subset of the generalized logistic distribution used in package lmom, so function pelglo in that package, together with a bit of algebra, should get you there. J. R. M

Re: [R] lmom - Estimating Normal Distribution Parameters using lmom package

2009-07-21 Thread J. R. M. Hosking
g a normal distribution is grossly inappropriate, they can be very far apart. Your data, which have sample skewness 22 and sample L-skewness 0.93, fall into this category. J. R. M. Hosking __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

Re: [R] RDCOMClient: how to close Excel process?

2009-07-09 Thread J. R. M. Hosking
o clean up: library(RDCOMClient) xl <- COMCreate("Excel.Application") wk <- xl$Workbooks() sh<-wk$Open(normalizePath("sample_file.xls"))$Sheets()$Count() wk$Close() xl$Quit() rm(sh) rm(wk) rm(xl) gc() J. R. M. Hosking ___

Re: [R] threshold distribution

2009-04-06 Thread J. R. M. Hosking
394 1.00195 1.14976 0.80008 1.11947 1.09484 0.81494 0.68696 + 0.82364 0.84390 0.71402 0.80293 1.02873 + ")) Read 39 items > > y <- (x-mean(x))/sd(x) > > library(lmom) > pelln3(samlmu(y)) zeta mu sigma -1.5362134 0.2554

Re: [R] Fw: Estimating Parameters of Weibull and Pareto distribution using LMOM package

2009-03-18 Thread J. R. M. Hosking
(amounts),bound=1) xialphak 1.0072.993343-0.838561 pelwei offers similar options for the Weibull distribution. J. R. M. Hosking Please help me. Regards and thanking in advance Maithili

Re: [R] Estimating paramters of "3 Parameter Gamma Distribution"

2009-03-18 Thread J. R. M. Hosking
e 3-parameter gamma. For the relationship between the two distributions, see the help for function cdfpe3 in package lmom. J. R. M. Hosking Please guide Regards Maithili __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinf

Re: [R] Fw: Fitting GUMBEL Distribution - CDF function and P P Plot

2009-03-16 Thread J. R. M. Hosking
n(x,para) exp(-exp(-(x - para[1])/para[2])) J. R. M. Hosking Maithili Shiva wrote: Dera R Helpers, I am re-posting my query. Please guide me. Maithili --- On Fri, 3/13/09, Maithili Shiva wrote: I am trying to fit the Gumbel distribution to a data. I am using lmom package. I am gett

Re: [R] Parameter Estimation - Generalized Extreme Value Distribution

2008-12-16 Thread J. R. M. Hosking
Maithili Shiva wrote: Dear R helpers, How do you estimate the (Location, Scale, Shape) parameters of Generalized Extreme Value distribution using R? ... Package lmom, function pelgev. J. R. M. Hosking __ R-help@r-project.org mailing list https

Re: [R] Problems with NA's

2007-11-20 Thread J. R. M. Hosking
> I have enclosed the print operation in braces to avoid possible problems > with it. > > Your advice? > > Tom Jones What Messrs. Schwartz and Olshansky told you is valid, but will not cure syntax errors.