R Script Linear Regression
This R script analyzes an insurance claims dataset to model fire and smoke claims. I first transformed the
data set to create binary indicators for different claim types (wind/hail, water damage,
fire/smoke, contamination, and theft/vandalism). Histograms are then plotted to visualize the
presence of each claim type. A linear regression model is then fit using the fire/smoke claim
indicator as the response variable and various demographic and policy-related predictors. The
dataset is split into training and testing sets, and the regression model is trained on the training
data to understand the factors associated with fire and smoke claims.