The measurement of road roughness is important for the management of economic road maintenance. Not only is it an indicator of road condition and ride quality, but it also is used to determine road use costs, including travel time, fuel consumption, and vehicle maintenance. Because of the importance of roughness for road asset management decision-making, road agencies spend considerable resources trying to measure road roughness in a repeatable and reproducible manner. However, many road agencies with large road networks are unable to record the condition of the entire network on a sufficiently frequent basis to determine adequately road condition to make informed preventative maintenance decisions. To address this, research has been carried out to develop low cost smartphone based technologies fitted inside vehicles to measure road condition. The trial of these systems has met with varying degrees of success. This paper presents an in-depth parametric study carried out using state-of-the-art vehicle dynamics software, informed by a review of the literature, to appreciate how and to what degree various influencing variables might affect roughness measurements using a smartphone fitted to a moving vehicle. These variables included the type and position of the smartphone; the type, speed, mass, dynamic response, suspension system, and tire pressure of the vehicle in which the smartphone is fitted; and the longitudinal road profile. The results of the parametric analysis were used to build multivariate linear regression and machine learning algorithms which predict road roughness from a measure of a vehicle's vertical acceleration taking into account the predominant influencing variables. The multivariate linear regression equations can be used to predict road roughness with a similar degree of accuracy that is expected from a visual inspection. On the other hand, the machine learning algorithms, when suitably trained, were able to estimate reliably the road roughness on an integer-based rating scale at a level of detail which is suitable for strategic road asset management, provided that the vehicle type and speed and the type of smartphone are taken into account.