0
$\begingroup$

Here's an example of the situation I'm having trouble with: I have data about car accidents and weather conditions where I would like to do a binary logistic regression to see how weather conditions correlate to car accidents occurring. However, my data only has weather conditions for when accidents occurred as every row of data represents an accident, in other words it only has the "1" case of the binomial and not the "0" case.

From what I understand there isn't a way to perform a binary logistic regression on whether or not a car accident occurred in this case. Is there another more meaningful way to find correlations in the weather data in my dataset? Is it even possible to correlate weather to car accidents with a dataset like this? In general, what kind of statistical tests can I use to find correlations in these types of situations? Am I looking at the problem wrong?

EDIT:

Responding to comment to clarify.

The car accidents data consist of only accidents that have come to my attention so it isn't every accident in a given area. Some of the accidents have occurred due to weather and some have not. The weather data consists of values such as temperature, humidity, precipitation, pressure, wind (speed/direction/gusts). All we know about the accidents is that they occurred, which is what caused them to be on the list.

Is there a way to test for a correlation/linear relationship in data like this? The part that is confusing me is that if I were to try to do a linear regression, I have nothing to put on the Y axis as everything is weather data and the value I are about (whether an accident occurred or not) is not part of the data in quantitative way.

Example Dataset:

accident_id,timestamp,precipitation,relative_humidity,wind_speed,wind_direction,pressure,temperature
1,2021-12-18:01,4.5,93,8.8,200,973.4,14.4
2,2021-11-17:07,1,78,7.3,230,976.25,11.4
3,2021-10-23:13,0,58,11.8,290,992.1,1.1

The units are: id: int timestamp: YYYY-MM-DD:HH precipitation: mm relative humidity: % wind speed: m/s wind direction: degrees pressure: mb temperature: celsius

$\endgroup$
2
  • 2
    $\begingroup$ Whether it is possible to relate weather to accidents depends primarily on how these data were collected and what they represent. Can you tell us more about that? For instance, do you have records of all car accidents for a specified geographic area and time frame? Or only for those that happened to come to your attention for some reason (because they were reported to a specific agency or insurer, perhaps)? What data do you have about traffic intensity throughout the study? About weather? $\endgroup$
    – whuber
    Commented Jan 3, 2022 at 19:03
  • 1
    $\begingroup$ Can you provide a representative sample of the data (doesn't have to be real). If you have enough features, it may still be possible to find a relationship between some of them. For example, perhaps there is a relationship between loss severity (how much it cost) and weather. Or the split between first-party and third-party damage may be related to weather (skid further on wet roads and perhaps more likely to skid off road into building, parked car, etc.). Without knowing what you have, it's hard to make any more specific suggestions. $\endgroup$
    – Avraham
    Commented Jan 3, 2022 at 22:03

1 Answer 1

2
$\begingroup$

How does the distribution of your covariates differ from the distribution of those covariates on a given random time in a given day where an accident didn't occur?

Your best bet would be to collect data points of weather conditions on occurrences in which an accident didn't occur in similar geographic areas, perhaps publicly via an API, then append it to your dataset as part of your training and testing set.

$\endgroup$
4
  • $\begingroup$ If I add rows of data where accidents did not occur, what kind of test would I then use to make the comparison and look for correlations? $\endgroup$
    – ss7
    Commented Jan 4, 2022 at 19:54
  • 1
    $\begingroup$ You can build a simple binary classification model such as Logistic regression or CNN model to predict the target from the given covariates. $\endgroup$ Commented Jan 4, 2022 at 19:59
  • $\begingroup$ Thanks. A logistic regresison was what I was considering using. In the interest of populating my data, if I have for example 10k rows of observations of accidents. How many rows of data where accidents didn't happen would be necessary? $\endgroup$
    – ss7
    Commented Jan 4, 2022 at 20:22
  • 1
    $\begingroup$ Equally number of 1s and 0s is desirable so that the model can learn the intricacies of each situations. $\endgroup$ Commented Jan 4, 2022 at 20:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.