fibta.blogg.se

Stat transfer variables in rows not columns
Stat transfer variables in rows not columns






stat transfer variables in rows not columns

GDPCA B GDPA D MEHOINUSA646N F RTFPNAUSA632N~G H TWEXBANL J AEXUSEU L BPBLTT01USA188S N (Basically here is what my variable names look like when I import them to stata: ]īasically, I feel that when I have all the variables in there, it is putting the variables one below the other. Rename (oldnames) (newnames) addnumber sort. GDPCA GDPA MEHOINU~646N RTFPNAUSA6~G TWEXBANL AEXUSEU BPBLTT0~188S excel_row_~m When I put in all the data and run the code above, I get the following error message:

stat transfer variables in rows not columns

So the following code:Ĭlyde, I am sorry to bother you but I ran into an error when I run the code you gave for my entire data. I would also imagine that for most purposes you would also be best off then changing from wide to long layout.

stat transfer variables in rows not columns

"" "939.0" "" "74.3" "" "29943.0" "" "0.6"ĭrop in 1Once that much is done, you will probably want to convert the date variables from stings to Stata internal format numerical dates, and you will want to -destring- the value variables. "date" "value" "date" "value" "date" "value" "date" "value" Input str10 gdpca str6 var2 str10 gdpa str5 var4 str10 mehoinusa646n str7 var6 str10 rtfpnausa632nrug str5 var8 Thanks in advance for your help!Ĭode: * Example generated by -dataex. Here is a sample table here to show how my data looks: (I am sorry, I am not able to install dataex to show it in the format that it is supposed to be in for posting questions.) My apologies in advance if this is messy but we have major issues with stata at work, where we are not able to install any user defined programs. And the names of the variables are also not very intuitive. I can replace the variables but given that I have around 35 variables for each frequency, I was wondering if there was a command which could do it easily without me having to type replace for each and every column. However, I was wondering if there was a way to do it in stata? I tried looking it up online but have not found anything which offsets column name by one column. For now, I move the top row cells to the right in excel to ensure that the names of the variables correspond to the column with the corresponding data in it. However, the data source from where I pull this information (FRED) places the name of the variable on the year column and leaves a blank for the actual data column in excel, which is where I update the data on a regular basis. I have around 35 economic variables for each frequency (Annual, Quarterly, Monthly, Weekly and Daily).








Stat transfer variables in rows not columns