Stata code for converting 2020 tract-level variables to the 2010 tract-level format by using the Stata version of the crosswalk between 2020 tracts and 2010 tracts

Dear all,

I have compiled ACS tract-level variables on computers and the internet for 2017, 2018, and 2019.  I need to add the same variables for 2020. 
However, tract boundaries have changed in 2020, and I want to convert the 2020 tract-level variables to the 2010-tract format, so that all 4 year data will be in the 2010-tract format. 
I downloaded the Stata version of the tract--crosswalk-2010-2020 file from the census bureau's relationship file. 
However, I need the Stata code that actually allows me to convert the 2020-tract level variables to the 2010-tract format,
and I wonder if anyone can help or where I could find the code? 
Or at least what weight I need to use when converting the 2020-tract level variables to the 2010-tract format, such as landratio_20_10 or arearatio_20_10? 
That is, I think I would have something like  in the Stata code: "collapse variables  [aw= landratio_20_10], by (tractid_2010)"
I also realized that the crosswalk file has a good number of missing values and zeros, and I wonder how I should treat them when converting.
I would appreciate your help and response.
Thanks,
Kangoh