Dirty hack, but it's working.

library(MASS)
mu <- aic.mv$best.mo...@expected.value
sigma <- aic.mv$best.mo...@variance

mvrnorm(100,mu,sigma)

If you'd like to follow the rules, look for the functions to extract
the expected value and the variance of the best model out of the
stepAIC.ghyp object. I didn't find them, but then again, I'm a lazy
bastard and didn't look for them either.

Cheers
Joris


On Thu, Jun 17, 2010 at 2:49 PM, suman dhara <suman.dhar...@gmail.com> wrote:
> Sir,
> I am working on fitting distribution on multivariate financial data and then
> simulate observations from that fitted distribution. I use stepAIC.ghyp()
> function of 'ghyp' library which select the best fitted distribution from
> generalized hyperbolic distribution class on the given dataset.
>
> data(indices)
>
>  # Multivariate case:
>  aic.mv <- stepAIC.ghyp(indices, dist = c("ghyp", "hyp", "t", "gauss"),
>                         symmetric = NULL, control = list(maxit = 500),
>                         silent = TRUE, nit = 500)
>
>  summary(aic.mv$best.model)
>
> It fits asymmetic student-t dist. to the data 'indices'. Now, I want to
> simulate data from this best fitted distribution. I use
> simulate(aic.mv$best.model).
> But, it is not working. Can you give me the funtion/code to simulate data
> from this best fitted distribution.
>
>
>
> Thanks & Regards,
> Suman Dhara
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



-- 
Joris Meys
Statistical consultant

Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

tel : +32 9 264 59 87
joris.m...@ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

______________________________________________
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.

Reply via email to