if (requireNamespace("estimatr") && getRversion() >= "4.1.0")
zlm_robust(cars, dist ~ speed) |> summary() |> try()
if (requireNamespace("MASS") && getRversion() >= "4.1.0")
zpolr(mtcars, ordered(gear) ~ mpg + hp) |> summary() |> try()
if (requireNamespace("pls") && getRversion() >= "4.1.0")
zplsr(cars, dist ~ speed) |> summary() |> try()
Run the code above in your browser using DataLab