| p_lm | R Documentation |
A wrapper function for lm(), with the data argument listed first to support native piping.
p_lm(data, formula, ...)
data |
the data |
formula |
the formula |
... |
additional arguments passed to |
an lm object
# load the data
data(nhanes)
# define country
nhanes<-nhanes |> transform(
country=base_match(dmdborn4,'USA'=1,'Other'=2)
)
# fit a model
my_model<-nhanes |> p_lm(bpxosy1~country)
# obtain model details
my_model |> summary()
# obtain confidence interval
my_model |> confint()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.