Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: odd behavior of -sem- in Stata 13


From   Lance Erickson <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: odd behavior of -sem- in Stata 13
Date   Thu, 11 Jul 2013 21:00:42 +0000

Jeff,

Thanks for the reply. Does finding a bug qualify me to get a free Stata t-shirt?

Lance


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jeff Pitblado, StataCorp LP
Sent: Thursday, July 11, 2013 1:58 PM
To: [email protected]
Subject: Re: st: odd behavior of -sem- in Stata 13

Lance Erickson <[email protected]> is using -sem- in Stata 13 and gets an error message where -sem- in Stata 12 just fits the model:

> Has anyone experienced problems estimating SEM models in Stata 13 that 
> ran without problems in Stata 12 (Windows 7)?
> 
> I had prepared some analyses that were successfully estimated by Stata 
> 12 and now going back to them after installing Stata 13 there are some 
> problems. Here's the code...
> 
> ********
> sem (tenure skdis5r dauthority managersup satcowr satjobr <- WRKCNTXT) ///
> 	(meaningful <- WRKCNTXT) ///
> 	(perform <- marital WRKCNTXT meaningful) 
> 	if creative==1, ///
> 		covstr(e.satcowr e.satjobr, unstructured) ///
> 		covstr(e.satcowr e.managersupp, unstructured) ///
> 		covstr(e.dauthority e.satjobr, unstructured) ///
> 	method(mlmv)
> ********
> 
> And here is the error I get ...
> 
> ********
> note: The following observed variable name will be treated as a latent
> variable: ANsample.  If this is not your intention use the 
> nocapslatent option, or identify the latent variable names in the latent() option.
> latent variable 'ANsample' not referenced in the model r(198);
> ********
> 
> The model does run in Stata 13 if I identify the latent variable in 
> the
> -latent()- option as suggested by the error message. But, the SEM 
> manual says that the command should identify variables as latent if 
> the first letter is capitalized. Just to check, I did manage to access 
> Stata 12 and run the exact same command runs fine without the 
> -latent()- option. Could this be a feature change across the versions or is it a bug?
> 
> What seems particularly odd to me is that I was able to get Stata 13 
> to estimate the models by deleting any variables from the data set 
> that weren't included in the model. I didn't need to add the -latent()- option either.
> I'm deleting many variables when I do this and I haven't taken the 
> time to explore whether it's a single variable or set of variables 
> that need to be deleted.
> 
> Again, does anyone know if there are known bugs with -sem- in Stata 13 
> that might account for this? Or am I ignorant to some new feature?

Lance has found a bug in some new latent variable parsing logic that was added to -sem- in Stata 13.  There is a variable in the dataset with a capitalized name that -sem- is not handling correctly.

We have reproduced the problem and have a fix that will be available in a future update to Stata 13.

In the mean-time, Lance has discovered the two work-arounds to this problem.

--Jeff
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index