Re: [R] denstrip package: densregion when density is not provided

2015-10-04 Thread Giorgio Garziano
It is likely you have some list structure you should not. Check the class of the elements of your matrixes, to see if any list class shows up. Not clear from your code what is "y" passed to densregion(..). Anyway, one way to reproduce your error is the following: # this does not work > a <- lis

[R] denstrip package: densregion when density is not provided

2015-10-04 Thread Matteo Richiardi
I need to estimate the density from the other time series, similarly to what denstrip does (however, I need a whole region, and not just a strip). This is my updated example, where I tried to estimate the density from my bootstrapped projections using density() - as in denstrip: require(denstrip)

Re: [R] denstrip package: densregion when density is not provided

2015-10-03 Thread Giorgio Garziano
>From the "densregion" help page I can read that: z is a matrix of densities on the grid defined by x and y, with rows corresponding to elements of x and columns corresponding to elements of y. So in your scenario z must be a 3 rows x 100 columns matrix, if you like to take advantage of densregio

[R] denstrip package: densregion when density is not provided

2015-10-03 Thread Matteo Richiardi
I have several estimated time series, running from 2013 to 2050. 'y' values are constrained between 0 and 1. I would like to plot them using shaded colours of decreasing intensity, depending on an estimated density at each point x in 2013-2050. This is what I have done: require(denstrip) x <- 201