Support #2268
open
Added by Ziran Wei 2 months ago.
Updated about 1 month ago.
Description
Dear Understanding Society support team,
I am Ziran Wei, and I am quite new to this dataset. I am using the Code Creator to select some variables to do a trial run for my research (namely diabetestypn hcond14 hcondn14 hconds14 jspayu). The problem, however, is when I run the code given (the filepath of course modified), Stata appears to show file temp_a.dta not found. I wonder what I have done wrong and how to make it work.
Best regards.
Files
2268.do (8.03 KB)
2268.do |
|
Understanding Society User Support Team, 08/04/2025 05:10 PM
|
|
1.PNG (10.1 KB)
1.PNG |
|
Ziran Wei, 08/04/2025 06:15 PM
|
|
- Status changed from New to Feedback
- % Done changed from 0 to 70
- Private changed from Yes to No
Hello,
The file you're looking for, temp_a.dta, is automatically deleted in the last loop in the code (around line 170). If you don't change anything in the code except the paths at the beginning, the outcome file will be named UKHLS_wide_hij.dta (here for the wide format). Let us know if this explains the issue.
Best wishes,
UKHLS User Support
Hi UKHLS User Support
My problem is that the temp file was never created from the first place I believe, the warning of temp_a.dta not found is first seen here:
use pidp `firstvar' using "temp_`firstWave'", clear
file temp_a.dta not found
rather in the last loop.
Best Regards,
Ziran
Hi Ziran,
I get the code in the attached file when I try your combination of variables. It works for us, can you check it works for you?
Best wishes,
UKHLS User Support
Hi,UKHLS User Support
The same problem appears it seems.
I am really confused right now.
Best regards,
Ziran
Dear UKHLS User Support
I am adding this screenshot to show where I think the problem is.
Best Regards,
Ziran
Hello Ziran,
Just to double-check, are you running the syntax as a do-file?
From the screenshot you sent, it looks like you might be running it directly in the command window. Is that correct?
Best wishes,
UKHLS User Support
Yes! Sorry I was a bit new to this. Thank you so much!
Hi Ziran,
Have you now run the code as a dofile and not from the command window, and has that solved the problem?
Thanks,
Understanding Society User Support Team
Also available in: Atom
PDF