[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: may not use time-series operators on string variables
> In my dataset there is a variable v1, which is a string
> variable. I try to use l.v1, after i set the time variable (eg,
> tsset time). I don't know why stata do not permit timeseries
> operators on string variables, it seems not reasonable for the
> lag or lead operators, beyond the difference operators
> i wonder if there is some sort way so that i can use the laged
> string variable?
Yes. -destring- your string variable first. Stata quite reasonably
wants you to have your variables with numeric meaning held as numeric.
* For searches and help try: