View source: R/dthelper-computation-functions.R
regress.with | R Documentation |
Perform separate regressions for each unique group
regress.with( form, df, group, output = c("Estimate", "Std. Error", "t value", "Pr(>|t|)"), dp = 2 )
form |
Input formulae as string |
df |
data.frame object |
group |
Grouping variable. If specified, correlation will be performed within each group separately |
output |
Desired statistical output. Set to "Estimate", "Std. Error", "t value", or "Pr(>|t|)" |
dp |
Percentage of missing data will be reported. dp allows re-specification of number of decimal places |
data.frame object
library(car) regress.with("mpg ~ wt + cyl",group="am", mtcars, output = "Estimate") regress.with("mpg ~ wt + cyl",group="am", mtcars, output = 2) # standard error
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.