0
votes

I am trying to run this code:

gen ttt = tt + 123;

tsset ttt, quarterly;

gen lOE = ln(OE);

gen grOE = lOE - L.lOE;

I keep getting an error saying 123 is a "invalid name". Could someone explain why this is happening and how I could fix it. I am very new to Stata so I have no idea. Thanks!

2

2 Answers

0
votes

I can't reproduce that.

clear 
set obs 1 
gen tt = 1 
#delimit ; 
gen ttt = tt + 123; 
#delimit cr 

list 

     +----------+
     | tt   ttt |
     |----------|
  1. |  1   124 |
     +----------+

Please give a reproducible example: https://stackoverflow.com/help/mcve

0
votes
infile tt OE OUR OER AE AUR AER using "/Users/blank/Desktop/Data/LF Real Stata.dta"

As help infile explains, your infile command is intended to for importing into Stata unformatted text data. But the filename you specify suggests that the file contains a Stata dataset. Perhaps you meant

use tt OE OUR OER AE AUR AER using "/Users/blank/Desktop/Data/LF Real Stata.dta"