Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • ask for help: "could not calculate numerical derivatives -- discontinuous region with missing values encountered"

    Please Everyone, I need help. I obtain this (below) error while running a mvmeta. how to solve this issue? Thanks a lot !

    mvmeta d S, bscov(prop P)
    Note: using method reml
    Note: using variables d2 d3 d4 d5
    Note: 4 observations on 4 variables
    could not calculate numerical derivatives
    discontinuous region with missing values encountered

    r(430);

    Data:
    study treatment mean sd n
    Kawazoe 2017 1 7 1.33 100
    Kawazoe 2017 5 8 1.67 101
    Pandharipande 2010 1 13.4 15.1 31
    Pandharipande 2010 2 12.2 9.8 32
    Tasdogan 2009 1 9.75 2.25 20
    Tasdogan 2009 3 9 3 33
    Perez-Rada Fde 1 14.36 9.25 26
    Perez-Rada Fde 4 16.41 14.41 33
    Command:
    #
    gen v=(sd/sqrt(n))^2
    drop n
    drop sd
    rename mean y
    reshape wide y v,i(study) j(treatment)
    reshape long y v,i(study) j(treatment)

    #
    #
    gen aug = (y==. & treatment==1)
    sum y
    local om r(mean)
    dis `om'
    replace y=`om' if (aug==1)
    local mv r(max)
    dis `mv'
    replace v = abs(`mv'*1000) if (aug==1)

    #
    #i=j=nt
    drop aug
    reshape wide y v,i(study) j(treatment)
    forvalues i = 2/5 {
    gen d`i'=y`i'-y1
    }
    forvalues i = 2/5 {
    gen S`i'`i'=v1+v`i'
    forvalues j = 3/5 {
    if `i'<`j' gen S`i'`j' = v1
    if `i'<`j' replace S`i'`j'=. if d`i'==. | d`j'==.
    }
    }

    #
    mat P = I(4) + J(4,4,1)
    mvmeta d S, bscov (prop P)
Working...
X