estimate_lm.RdEstimate a linear regression model
estimate_lm(y, ...) # S3 method for default estimate_lm(y, x, data, ...) # S3 method for formula estimate_lm(y, data, ...)
| y | a vector of response values or a formula |
|---|---|
| ... | additional arguments passed to child functions |
| x | predictor(s), a matrix |
| data | a data.frame containing the data |
a posterior distribution for the regression parameters
default: Default method
formula: Method for a formula
post <- estimate_lm(Petal.Length ~ Petal.Width, data = iris) summary(post) #> #> Iterations = 1:1000 #> Thinning interval = 1 #> Number of chains = 1 #> Sample size per chain = 1000 #> #> 1. Empirical mean and standard deviation for each variable, #> plus standard error of the mean: #> #> Mean SD Naive SE Time-series SE #> beta[1] 1.072 0.3229 0.010212 0.010212 #> beta[2] 2.233 0.2193 0.006933 0.006933 #> sigma2 4.343 0.4996 0.015797 0.015797 #> #> 2. Quantiles for each variable: #> #> 2.5% 25% 50% 75% 97.5% #> beta[1] 0.4419 0.8642 1.076 1.297 1.692 #> beta[2] 1.8081 2.0914 2.233 2.384 2.674 #> sigma2 3.4083 3.9906 4.320 4.677 5.357 #> plot(post)![]()