[R] [] for R

2009-08-25 Thread kfcnhl
I am assuming the variable out is the output parameter. However, I don't understand what is out[1+xi*xx>0]? Can someone explain this to me? Thanks in advance, Chen dGEV <- function(x, xi, mu = 0, sigma = 1, logvalue=FALSE) { xx <- (x-mu)/sigma #use the new dGumbel which passes mu and

[R] extra .

2009-08-20 Thread kfcnhl
sigma0 <- sqrt((6. * var(maxima))/pi) What does the '.' do here? -- View this message in context: http://www.nabble.com/extra-.-tp25073255p25073255.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list htt

[R] Understanding R code

2009-08-20 Thread kfcnhl
What is 1. par.ests <- optimfit$par 2. fisher <- hessb(negloglik, par.ests, maxvalue=maxima); 3. varcov <- solve(fisher); 4. par.ses <- sqrt(diag(varcov)); Thanks a lot, fit.GEV <- function(maxima) { sigma0 <- sqrt((6. * var(maxima))/pi) mu0 <- mean(maxima) - 0.57722 * sigma0 xi0 <- 0.1 theta <

Re: [R] Newbie that don't understand R code

2009-08-18 Thread kfcnhl
Yap -- View this message in context: http://www.nabble.com/Newbie-that-don%27t-understand-R-code-tp25009034p25028474.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listin

[R] Newbie that don't understand R code

2009-08-18 Thread kfcnhl
I got some R code that I don't understand. Question as comment in code //where is t comming from, what is phi inverse rAC <- function(name, n, d, theta){ #generic function for Archimedean copula simulation illegalpar <- switch(name, clayton = (theta < 0), gumbel = (theta < 1), frank = (theta < 0