Announcement

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

  • 3200 conformability error

    spm(y x1), 3200 conformability error

    Dear statalist,
    I am estimating spatial durbin model with two spatial weights using spm package following 'help spm' guideline.
    Files are here.

    Code:
    clear all
    set more off
    ssc install spwmatrix
    ssc install spm
    net install spm, from(http://www.econometrics.it/stata)
    cd ".... "
    
    *First Spatial Weight; Neigbours weight
    insheet using "wm1_btra_SDM2_third.csv", clear
    save "wm1_btra_SDM2_third.dta"
    gen id = _n
    order id, first
    rename v(#) m(#)
    rename v(##) m(##)
    spmat dta W m*, normalize(row)
    
    *Second spatial weight: Non neighbours weight
    insheet using "wm2_btra_SDM2_third.csv", clear
    save "wm2_btra_SDM2_third.dta"
    gen id = _n
    order id, first
    rename v(#) m(#)
    rename v(##) m(##)
    spmat dta D m*, normalize(row)
    
    *Dataset
    import delimited "SPATIAL_FINAL_sovereign_stata.csv", clear
    generate monthss = date(months,"MDY")
    format %tdNN/DD/CCYY monthss
    use SPATIAL_FINAL_sovereign_stata.dta, clear
    save "SPATIAL_FINAL_sovereign_stata.dta", replace
    
    global id id
    global t monthss
    global ylist cdsxx
    global xlist cab_gdp ext_debt gdp_gr inf_rate reser
    
    xtset $id $t
    
    spm cdsxx cab_gdp ext_debt gdp_gr inf_rate reser, model(durbin) sarwmat(W) sarw2mat(D)
    estat ic
    Throws error

    Code:
    *:  3200  conformability error
                     <istmt>:     -  function returned error
    Any help please?
    Last edited by henok telila; 08 Oct 2019, 10:34. Reason: Added few codes to make explicit

  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - being able to replicate your problem is extremely helpful to diagnosing such problems.
    I'd start by checking that the sizes of W and D are what spm assumes they should be. I'd also run any examples provided in the spm documentation to make sure things are running correctly. If that doesn't help, you may need to contact the program's authors.

    Comment

    Working...
    X