home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / bit / listserv / sasl / 5391 < prev    next >
Encoding:
Text File  |  1992-12-16  |  2.0 KB  |  63 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Newsgroups: bit.listserv.sas-l
  3. Path: sparky!uunet!paladin.american.edu!auvm!idui1!localuser
  4. References:  <SAS-L%92121612131499@UGA.CC.UGA.EDU>
  5. Message-ID: <92351.112359STATPROG@IDUI1.BITNET>
  6. Date:         Wed, 16 Dec 1992 11:23:59 PST
  7. Reply-To:     STATPROG@IDUI1.BITNET
  8. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  9. Comments:     Warning -- original Sender: tag was NETNEWS@IDUI1
  10. From:         STATPROG@IDUI1.BITNET
  11. Subject:      GLS in PROC MIXED
  12. Lines: 49
  13.  
  14. I am trying to reproduce the following IML procedure in
  15. PROC MIXED.  It is simply a case where I have estimated
  16. the variance-covariance matrix and want to use it in my
  17. regression.  I haven't had any luck with MIXED so far
  18. but I'm not very familiar with it.
  19.  
  20.          Thanks in advance
  21.             Bill Price
  22. ----------------------------  cut here  ---------------------
  23.  
  24.  
  25. OPTIONS PS=65 NOSOURCE NONOTES;
  26.  
  27. PROC IML;
  28.  
  29.     X={1 1,1 2,1 3,1 4,1 5,1 6};
  30.     Y={2,5,7,7.5,11,13};
  31.  
  32.     V={3 2 1 0 0 0,
  33.        2 2 1 1 0 0,
  34.        1 1 4 1 1 0,
  35.        0 1 1 3 2 1,
  36.        0 0 1 2 3 2,
  37.        0 0 0 1 2 2};
  38.     PRINT V;
  39.  
  40.     B=INV(X`*V*X)*X`*V*Y;
  41.  
  42.     PRINT Y B,X;
  43.  
  44.     SSE=Y`*(V - V*X*INV(X`*V*X)*X`*V)*Y;
  45.  
  46.     SSM=INV(J(1,6,1)*V*J(6,1,1))*(Y`*V*J(6,1,1)*J(1,6,1)*V*Y);
  47.  
  48.     SSMOD=B`*X`*V*Y - SSM;
  49.  
  50.     SSTOT=Y`*V*Y - SSM;
  51.  
  52.     PRINT SSE SSMOD SSTOT SSM;
  53. *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
  54. *                                           (__)                (__)    *
  55. * Bill Price                                (oo)                (00)    *
  56. * Research Associate                 /-------\/         /-------(  )    *
  57. * Ag. Statistical Programs          / ║     ║║         / ║     ║║()     *
  58. * University of Idaho              *  ║║----║║        *  ║║----║║       *
  59. *                                     ~~    ~~           ~~    ~~       *
  60. * statprog@IDUI1                        Cow            Cow  Chewing     *
  61. * statprog@idui1.csrv.uidaho.edu                          Marbles       *
  62. *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
  63.