+ Reply to Thread
Results 1 to 5 of 5

Thread: MCMC simulation with s+

  1. #1
    Points: 2,899, Level: 32
    Level completed: 99%, Points required for next Level: 1

    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MCMC simulation with s+



    Hello,
    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.

    Doron

  2. #2
    TS Contributor
    Points: 5,172, Level: 46
    Level completed: 11%, Points required for next Level: 178

    Location
    Athens , Greece
    Posts
    330
    Thanks
    0
    Thanked 4 Times in 2 Posts
    Can't help you coz I never studied copulas. But there is an R function to help you in the QRMlib package

    > http://rss.acs.unt.edu/Rdoc/library/...ula.frank.html

  3. #3
    Points: 2,899, Level: 32
    Level completed: 99%, Points required for next Level: 1

    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  4. #4
    TS Contributor
    Points: 5,172, Level: 46
    Level completed: 11%, Points required for next Level: 178

    Location
    Athens , Greece
    Posts
    330
    Thanks
    0
    Thanked 4 Times in 2 Posts
    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

  5. #5
    Points: 2,899, Level: 32
    Level completed: 99%, Points required for next Level: 1

    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?
    Attached Files

+ Reply to Thread

Similar Threads

  1. Replies: 1
    Last Post: 03-20-2011, 03:04 PM
  2. Replies: 0
    Last Post: 02-18-2011, 07:05 PM
  3. Replies: 0
    Last Post: 02-15-2011, 10:28 PM
  4. Another Simulation
    By jamesmartinn in forum R
    Replies: 2
    Last Post: 10-18-2010, 09:36 PM
  5. Proc MCMC
    By theeoddname in forum SAS
    Replies: 2
    Last Post: 02-25-2010, 11:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts








Advertise on Talk Stats