Description Fields Methods Examples
You can have Reference Class containing some calculations by giving formula and data.
formula
Formula
data
A data frame
coef()
This function returns regression coefficients
plot()
This function plots two graphs, such as Fitted values vs Residuals and Scale Location by using given formula and data in initialization.
pred()
This function returns fitted value.
print()
This function prints regression coefficients by using given formula and data in initialization.
resid()
This function returns residuals value.
summary()
This function prints the coefficients with their standard error, t-value and p-value.
1 2 3 4 5 6 7 | data(iris)
linreg$new(Petal.Length~Sepal.Width+Sepal.Length, data=iris)$print()
linreg$new(Petal.Length~Sepal.Width+Sepal.Length, data=iris)$pred()
linreg$new(Petal.Length~Sepal.Width+Sepal.Length, data=iris)$summary()
linreg$new(Petal.Length~Sepal.Width+Sepal.Length, data=iris)$resid()
linreg$new(Petal.Length~Sepal.Width+Sepal.Length, data=iris)$coef()
linreg$new(Petal.Length~Sepal.Width+Sepal.Length, data=iris)$plot()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.