1

I have a vector of 365 data values, each follows its own normal distribution. I have a vector of averages and a diagonal matrix as of standard deviations. I would like to get quantiles (0.1,0.2,...0.9) from these data. I used qmvnorm from mvtnorm package and it didn't work out. I am wondering if there is any other way, maybe using a loop?

Edit note: Pasting from additional material from the OP that was then deleted.

Sorry. To clarify, I have a vector of the average (365 values in total) and 365x365 matrix of standard deviations. I want to compute quantiles for each average. I use qmvnorm(0.1,mean=sun.base,sigma=sun.std) to get 10th quantile. I was expecting the result to be a vector of 365 values. For my data it returns as follows, which is not the output I need.

$quantile [1] 9.634588

$f.quantile [1] -6.997342e-06 attr(,"error") [1] 0 attr(,"msg") [1] "Normal Completion"

$iter [1] 10

$estim.prec [1] 6.103516e-05
Glen_b
  • 7,883
  • 2
  • 37
  • 48
  • 3
    What didn't work and in what way did it fail? Please see [how to create a reproducible example](http://stackoverflow.com/a/5963610/429846) so that we can recreate the issue. – Gavin Simpson Jun 13 '13 at 15:30
  • You would like to get the quantiles of what? The data? The averages? The SD? I second the request for a reproducible example. – nico Jun 13 '13 at 15:51
  • perhaps this will be of help: [link](http://stat.ethz.ch/R-manual/R-patched/library/stats/html/quantile.html) – thijs van den bergh Jun 13 '13 at 16:52

0 Answers0