Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Calculate cycling uptake for 'Go Dutch' scenario : uptake_pct_godutch() #65

@Yuhei110

Description

@Yuhei110

I try to calculate cycling uptake for 'Go Dutch' scenario with sample values. The function, uptake_pct_godutch() and the formula give different results.

The formula that I used is:

Equation 1B:
logit(pcycle) = Equation 1A + Dutch parameters = -3.959 + (-0.5963 * distance) + (1.866 * distancesqrt) + (0.008050 * distancesq) + (-0.2710 * gradient) + (0.009394 * distance*gradient) + (-0.05135 * distancesqrt *gradient) + (2.523 *dutch) + (-0.07626 * dutch * distance)

which is obtained from:
APPENDIX 1 : The National Propensity to Cycle Tool for England ( PCT-England ), version 1 : Description of methodology for scenario-building (https://www.jtlu.org/index.php/jtlu/article/downloadSuppFile/862/360)
Thank you in advance, @Robinlovelace

Distance = 15
Gradient = 2

logit =
    -3.959 + 
  (-0.5963 * Distance) + 
  (1.866 * sqrt(Distance)) + 
  (0.008050 * Distance^2) +
  (-0.2710 * Gradient) + 
  (0.009394 * Distance*Gradient) + 
  (-0.05135 * sqrt(Distance) *Gradient) +
  2.523 +
  (-0.07626*Distance)
# Result: -3.144098

pcycle = exp(logit) / (1 + exp(logit))
# Result: 0.04132445

uptake_pct_godutch(Distance, Gradient)
# Result: 0.03159427

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions