Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Martin Weiss" <martin.weiss1@gmx.de> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: RE: RE: programming error with -generate- |
Date | Mon, 8 Mar 2010 22:43:08 +0100 |
<> Forget this answer... If it happened in Stata 11, I would suspect some connection to the new -fvvarlist-s, where the "1." could be seen as selecting a level. But it also happens in Stata 10.1, so this is unlikely to be the real culprit... HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martin Weiss Sent: Montag, 8. März 2010 22:35 To: statalist@hsphsun2.harvard.edu Subject: st: RE: programming error with -generate- <> Should be ******* gen y = 1.2*x + 6 ******* HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Visintainer, Paul Sent: Montag, 8. März 2010 22:32 To: 'statalist@hsphsun2.harvard.edu' Subject: st: programming error with -generate- I have a question which I hope merely reflects that I'm missing something obvious or a syntax that I don't recognize. I'm using version 10.1 MP on a PC. I've run this on three different PCs and get the same result. Why doesn't the generate command for "y" give an error? The -generate- command gives errors for y1, y2, and y3. Also, I don't understand the output for -tab- command for "y". Is there some syntax that I'm not aware of? What am I missing here? . clear . set obs 10 obs was 0, now 10 . range x 1 10 . range t 1 10 . range w 1 10 . gen y = 1.2x + 6 <----- why isn't there an error here? . gen y1 = 1.2t + 6 2t invalid name r(198); . gen y2 = 1.2w + 6 2w invalid name r(198); . gen y3 = 2x + 6 2x invalid name r(198); . tab y y | Freq. Percent Cum. ------------+----------------------------------- 72 | 10 100.00 100.00 ------------+----------------------------------- Total | 10 100.00 ___________________________________ Paul F. Visintainer, PhD Baystate Medical Center Division of Academic Affairs - 3rd Floor Springfield, MA 01199 ---------------------------------------------------------------------- CONFIDENTIALITY NOTICE: This email communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. If you have received this communication in error, please reply to the sender immediately or by telephone at (413) 794-0000 and destroy all copies of this communication and any attachments. For further information regarding Baystate Health's privacy policy, please visit our Internet web site at http://www.baystatehealth.com. * * 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/ * * 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/ * * 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/