Hi folks,
I am having an issue with Stata versions that is perplexing and have not been able to find a solution online.
In my .do file, I bring in some data and collect and save a table of estimates from it. (I had originally saved it as a temp file, as I do other ado created files, but am now saving it as a .dta file to the working folder.) Later in the .do file I try to merge that file with a working file and I get the error, "file G:\Shared drives\siting_db\lbwmr\data\2024\temp\ptech.dta from more recent version of Stata; type update query to see if an update to Stata is available and look at https://www.stata.com/ to see if a new version of Stata is available."
I am using StataNow/MP 19.5 and it is up to date. The perplexing thing is the file is created from within the same version of Stata.
I will note that a previous version of this semi-annually run script used the .table, replace command, so I had to get up to speed on the .table, then collect save command. I wonder if I am doing something wrong there. That set of commands is as follows:
use "$temp\lbwmr_data.dta", clear
qui table p_id [fweight= i_tnum] if p_year>=1998, stat(mean t_rd t_rsa t_hh t_np_cap t_sp) nototals
collect save "$temp\ptech.dta" , replace
And the command that is giving me the error is:
merge 1:1 p_id using "$temp\ptech.dta", keep(match master) keepusing(t_rd_avg t_rsa_avg t_hh_avg t_cap_avg t_sp_avg) nogen //adding the tech averages
Interestingly, I merge in a few other temp files I save earlier in the.do file, and they merge without this version error.
I suspect someone will see the error in my ways.
Thank you, in advance,
Ben
Ben Hoen
Berkeley Lab
I am having an issue with Stata versions that is perplexing and have not been able to find a solution online.
In my .do file, I bring in some data and collect and save a table of estimates from it. (I had originally saved it as a temp file, as I do other ado created files, but am now saving it as a .dta file to the working folder.) Later in the .do file I try to merge that file with a working file and I get the error, "file G:\Shared drives\siting_db\lbwmr\data\2024\temp\ptech.dta from more recent version of Stata; type update query to see if an update to Stata is available and look at https://www.stata.com/ to see if a new version of Stata is available."
I am using StataNow/MP 19.5 and it is up to date. The perplexing thing is the file is created from within the same version of Stata.
I will note that a previous version of this semi-annually run script used the .table, replace command, so I had to get up to speed on the .table, then collect save command. I wonder if I am doing something wrong there. That set of commands is as follows:
use "$temp\lbwmr_data.dta", clear
qui table p_id [fweight= i_tnum] if p_year>=1998, stat(mean t_rd t_rsa t_hh t_np_cap t_sp) nototals
collect save "$temp\ptech.dta" , replace
And the command that is giving me the error is:
merge 1:1 p_id using "$temp\ptech.dta", keep(match master) keepusing(t_rd_avg t_rsa_avg t_hh_avg t_cap_avg t_sp_avg) nogen //adding the tech averages
Interestingly, I merge in a few other temp files I save earlier in the.do file, and they merge without this version error.
I suspect someone will see the error in my ways.
Thank you, in advance,
Ben
Ben Hoen
Berkeley Lab