|  | 
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: corr_svy  & covariance matrix for survey data
Dear List,
I am using Stata 10/SE 10.1 for Macs. I have two questions. One  
concerning the --corr_svy-- module and error messages I have been  
getting, the second concerning how to obtain a covariance matrix for  
complex survey sample data, within Stata.
I am working with a complex survey sample dataset and am using Stata  
for some preliminary data analyses (univariate and multivariate checks  
for normality, efas) before moving to Mplus for SEM modeling. I  
installed the --corr_svy-- module from within Stata by typing "ssc  
install corr_svy"
However, in my first attempt below, I got the following error message:
svy, subpop (if race3cat==2 & sex==1 & (riwyes==1 & riwyes <.)):  
corr_svy lesscurt lessresp poorserv notsmart actfraid thkdisho  
actbettr callnmes trethara follstor, pw obs sig
corr_svy is not supported by svy with vce(linearized); see help svy  
estimation for a list of Stata estimation commands that are supported  
by svy
r(322);
I then attempted to reset the weight and design variables, and run the  
--corr_svy--, following the example in the "help" for the -- 
corr_svy--, excluding my subpop specification.
. svyset clust [pweight=wgtcentriw], strata (stratum) ||_n
Note: stage 1 is sampled with replacement; all further stages will be  
ignored
      pweight: wgtcentriw
          VCE: linearized
  Single unit: missing
     Strata 1: stratum
         SU 1: clust
        FPC 1: <zero>
. corr_svy lesscurt lessresp poorserv notsmart actfraid thkdisho  
actbettr callnmes trethara follstor, pw obs sig
This worked--but it didn't include my subpop specification. I then  
tried the same thing with my subpop specifcation and it DIDN'T work.  
Any ideas on how to use the corr_svy module to obtain the correlation  
matrix, accounting for the weight and design variables and allowing me  
to restrict my analyses to my subpop of interest?
 corr_svy lesscurt lessresp poorserv notsmart actfraid thkdisho  
actbettr callnmes trethara follstor [pweight=wgtcent], strata(stratum)  
psu(clust) subpop(if race3cat==2 & sex==1 & (riwyes==1 & riwyes <.))  
pw obs sig print(10) star(5)
subpop() does not contain a valid varname
r(198);
. svyset clust [pweight=wgtcentriw], strata (stratum) ||_n
Note: stage 1 is sampled with replacement; all further stages will be  
ignored
      pweight: wgtcentriw
          VCE: linearized
  Single unit: missing
     Strata 1: stratum
         SU 1: clust
        FPC 1: <zero>
. corr_svy lesscurt lessresp poorserv notsmart actfraid thkdisho  
actbettr callnmes trethara follstor, pw obs sig
In addition, does anyone know how to use the matrix I am trying to  
obtain above to obtain a covariance matrix that can be easily  
transferred to Mplus or LISREL for CFA and SEM analyses?
Thanks for your consideration,
Ishtar Govia
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/