VisionEval / VisionEval-Dev

Development version of VisionEval framework
https://visioneval.github.io/
Apache License 2.0
6 stars 32 forks source link

What is the Power Transformation Used in CalculateHouseholdDvmt #147

Closed JohnMillerVDOT closed 3 years ago

JohnMillerVDOT commented 3 years ago

One item we want to double check in the CalculateHouseholdDvmt Module is the manner in which household DVMT is calculated.  The Github Wiki (see https://github.com/gregorbj/Archive-VisionEval/blob/develop/sources/modules/VEHouseholdTravel/inst/module_docs/CalculateHouseholdDvmt.md) indicates that the following parameter values give an estimate of metropolitan household VMT.  However, we are not able to replicate these calculations.  For example, in the table below, the left two columns show the parameter values associated with the “metropolitan household power-transformed travel day DVMT linear model” from the Wiki, the next column shows the value for one particular household used by VDOT, and the right column shows the product.  The sum of these rows (2.70595) should represent a power-transformed household DVMT.  If we did this correctly, we estimate a very low household DVMT of about 8.043—but VisionEval reports a larger (and more reasonable!) value of 20.26281.  By any chance, is the reason for the difference because the power transformation used by VisionEval differs from what we have inferred?   (The Wiki notes a power transformation with a coefficient of 0.24 is used but does not provide a formula.  We are guessing that VisionEval uses a one-parameter Box-Cox transformation, so that if DVMT were 8.043, one would compute 8.043 raised to the power of 0.24, then subtract 1, then divide the result by 0.24 to get 2.70595 as the transformed value presumably used in the regression.  But maybe VisionEval does something different?)

Variable Coefficent used in VisionEval Value for a household used by VDOT Product
Intercept 1.0850 1 1.085
Drivers - number of drivers in the household 0.0866 2 0.17326
LogIncome - natural log of annual household income ($2001) 0.0924 12.16651 1.12467
Hbppopdn - density (pop/sq mi) of the census block group -0.00000910 13215.61 -0.12022
NumVeh - number of vehicles owned or leased by the household 0.0426 2 0.0852
ZeroVeh - dummy variable identifying whether the household has no vehicles -0.1269 0 0
OneVeh - dummy variable identifying whether the household has only one vehicle -0.0842 0 0
Workers - number of workers in the household 0.1208 2 0.2416
Age0to14 - number of persons in the 0 - 14 age group in the household 0.0725 2 0.145
UrbanDev - whether the block group is urban mixed-use -0.0602300 1 -0.06023
FwyLaneMiPC - ratio of freeway lane miles to urbanized area population 75.5400 0.0004 0.031667
Total     2.70595
Metropolitan Power Transform (given in the Wiki)     0.24
Estimated DVMT where 2.70595  = (DVMT ^ 0.24  – 1) / 0.24     8.043
Actual DVMT reported by Vision Eval     20.26281

 

Thanks!  John Miller (434-293-1999 is office)

gregorbj commented 3 years ago

Here is the key module code for modeling the power-transformed DVMT and then transforming it (for metropolitan areas). The code wrapped in the "as.vector" function call applies the model. The code following that function call does the transformation: AveDvmt[IsUr] <- as.vector(eval(parse(text = DvmtModel_ls$Metro$Ave), envir = Hhdf[IsUr,])) ^ (1 / DvmtModel_ls$Metro$Pow)

JohnMillerVDOT commented 3 years ago

Thank you so much for taking the time to respond. So let's say the "Total" in the above table (fourth line from the bottom) is computed as 2.70595 and that the Metropolitan Power Transform (third line from the bottom) is 0.24 as shown in the Wiki. Is the DVMT then found to be 8.043 (second line from the bottom)? Best, John Miller 434-327-2380 is cell or 434-293-1999

JohnMillerVDOT commented 3 years ago

Thank you so much for taking the time to respond. So let's say the "Total" in the above table (fourth line from the bottom) is computed as 2.70595 and that the Metropolitan Power Transform (third line from the bottom) is 0.24 as shown in the Wiki. Is the DVMT then found to be 8.043 (second line from the bottom)? Best, John Miller 434-327-2380 is cell or 434-293-1999

gregorbj commented 3 years ago

Since 0.24 is the power that was used to transform household DVMT in the model estimation to 'normalize' the distribution, the inverse (1/0.24 = 4.16667) is the power used to convert the power-transformed DVMT prediction produced by the linear model. The household DVMT is therefore 2.70595^4.16667 = 63.28981

JohnMillerVDOT commented 3 years ago

Thank you so much--that clarifies the computation immensely!