Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: RE: Differencing problem


From   "Impavido, Gregorio" <GImpavido@imf.org>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Differencing problem
Date   Wed, 26 Jun 2013 20:39:39 +0000

It happens to me when I have a numerical variable mistakenly formatted as string.  Likely a remote possibility in your case but just in case.....

Gregorio

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Michael Betz
Sent: Wednesday, June 26, 2013 4:20 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: Differencing problem

Hi,

I am trying to use the "d." operator to get differenced observations but am having some trouble. When I try to calculate differenced observations using 

gen newvar=d.(var)

Stata returns each observation as missing. My data has observations for each variable in each of two time periods and variation exists over the two time periods. I've used the "d." before without problems so I'm not sure what I'm missing here. Any help is appreciated.

Mike


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index