Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: -svy: mean - problem with returned matrices


From   Steven Samuels <ssamuels@albany.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Re: -svy: mean - problem with returned matrices
Date   Thu, 31 May 2007 13:51:00 -0400

Nick, Stas, Michael, Richard: Thanks for your quick responses. The problem (i.e. bug) is not confined to -display-. I also could not not use "el(e(b),1,1)" as an expression in -generate- or -local-. I guess it's time for me to buckle down and learn Mata; meanwhile, Michael and Richard's solution is all I need.

Steve


On May 31, 2007, at 1:04 PM, Michael Blasnik wrote:


...
A work around to deal with this type of error is usually to just copy the ereturned matrix to a regular matrix

mat beta=e(b)
di el(beta,1,1)

works fine.

Michael Blasnik

----- Original Message ----- From: "Steven Samuels" <ssamuels@albany.edu>
To: <statalist@hsphsun2.harvard.edu>
Sent: Thursday, May 31, 2007 12:38 PM
Subject: st: -svy: mean - problem with returned matrices



Can anyone explain why I get the following error? How can I access the elements of the matrix which generates the error?
Thanks,

Steve

Program:
/************************************/
webuse nhanes2, clear
svyset
svy : mean height
ereturn list
matrix list e(V_srs)
di el(e(V_srs),1,1) //OKAY

matrix list e(b)
di el(e(b),1,1) //GENERATES ERROR
/*************************************/
<snip>
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index