Regression
Linear Regression (OLS)
Explains a continuous outcome as a linear combination of one or more numeric predictors, estimating each slope by the least squares criterion.
Method summary
Linear regression models a continuous outcome as a weighted sum of its predictors. Each coefficient answers a specific question: holding the other predictors fixed, how much does the outcome change for a one-unit increase in this variable? That makes it more informative than a correlation, because the answer comes in the units of your own measure rather than as a dimensionless index. The weights are chosen so that the sum of squared gaps between observed and predicted values is as small as possible, which is where the least squares name comes from. YouReply Analyze builds the model with the OLS class of the statsmodels library and adds an intercept by default. The result carries R squared, adjusted R squared and an F test for the model as a whole, plus a coefficient and a p value for every predictor. One thing to know before you start: this method produces no residual diagnostics at all, so checking the assumptions is entirely your own work.
Which research questions does it answer?
- Taken together, how much of brand loyalty is explained by satisfaction and by perceived price fairness?
- What share of the variance in burnout scores do workload and supervisor support account for?
- By how many points does academic achievement change, on average, for each additional hour of daily screen time?
- Which dimension of service quality contributes most to repurchase intention once the others are held constant?
When should you use it?
- When the outcome is measured on a continuous scale and you want numeric variables to account for it.
- When you need to separate the joint explanatory power of several predictors from the unique contribution each one makes beyond the rest.
- When the slope per unit is what gets reported; if only the strength of an association matters, a correlation answers more economically.
- When you have enough cases for the number of predictors. A long predictor list on a short dataset fits the sample rather than the population.
Required variable types
- Dependent variable: a single numeric column measured continuously (a scale total, an amount, a duration, a percentage).
- Predictors: numeric columns. The parameter form accepts several at once, and at least one is required.
- To bring a categorical variable into the model, recode it into numeric 0/1 columns first; the derived column tool on the Variable tab is built for that.
- One row per participant. Repeated measurements of the same person should not enter the model as separate rows.
Key assumptions
- Linearity of the relationship
- The link between each predictor and the outcome must be reasonably well described by a straight line. Where the pattern curves, the coefficient reports an average slope and conceals the shape.
- Independent residuals
- What the model fails to explain about one case should carry no information about the next. Measurements ordered in time and samples collected in clusters routinely break this.
- Constant residual variance
- Residuals should be spread about equally across the range of predicted values. When the spread widens as predictions grow, standard errors and therefore p values become biased.
- Normally distributed residuals
- The p values attached to the coefficients are derived on the assumption that residuals are approximately normal. Large samples tolerate departures; small ones do not.
- Predictors not heavily redundant
- When predictors largely repeat one another, coefficients turn unstable: signs may flip unexpectedly, standard errors inflate, and the unique share of each variable can no longer be separated.
- No single case steering the fit
- One extreme observation sitting far out in the predictor space can turn a slope on its own. Such cases are not necessarily errors; they may be genuine points the model struggles to accommodate.
How YouReply checks these assumptions
- Linearity of the relationship: The panel never inspects the shape of the relationship and issues no warning about curvature. Judging linearity means looking at the variable pairs yourself, in the data or in another tool.
- Independent residuals: No Durbin-Watson statistic or other test of serial dependence is computed here. Whether your collection design satisfies independence is something you decide from the design itself.
- Constant residual variance: No Breusch-Pagan, White or comparable heteroscedasticity test is run for this method. The only figure describing residual spread is the residual standard error, and a single number cannot tell you whether the variance is constant, so that assessment belongs in another tool.
- Normally distributed residuals: Residuals are neither tested for normality nor returned in the output tables. The normality test method in the catalogue applies to raw variables, which is not the same question as the distribution of the residuals.
- Predictors not heavily redundant: No VIF, tolerance or condition index is returned, and the panel raises no flag about redundancy among your predictors. You need to run the Pearson correlation method over the predictor pairs and review the overlap yourself.
- No single case steering the fit: Cook's distance, leverage and standardised residuals are not computed, and no case is ever marked as influential. Look for extreme values in the data grid and in the descriptives, then refit without those cases and compare the two sets of coefficients.
How the analysis is run
- 1Drag your CSV or XLSX file onto the upload area. The first row has to hold the variable names.
- 2In the editable grid on the Data tab, confirm that numeric columns are actually read as numeric, and declare missing value codes such as 99 or -1 on the Variable tab. Left undeclared, they enter the model as real measurements.
- 3On the Analysis tab open the regression category or type the method name into the search box. The data requirements box lists which of your columns satisfy the outcome and predictor conditions; methods that do not fit stay visible but dimmed, with the reason given.
- 4In the parameter form pick the outcome as a single selection and the predictors as a multiple selection. The intercept is included by default, and there is no reason to change that default unless you deliberately want the line forced through the origin.
- 5Run it. The results open as collapsible sections for the coefficient table, the model fit measures and the information criteria, with a bar chart of the coefficients above them.
- 6Save the chart as PNG and every table as Excel. The computation credits card names the library call and its version, and the run is filed on the History tab. The free plan allows 50 runs per month.
Statistics and tables produced
- Predictor coefficients
- The unstandardised coefficient for each predictor, expressing the expected change in the outcome for a one-unit increase in that variable while the others stay fixed, in the units of your own measure.
- p value per coefficient
- The significance value for the departure of each coefficient from zero, shown on its row of the coefficient table.
- R squared and adjusted R squared
- How much of the variance in the outcome the model accounts for, and the same quantity penalised for the number of predictors. The adjusted figure can fall when a predictor that adds nothing is included.
- F statistic and its p value
- A test of the model against one in which every coefficient is zero, which is to say whether the model explains anything at all.
- AIC and BIC
- Information criteria for comparing competing models fitted on the same data. They are read as differences between models, never against a fixed cut-off.
- Residual standard error and degrees of freedom
- The typical deviation of the model's predictions in the units of the outcome, together with the degrees of freedom used in the tests.
- Number of observations and predictors
- How many cases entered the model and how many predictors it contains. If the case count is lower than you expected, find out which column is absorbing the missing values.
- Coefficient chart
- The results panel draws a bar chart of the coefficients side by side, downloadable as a PNG. When the predictors are measured in different units the bar lengths are not comparable with each other.
Effect size and confidence intervals
- R squared
- The proportion of variance accounted for. In attitude and perception surveys values around 0.10 are unremarkable and anything above 0.40 counts as high, but the benchmark depends on what your field typically achieves, and R squared climbs artificially as predictors accumulate.
- Adjusted R squared
- The version that charges for model complexity. A widening gap between it and raw R squared is a reason to suspect overfitting, and it is usually the figure worth reporting.
- No standardised coefficients
- The engine returns no beta weights; coefficients stay in raw units. To compare predictors on a common scale, standardise the columns before the analysis and refit the model on the standardised versions.
No confidence interval is returned for any coefficient: the table gives a point estimate and a p value, with no lower or upper bound. R squared and adjusted R squared are likewise reported without intervals. If you need coefficient intervals, they have to be derived from the estimate and its standard error in another tool, because the panel does not produce that figure.
Example research question and example result
The numbers below are a representative example, not data from a real study or a real user.
- Research question
- In an illustrative customer study, how well do satisfaction and perceived price fairness account for a brand loyalty score from 0 to 100?
- Variables
- Dependent variable: brand loyalty score (continuous, 0-100) · Predictor 1: overall satisfaction score (continuous, 0-100) · Predictor 2: perceived price fairness score (continuous, 0-100)
- Example result
- Fitted on n = 312 cases, the model accounted for 41% of the variance in loyalty: R squared = 0.41, adjusted R squared = 0.40, F(2, 309) = 107.3, p < 0.001. Coefficients: satisfaction b = 0.52, p < 0.001; price fairness b = 0.18, p = 0.003; intercept 14.6. The residual standard error was 9.8.
- Interpretation
- A one-point rise in satisfaction goes with an average 0.52-point rise in loyalty once price perception is held constant, while price fairness contributes roughly a third as much on the same scale. The two predictors cover 41% of the variance, leaving 59% to influences outside the model and to measurement error. These figures describe the direction and size of an association and establish no causal order: in cross-sectional data, satisfaction driving loyalty and loyal customers reporting more satisfaction produce the same coefficient. Because the panel tests nothing about the residuals, linearity, constant variance and influential cases should already have been examined elsewhere before this interpretation is trusted.
Real output on a sample dataset
The results below were produced by the analysis engine from this data file. Changing the variable changes the research question as well; every run was computed in advance, so the page sends no request to the engine.
General customer survey (synthetic)
A wide survey of three hundred respondents: two and three category grouping variables, continuous measures, a five point ordinal scale, a binary purchase outcome, a four category brand choice, three repeated measurements, paired binary questions, three raters, four price questions and deliberately empty cells.
- Rows
- 300
- Columns
- respondent_id, gender, education, region, age, income, satisfaction, service_score, price_score, quality_score, loyalty, nps_score, purchased, brand_choice, satisfaction_level, pre_score, post_score, measure_1, measure_2, measure_3, use_before, use_after, use_followup, rater_1, rater_2, rater_3, price_too_cheap, price_cheap, price_expensive, price_too_expensive, feedback_score, followup_rating
The data is synthetic: it comes from a fixed random seed, not from a real study. The values below were produced by the analysis engine from this file, so uploading the same file to the panel gives the same results.
Research question: How much of loyalty do satisfaction, quality perception and income explain together?
- Dependent variable
- loyalty
- Independent variables
- satisfaction,quality_score,income
- R squared
- 0.791
- Adjusted R squared
- 0.788
- F statistic
- 372.52
- Model p value (F test)
- < 0.001
- Valid observations
- 300
- Number of predictors
- 3
- Akaike information criterion (AIC)
- 709.69
- Bayesian information criterion (BIC)
- 724.50
- Residual standard error
- 0.784
- Degrees of freedom
- 296
- dependent_var
- loyalty
Coefficients
- Intercept (constant)
- 6.86
- satisfaction
- 0.344
- quality_score
- 0.159
- income
- -0.088
p values
- Intercept (constant)
- < 0.001
- satisfaction
- < 0.001
- quality_score
- < 0.001
- income
- < 0.001
Computation credits: scipy 1.18.0 · statsmodels 0.14.6 · scikit-learn 1.9.0 · numpy 2.5.1 · pandas 3.0.5 · semopy 2.3.11 · 89fc29a · Data seed: 20260914
How to report the result
The two-predictor model accounted for a significant share of the variance in brand loyalty, R squared = .41, adjusted R squared = .40, F(2, 309) = 107.3, p < .001, with both satisfaction (b = 0.52, p < .001) and perceived price fairness (b = 0.18, p = .003) contributing.
An example sentence close to APA style; the numbers are representative.
When you should not use it
- Because the panel computes no regression diagnostics, nothing on the results screen tells you whether the assumptions hold; redundancy among predictors, residual normality, constant variance and influential cases are all left to the researcher.
- With no coefficient intervals and no standardised weights, the relative importance of predictors measured in different units cannot be read off the output.
- The method does not suit a binary, ordinal or count outcome; a linear model will happily predict values outside the range such an outcome can take.
- There is no block-wise workflow that adds predictors in stages and tests the change in R squared; separate models have to be fitted and compared through the information criteria.
- Interaction and quadratic terms are never added automatically. Build them as derived columns and add them to the predictor list yourself.
- In repeated measures, cluster samples and nested data the independence of residuals fails, and the standard errors come out too small.
What to use when the assumptions are not met
- Pearson CorrelationWhy: When the question is only whether two continuous variables move together, it gives the strength of the association in a single coefficient instead of a slope.
- Logistic RegressionWhy: When the outcome has two categories (bought or not, completed or abandoned), a link function keeps the predicted probabilities inside their bounds.
- Hierarchical (Block-wise) RegressionWhy: When theory dictates the order in which predictors enter and the increment in explained variance after each block is the point of the analysis.
- ANCOVA (Analysis of Covariance)Why: When the real comparison is between group means and the continuous variable is in the model purely as a control.
Frequently asked questions
- How many predictors can I include?
- The parameter form sets no technical ceiling, but your sample size sets a practical one. A common rule of thumb in survey work is 10 to 20 cases per predictor; below that, coefficients swing noticeably from one sample to the next. A growing gap between raw and adjusted R squared is the clearest sign that you have asked the model to carry too many predictors.
- How do I check for redundancy among my predictors?
- Since no VIF or tolerance is returned for this method, the check is yours to perform. The workable route is to run the Pearson correlation method across the predictors and take note of any pair above 0.80. Where two columns measure the same construct, dropping one or combining both into a single composite score usually produces a sturdier model than leaving them to compete.
- My predictors use different units, so which one matters more?
- Raw coefficients depend on scale and cannot be ranked directly: a predictor measured in thousands of lira can show a smaller coefficient than one measured on a five-point scale while having the larger effect. The engine supplies no standardised betas. If a comparison is necessary, rescale the columns to a mean of zero and a standard deviation of one before the run and fit the model again.
- Can I use a categorical predictor?
- The model is fitted on numeric columns, so a categorical variable has to be recoded first: create k-1 columns of zeros and ones for k categories and leave the remaining category as the reference. The derived column tool on the Variable tab will generate them. For a two-category variable coded 0 and 1, the coefficient is simply the difference between the two group means.
References
- Field, A. (2018). Discovering Statistics Using IBM SPSS Statistics
- Tabachnick, B. G., & Fidell, L. S. (2019). Using Multivariate Statistics
- Hair, J. F., Black, W. C., Babin, B. J., & Anderson, R. E. (2019). Multivariate Data Analysis
- statsmodels OLS documentation
Try it with your own data
The free plan includes 50 analysis runs a month and needs no card.