Project

General

Profile

Actions

Support #2066

open

Code creator E-Mail

Added by Leo Haentjes 10 months ago. Updated 9 months ago.

Status:
Resolved
Priority:
High
Category:
Code Creator
Start date:
03/04/2024
% Done:

100%


Description

Hello, after multiple tries and hours of waiting time I still do not get an e-mail containing my code when I try to use the code creator. I would be very thankful if you could look into it and help me solve the problem.
Best regards


Files

2066 - wide format.txt (8.05 KB) 2066 - wide format.txt Understanding Society User Support Team, 03/07/2024 11:37 AM
2066 - long format.txt (7.9 KB) 2066 - long format.txt Understanding Society User Support Team, 03/07/2024 11:37 AM
Bildschirmfoto 2024-03-07 um 15.37.54.png (1.06 MB) Bildschirmfoto 2024-03-07 um 15.37.54.png Leo Haentjes, 03/07/2024 03:00 PM
Bildschirmfoto 2024-03-07 um 15.37.31.png (1.12 MB) Bildschirmfoto 2024-03-07 um 15.37.31.png Leo Haentjes, 03/07/2024 03:00 PM
2. 2066 (option2).log (11 KB) 2. 2066 (option2).log Understanding Society User Support Team, 03/08/2024 11:11 AM
1. 2066.log (49.1 KB) 1. 2066.log Understanding Society User Support Team, 03/08/2024 11:11 AM
Actions #1

Updated by Understanding Society User Support Team 10 months ago

  • Category set to Code Creator
  • Status changed from New to Feedback
  • % Done changed from 0 to 50
  • Private changed from Yes to No

Hello Leo,

I'll ask the data team about this issue. In the meantime, you could try using the "Get your code" tab where the code should be displayed immediately. Then, you can copy your code using the "Copy" tab option.

If this doesn't work, please share the variable names you're using, and I'll send you the code.

I hope this information is helpful.

Best wishes,
Roberto Cavazos
Understanding Society User Support Team

Actions #2

Updated by Leo Haentjes 10 months ago

Hello Roberto,

thank you for the fast reply. I have tried using the tab, but the code does not work for me in stata. One issue being that I do not fully understand the adjustments I am supposed to make in the first part, but also stata gives me error codes like "/ is not a valid command name".
The variables I am interested in are: sclfsato, jbsat, jbsemp, jhsemp, jbbgy, jbstat, jsboss, jspart, jssize, wkaut1, wkaut2, wkaut3, wkaut4, wkaut5 - plus the set of commonly used variables.
Thank you!

Leo

Actions #3

Updated by Leo Haentjes 10 months ago

Hello Roberto,

is there any progress on the e-mail issue or the code? Your help with the code creator is greatly appreciated.

Thank you very much and best regards
Leo

Actions #4

Updated by Understanding Society User Support Team 10 months ago

Hello Leo,
I’m attaching two text files with the syntax code in long and wide formats. The data file produced will be at the individual level and cover all ages, irrespective of the variables requested. You can, of course, restrict the sample for analysis based on your needs/preferences after you have created the file.

Regarding the code, you will need to adjust:
  • Replace “where” with the file path of the working folder (where any temporary files created by this code will be stored) eg: c:\ukhls\temp
    • cd "where"
  • Replace "where" with the folder path where the data has been downloaded and unzipped eg: c:\ukhls_data\UKDA-6614-stata\stata\stata13_se\ukhls
    • global ukhls "where\UKDA-6614-stata\stata\stata13_se\ukhls"
  • Replace "where" with the file path of the folder where you want to store the final dataset produced by this code. eg: c:\ukhls\results
    • global outputpath "where"
  • The file produced by this code will be named as below. If you want to change the name do it here replacing the name within quotation marks.
    • local outputfilename "UKHLS_long_hij"
  • By default, the data will be extracted from the waves whose letter prefixes are written below and merged. If you want a different selection of waves, make the change here
    • local allWaves = "h i j"
    • Let's say you want information from Waves 1 to 13, then you will need to change the previous bullet to: local allWaves = "a b c d e f g h i j k l m".

Other than these modifications, you shouldn't need to make any further changes.

I hope this information is helpful.

Best wishes,
Roberto Cavazos
Understanding Society User Support Team

Updated by Leo Haentjes 10 months ago

Hello Roberto,

thank you for your effort and the Codes. Unfortunately, I keep getting error codes like you see in the screenshots.

Kind regards
Leo

Updated by Understanding Society User Support Team 10 months ago

Hello Leo,
I tested the code on my PC, and it works fine. I’ve attached a log of my session named “2066”. However, please note that there is an error in the last line of the code. You’ll need to remove “$syntax;”, as it shouldn’t be there.

Are you running the code as a .do file or in the command window? If you’re using the latter, it doesn’t recognise the commands, resulting in these errors. You can view a record of this session in the attached log file named “2066 (option2)”.

I hope this information is helpful.

Best wishes,
Roberto Cavazos
Understanding Society User Support Team

Actions #8

Updated by Leo Haentjes 10 months ago

Hello Roberto,

thank you for your help, it has worked now. My key mistake was indeed using the command window, as I was not aware that I need to use a .do file. Thank you a lot for your enagagement!

Best regards
Leo

Actions #9

Updated by Understanding Society User Support Team 9 months ago

  • Status changed from Feedback to Resolved
  • % Done changed from 50 to 100
Actions

Also available in: Atom PDF