Consulting

Results 1 to 4 of 4

Thread: help with detrended fluctuatin analysis

  1. #1

    help with detrended fluctuatin analysis

    Hi
    I an a new vba'user , and I tried to caculate DFA (detrended fluctutation analysis) on time series
    I put a white noise in a column, and I developed a VBA code, but it did not work ......
    hopefully , someone could help me
    Thanks
    You will find excel files and article method in pdf (https://libstore.ugent.be/fulltxt/RU...19_0001_AC.pdf)

    Anne

    donnees (2).xlsm

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,729
    Location
    but it did not work ......
    is a little bit fuzzy. What didn't work?

    Also is your 'End Sub' in the wrong place?


       ' Calculer la série temporelle y_i = ?(a_i - moyenne(a))
        For i = 1 To n
            ' Calculer la série y_i en utilisant la somme cumulative des différences
            If i = 1 Then
                newY(i) = diff(i)
            Else
                newY(i) = newY(i - 1) + diff(i)
            End If
            ' Afficher la série temporelle y_i dans la colonne C de la feuille Excel
            ws.Cells(i + 1, 3).Value = newY(i)
        Next i
    End Sub   ' <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    
    
    ' Définir les tailles des boîtes
    boiteTailles = Array(250, 500, 1000, 1500)

    Do you want the formulas in this section only?

    Capture.JPG
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    Hi,
    The macro does not execute when I run it.
    All the formulas in the paper, you show, are in the vbamacro
    Now I want to run it to see whether it works, and the potential problem, I know what I should obtain, I just need to control
    Anne

  4. #4
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,729
    Location
    Capture.JPG

    Go to Debug, Compile and fix any errors that it finds
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Posting Permissions

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