I know function durbinWatsonTest in package car use bootstrap method to calculate p-value, then the results are different when i rerun this code. Can someone know how to set seed this function? Many tks.
df <- structure(list(y = c(-2.59, -3.42, -3.19, -3.25, -3.51, -3.18,
-3.36, -3.12, -3.13, -3.02, -2.99, -3.03, -2.9, -2.8, -2.8),
x1 = c(17.25, 9.7, 7.35, 7.93, 8.66, 10.31, 10.32, 11.4,
11.23, 13.13, 13.88, 14, 14, 14, 13),
x2 = c(NA, NA, NA, NA, 17.25, 9.7, 7.35, 7.93,
8.66, 10.31, 10.32, 11.4, 11.23, 13.13, 13.88),
x3 = c(NA, NA, 7.4, 6.5, 6.52, 5.66, 3.1,
3.9, 4.6, 5.4, 5.84, 6.16, 6.52, 6.42, 5.9)),
row.names = c(NA, -15L), class = c("tbl_df", "tbl", "data.frame"))
model <- lm(y~x1+x2+x3, data = df)
durbinWatsonTest(model)