Ridehailing has become a main-stream mobility option in many cities around the world. Many factors can influence an individual's decision to use ridehailing over other modes, and the growing need of policy makers to make built-environment and regulatory decisions related to ridehailing requires an increased understanding of these. This study develops a model that estimates how the built environment affects the decision to choose ridehailing for making non-work trips, while carefully accounting for a variety of confounding effects that could potentially bias the results (if ignored or improperly incorporated). These include: total number of trips, differences in supply between urban and non-urban areas, residential choice (e.g. urban versus non-urban areas), and household choice of whether to own a vehicle. The researchers use individual-level data from a California travel survey that includes detailed attitude measurements to estimate an integrated choice and latent variable (ICLV) model to properly specify these effects. The investigators include accessibility measures used elsewhere (e.g., Walkscore) plus measures developed for this study. Our analysis estimates the effect of these measures on ridehailing mode share, and how they differ between urban and non-urban areas. This analysis results in several major findings: the researchers confirm that omission of latent preferences for residential location and vehicle ownership from the analysis can lead to biased results; previous studies may have overestimated the complementarity or substitution relationships between public transit and ridehailing by ignoring confounding effects; and even after accounting for other effects, individuals living in vibrant and walkable neighborhoods have a higher mode share for ridehailing (potentially using it instead of active modes).