library(linreg) data("iris")
This vignette summarises the Least-squares estimation and related techniques of linear regression that are available in linreg package.The examples are provided based on Iris data set and linear regression formula:
example_formula <- Petal.Length~Sepal.Width+Sepal.Length
The package contains linreg RC object, hence the syntax of calling it is:
linreg_example <- linreg$new(example_formula, data=iris)
The linreg includes calculations of these values:
Below are listed available methods with examples:
linreg_example$print()
linreg_example$plot()
residuals <- linreg_example$resid() residuals[1:5]
predicted <- linreg_example$pred() predicted[1:5]
linreg_example$coef()
linreg_example$summary()
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.