```
wb <- createWorkbook()
addWorksheet(wb, "Model Summary")
writeData(wb, "Model Summary", "Coefficients",
startRow = 1, startCol = 1)
writeData(wb, "Model Summary", coefficients, startRow = 2,
startCol = 1, rowNames = TRUE)
writeData(wb, "Model Summary", "R-Squared",
startRow = 2 + nrow(coefficients) + 2, startCol = 1)
writeData(wb, "Model Summary", r_squared,
startRow = 2 + nrow(coefficients) + 2, startCol = 2)
writeData(wb, "Model Summary", "Adjusted R-Squared",
startRow = 2 + nrow(coefficients) + 3, startCol = 1)
writeData(wb, "Model Summary", adj_r_squared,
startRow = 2 + nrow(coefficients) + 3, startCol = 2)
writeData(wb, "Model Summary", "F-Statistic",
startRow = 2 + nrow(coefficients) + 4, startCol = 1)
writeData(wb, "Model Summary", f_statistic[1],
startRow = 2 + nrow(coefficients) + 4, startCol = 2)
writeData(wb, "Model Summary", "p-Value",
startRow = 2 + nrow(coefficients) + 5, startCol = 1)
writeData(wb, "Model Summary", p_value,
startRow = 2 + nrow(coefficients) + 5, startCol = 2)
writeData(wb, "Model Summary", "Model Formula",
startRow = 2 + nrow(coefficients) + 6, startCol = 1)
writeData(wb, "Model Summary", model_formula,
startRow = 2 + nrow(coefficients) + 6, startCol = 2)
```