This is a test version of EasyReg, use the results at your own risk!
EasyReg was developed using the Shiny framework (v1.8.1.1; Chang et al., 2017) for the R programming language (v4.4.0; R Core Team, 2024) to provide an easy-to-use interface and remove all programming knowledge barriers to its usage.
The app requires a CSV file that contains numerical data, with column headings (either named or left blank), where the desired x-axis data is on the first column on the file, and there is at least one other column to represent the response to the x-axis, constituting the y-axis. As long as each x-axis value has its y-axis equivalence on the same line, they don’t need to be in order.
Once the file is uploaded, a column (except for the first column on the file) has to be selected to plot the response to the x-axis variable. There is also the option to change the axis names, which will be used throughout the app. Otherwise, the column names in the CSV file will be used.
Whether a regression model is applied or not, a transformation of the data (either natural logarithm, square root, or inverse multiplication) can be performed, which can improve the strength of the fit. Lastly, there is the option to display the main and derivative plots using the plotly package (v4.10.4; Sievert, 2020), which offers an interactive value display and comparator, among other features. Otherwise, the ggplot package (v3.5.1; Wickham, 2016) will be used to display all graphs. There is also the option to calculate the integral of the fitted function on an interval, as well as show a precise value inside or outside the observed range.
If the Fit the curve checkbox is selected, then the residuals of the fit will be presented in one of four different options: studentized residuals vs. prediction (the residual plotted against the value predicted by the model), ordinary residuals vs. predictor variable (the residual plotted against the x axis on the main plot), ordinary residuals vs. prediction, and lastly, a histogram of the ordinary residuals. An ordinary residual is the difference between the observed value and the one predicted by the model (Fahrmeir et al., 2013). A studentized residual is the difference between the observed value and the value predicted in a model where that same observation is not taken into account and divided by its standard deviation (9.4 - Studentized Residuals | STAT 462, n.d.).
If polynomial is the selected function type to fit, there is the option to choose the degree of the polynomial, going from a linear regression model to one of the 6th degree, as well as the option to show a confidence interval. If the selected fitting type is spline, then the option to choose between square and cubic spline, as well as the option to choose the interior knot number, going from 2 to 6, will appear.
To create the polynomial fitting, we used the stats package included in the base R language (v4.4.0; R Core Team, 2024). For the sigmoidal one, the aomisc (v0.652; Onofri, 2020), drc (v3.0.1; Ritz et al., 2015), and minpack.lm (v1.2.4; Elzhov et al., 2023) packages were used so that the parameters could be chosen automatically to fit each datafile uploaded. And finally, for the spline fitting and the selection of the hyperparameters not fixed by the user, the mgcv (v1.9.1; Wood, 2011) and gratia (v0.9.2; Simpson, 2024) packages were used.
The app has 5 panels. The first one is where the main plot (showing the regression model), the code used to generate the model, the residual plot, and the summary of the function are shown, showing a multitude of useful model characteristics, like the standard error or the intercept when applicable.
On the second one, the R-squared and deviance values appear. They are shown in plot form to compare between degrees and interior knot numbers for spline fittings. There is also the option to show in one graph both the R-squared values for polynomial and spline fittings. As for deviance values, they are all compared by degree, and if the spline fit option is selected, there is an extra graph comparing their value by interior number. In both R-squared and deviance graphs, in spline fits, the values shown by degree have their interior knot number fixed to that selected on the slider, and values shown by interior knot number have their degree fixed by the user’s selection.
The third panel contains the fitting’s derivative as well as information on the code or equation used to obtain it. There is the option of drawing the derivative using the same transformation as the data used on the main plot, but by default, the derivative is drawn using the raw data.
Following the Derivative panel is the Computing Values panel, which shows predicted values following the range and the step selected. The predicted values are calculated using untransformed data, but if the log transformation is selected, then there is an extra column showing the predicted values using an ln transformation of the observed measures of the dependent variable.
And finally, on the fifth panel, Download Computed Values, there is the option to download the selected predicted values as a CSV file, using the same selection method as the Computing Values panel.
This app was developped by plateforme Bordeaux Metabolome and the META team of UMR 1332 BFP