View Full Version : MCMC simulation with s+
09-01-2008, 06:58 AM
I need help with S+ code for:
1. Generating random numbers from function called "Frank cupola".
2. Run MCMC simulation in order to estimate the copula parameters.
I have already written the code but sometime the simulation stuck and i don't understand why.
Can't help you coz I never studied copulas. But there is an R function to help you in the QRMlib package
09-01-2008, 03:38 PM
Thanks for the link.
But I find this software too difficult for me to handle.
Do you know maybe someone who is familiar with this subject so I can hire to help me finish this project?
But the code woulld be essentially the same (along the lines, of course)!
If there is something in the MCMC I might be of help, but as far as copulas I think a quant forum would be more appropriate
09-02-2008, 06:00 AM
If it is not too much trouble, I have attached 3 codes that I wrote, maybe you can take a look at them and see if you can find the probelem with my code.
1. I define a function and generate data from Frank copula with parameters: th1=0.3 , th2=0.8 , alp=2
2. I calculate the hyper parameters.
I assumed that the parameters distribution is Gamma, therefore the hyper parameters distribution is Pareto.
I am using the Moment technique to estimate them.
3. I run MCMC simulation in order to estimate the parameters of the copula.
I have noticed that when ever the value of one of the hyper parameter in negetive, i don't have starting point.
When all the hyper parameters are positive, sometime i get the following note: Problem in .C("S_Var1_NA",: There are 249 missing value(s) in x and/or y passed to cor or var with na.method="fail"
What does this note means?
Powered by vBulletin™ Version 4.1.3 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.