regLins
is an R package for performing linear regression analysis with different optimization methods and provides a Shiny application for interactive analysis.
Ensure you have R installed. You can download it from CRAN.
If you haven't already installed the devtools
package, do so by running:
install.packages("devtools")
You can install the regLins
package directly from GitHub using the devtools
package:
library(devtools)
install_github("dzakwanalifi/regLins")
The regLin
function allows you to perform linear regression using different optimization methods.
library(regLins)
# Generate some example data
set.seed(123)
y <- rnorm(100)
X <- cbind(1, rnorm(100))
# Perform regression using the regLin function
model <- regLin(y, X, method = "kuadrat terkecil")
# Summarize the model
summary(model)
The regLins
package includes a Shiny app for interactive analysis.
library(shiny)
library(regLins)
# Run the Shiny app
runApp(system.file("shinyApp", package = "regLins"))
- Upload File: Allows you to upload a CSV or Excel file.
- Select Variables: Dropdown menus to select response and predictor variables.
- Choose Method: Option to select the optimization method.
- Run Regression: Button to run the regression analysis.
- Summary Tab: Displays a summary of the regression model.
- Plot Tab: Shows diagnostic plots of the regression model.
Performs linear regression with optimization methods.
regLin(y, X, method = "kuadrat terkecil")
y
: A numeric vector of the response variable.X
: A numeric matrix of predictor variables.method
: The optimization method to be used ("kuadrat terkecil" or "kemungkinan").
Returns an object of class regLins
.
Provides a summary of the regression results.
summary(object)
object
: An object of classregLins
.
Plots diagnostic plots for the regression model.
plot(object)
object
: An object of classregLins
.
Muhammad Dzakwan Alifi
dzakwan624@gmail.com
This package is licensed under the GPL-3 License.
-
Clone the Repository: If you want to work directly with the source code or make contributions, you can clone the repository:
git clone https://github.com/dzakwanalifi/regLins.git
-
Issues and Contributions: If you encounter any issues or want to contribute to the development of this package, feel free to open an issue or submit a pull request on GitHub.