[R] Nonparametric Estimation of Tail Dependence Coefficients

2014-10-28 Thread Gildas Mazo
Dear all, in which package can I find an implementation of the nonparametric estimation of tail dependence coefficients: lambda_L = lim_{u\to 0} P[F_1(X_1)u|F_2(X_2)>u], where (X_1,X_2) has marginal distribution functions F_1 and F_2? (The nonparametric estimators typically require to choose a

[R] Matrix package + mfcol/mfrow

2010-04-27 Thread Gildas Mazo
Hi, When I load the "Matrix" package, I cannot get the par(mfrow=c(..,..)) to work, that is, I cannot get to display several images at a time. How can I fix this problem ? Thanks in advance, Gildas Mazo __ R-help@r-project.org mailing

[R] Matrix package + mfcol/mfrow

2010-04-27 Thread Gildas Mazo
Hi, When I load the "Matrix" package, I cannot get the par(mfrow=c(..,..)) to work, that is, I cannot get to display several images at a time. How can I fix this problem ? Thanks in advance, Gildas Mazo __ R-help@r-project.org mailing

[R] function which saves an image of a dgtMatrix as png

2010-04-28 Thread Gildas Mazo
f(aDgt) My image is saved as a text file and contains nothing at all !!! Thanks in advance, Gildas Mazo __ 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-gu

Re: [R] function which saves an image of a dgtMatrix as png

2010-04-29 Thread Gildas Mazo
n a lattice function is called from within another function. > On Wed, Apr 28, 2010 at 1:20 PM, Gildas Mazo wrote: > >> Hi, >> >> I'm getting crazy: >> >> This does work: >> >> library(Matrix) >> a1<-b1<-c(1,2) >> c1<-rnorm

[R] optim and "the function should not" advice

2012-09-20 Thread Gildas Mazo
Dear R users, I'm using optim to optimize a pretty complicated function. This function takes the parameter vector "theta" and within its body I use instructions like sigma<-theta[a:b]; computations with sigma... out<-c() for (i in 1:d){ a<-theta[(3*d+i):c] out[i]<-evaluation of an expressi

[R] CRAN policies - citing others

2014-02-20 Thread Gildas Mazo
ly? In the documentation for pbcOptim.R? In the file DESCRIPTION? In the file lbfgsb.cpp? Thanks you very much for your help -- Gildas Mazo PhD student MISTIS team at INRIA Grenoble, France __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

[R] SQL/R

2010-07-22 Thread Gildas Mazo
Dear R users, I want to aggregate data in the following way: ### X <- data.frame(u = c("T1","T1","T1","T2"), v=c("a","a","b","a")) X library(sqldf) sqlOut <- sqldf("select count(distinct(v)) from X group by u") sqlOut ### Now I want to get the same result without using SQL. How can I achieve t

Re: [R] SQL/R

2010-07-23 Thread Gildas Mazo
gt; > library("plyr") > ddply(X, .(u), function(x) {length(unique(x$v))}) > # u V1 > #1 T1 2 > #2 T2 1 > > >> Allan. >> >> On 22/07/10 12:52, Gildas Mazo wrote: >>> Dear R users, >>> >>> I want to aggregate data in the follow

[R] optimization subject to constraints

2010-08-09 Thread Gildas Mazo
Dear R users, I'm looking for tools to perform optimization subject to constraints, both linear and non-linear. I don't mind which algorithm may be used, my primary aim is to get something general and easy-to-use to study simples examples. Thanks for helping, Gildas

Re: [R] optimization subject to constraints

2010-08-10 Thread Gildas Mazo
: >> constrOptim can only handle linear inequality constraints. It cannot >> handle >> equality (linear or nonlinear) as well as nonlinear inequality >> constraints. >> >> Ravi. >> >> -Original Message- >> From: r-help-boun...@r-project.org >

[R] [Fwd: Re: optimization subject to constraints]

2010-08-10 Thread Gildas Mazo
nction(x) > { > return(x[1]^2+x[2]^2) > } # constraint > > f<- function(x) > { > return(x[1]+x[2]) > } # objective function > > x0 = c(1, 1) > > solnp(x0, fun=f, eqfun=g, eqB=c(1)) > > > > Am 10.08.2010 14:59, schrieb Gildas Mazo: &g

Re: [R] [Fwd: Re: optimization subject to constraints]

2010-08-11 Thread Gildas Mazo
nalty > [1] -6.496021e-08 > > $counts > function gradient > 100 30 > > > Ravi. > > > > Ravi Varadhan, Ph.D. > Assistant Professor, > Division of Geriatric Medicine and Gerontology > School of Medicine > Johns Hopkins Univer

[R] Sweave & png

2010-05-31 Thread Gildas Mazo
Hi, Is there a simple way to save my figures in png instead of pdf with Sweave ?? Thanks in advance, Gidas __ 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/post

Re: [R] Sweave & png

2010-06-01 Thread Gildas Mazo
Thank you Ben Bolker a écrit : > Gildas Mazo curie.fr> writes: > > >> Is there a simple way to save my figures in png instead of pdf with >> Sweave ?? >> > > > See > > http://sites.google.com/site/thibau

[R] Build Design Matrix with avoiding loops

2010-06-04 Thread Gildas Mazo
Dear R users, I'd like to build a simple design matrix in a efficient way. I naively wrote the code below. n = 15 k = 3 nbPerGrp = c(5,5,5) xT <- list() for (i in 1:k){ xT[[i]] <- rep(0, k) xT[[i]][i] <- 1 } X <- matrix(nrow = n, ncol = k) #design matrix for (i in 1

[R] message-passing algorithm

2012-08-15 Thread Gildas Mazo
Dear R users, I'm searching a message-passing algorithm in R. Any help much appreciated. Thank you, Gildas __ 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/posti

[R] Numerical Inversion of Cumulative Distribution Function

2012-03-06 Thread Gildas Mazo
Dear R users, Given a user-defined cumulative distribution function F, I want to compute F^{-1}(x). How is that possible with R? Best Regards, -- Gildas Mazo PhD student MISTIS team at INRIA Grenoble, France [[alternative HTML version deleted

[R] Computing High Order Derivatives (Numerically)

2012-03-22 Thread Gildas Mazo
Dear R users, Let f be a function over d variables x1,..,xd. I want to compute the k^th-order derivative with respect to x1,..,xk (k<=d). I have a by hand solution (see below) using an iterating code using D. However, I expect d to be high and f to be complicated. Then I want a vector x to be t

Re: [R] Computing High Order Derivatives (Numerically)

2012-03-23 Thread Gildas Mazo
2012 at 12:35:57AM +0100, Gildas Mazo wrote: > > Dear R users, > > > > Let f be a function over d variables x1,..,xd. I want to compute the > > k^th-order derivative with respect to x1,..,xk (k<=d). I have a by > > hand solution (see below) using an iterating co