Marianne, a postdoc in the School of Nursing in UNC-CH. She lives in Virginia now. Her study is a comparison of urban and rural hospitals' nurse work environment and quality of care. I consult this case from last December.




The model she fits is a hierarchical regression model with generalized estimating equation (GEE). GEE method is very popular in model fitting when independent variables are highly correlated and there are many missing data in data set as well. It was created by Kung-Yi Liang, a Taiwanese who is a professor in the department of biostatistics in Johns Hopkins University.




Today, Marianne sent an email and show an error message in her SAS output. The problem is that the Hessian matrix is semi positive definite, and the program is terminated. I once encountered this situation before, but I don't know how to solve it so far. My supervisor, Mark, told me it is appeared when there are some empty cells in some categorical independent variables vs. categorical dependent variable. We can use PROC FREQ in SAS to check what IV has empty cells, then delete it.




As what Mark said, there is an empty cell in an IV. After deleting it, the output is shown without any error message.




It's a great experiment of fitting model. Thanks Mark!












創作者介紹

ToTo 奇妙の冒險

cchien 發表在 痞客邦 PIXNET 留言(13) 人氣()


留言列表 (13)

禁止留言
  • ssirt
  • COMMENT:
    哈...沒想到...只要踢掉空值就可以了啊.....

    感覺上就像是JAVA中的EXCEPTION啊....呵....

    真是個有趣的經驗耶...我都感覺到上了一課呢...



    ssirt
  • cchien
  • COMMENT:
    不是踢掉空值,而是把整個變數刪除

    我有問我老闆,如果這個變數真的很重要,那豈不是浪費了

    他說沒辦法~那表示資料不夠完備,只能從資料方面的補強去下手
  • 尚民
  • COMMENT:
    印象中有些方法

    可以補遺漏值...



    是班門弄斧

    不過讓我爽一下吧
  • cchien
  • COMMENT:
    你說的是內插法

    但不是萬靈丹
  • 咩
  • COMMENT:
    不好意思,

    想請教一下,

    若y is ordinal data,

    x1 is continuous data,

    x2 is ordinal data



    用GEE看它們的correlation是否恰當?

    Thanks~
  • cchien
  • COMMENT:
    What kind of correlation do you want to see?

    X1 vs Y?

    X2 vs Y?

    X1 vs X2?

    X1+X2 vs Y?

    or something else?
  • 咩
  • COMMENT:
    I want to see the correlation of

    x1 vs Y

    x2 vs Y

    x1 vs x2
  • cchien
  • COMMENT:
    X1 vs Y -> Spearman correlation

    X2 vs Y -> Spearman correlation

    X1 vs X2 -> Spearman correlation



    GEE is not for correlation....
  • COMMENT:
    不好意思,

    我沒講清楚,

    若為longitudinal data,

    可否用GEE?



    我以前對於repeated measurement有用過mixed model,

    但這次的data有ordinal的,

    查了一些資料好像也可以用GEE的方法...
  • cchien
  • COMMENT:
    有ordinal的變數還是可以用mixed model啊

    GEE主要是處理變數間有高度相關還有太多missing data的

    問題
  • COMMENT:
    這次要處理的變數的確有高度的相關,

    其實我只是要確定有ordinal變數的情況下,

    用mixed model或用GEE是否都ok...
  • cchien
  • COMMENT:
    I suggest you do both of them, then compare

    results. In the mixed model, you need to

    confirm which variables are random effects and

    which variables are fixed effects. In genmode

    with GEE, you need to confirm the link function

    and the type of covariance structure.
  • 咩
  • COMMENT:
    嗯....

    我會比較看看這兩者結果的差異...^^
    -----