How to Interpret Interaction Effects in Linear Regression (4 Steps)

This tutorial shows how to interpret interaction effects in linear regression models. In summary, there are two perspectives, (a) mean difference perspective and (b) slope difference perspective. Interpret Interaction Effect in Linear Regression (a) Mean Difference Perspective: One way to interpret interaction effects in linear regression is based on mean differences. A significant interaction means … Read more

How to Solve Linear Regression Using Linear Algebra (4 Steps)

We can solve linear regression (i.e., estimate the regression coefficients) using just linear algebra. Below is the process of 4 steps to do regression analysis via matrix multiplication. Step 1: Prepare the matrix We actually can expand the function above to another format below. The function below can give you a more detailed idea of … Read more

Use sklearn to Calculate SSR in Python

This tutorial shows how to use sklearn to calculate SSR, which stands for Sum of Squared Residuals. SSR is also known as residual sum of squares (RSS) or sum of squared errors (SSE). Steps of Using sklearn to Calculate SSR in Python Step 1: Prepare data We are going to use a built-in dataset called … Read more

How to Calculate Sum of Squared Residuals in Python

This tutorial shows how you calculate Sum of Squared Residuals in Python with detailed steps. Sum of Squared Residuals (SSR) is also known as residual sum of squares (RSS) or sum of squared errors (SSE). The following is the formula to calculate SSR. SSR can be used compare our estimated values and observed values for … Read more

How to Calculate MSR in Python

MSR stands for Mean Squared Residuals. MSR can be used to compare the the difference between estimated Y and observed Y in model. It is ratio between Sum Squared Residuals and the number of observations, i.e., n. The following is the formula of MSR. MSR has the exact same formula as the biased MSE. How … Read more

How to Calculate MSE in Python (4 Examples)

MSE stands for Mean Squared Error. MSE is used to compare our estimated Y (DV) and observed Y in a model. This tutorial shows how you can calcuate biased and unbiased MSE in Python using 4 examples. Biased MSE and unbiased MSE The following is the formulas for biased MSE and unbiased MSE. Biased MSE … Read more

Difference between MSD and MSE

MSD stands for Mean Squared Deviation, whereas MSE stands for Mean Squared Error. Quite often, you will find that they are synonymic. Both MSD and MSE can be used to compare estimated values and observed values in a model. The key nuance is on the denominator of both MSD and MSE, as it will lead … Read more

How to Calculate Mean Squared Deviation in R

Mean Squared Deviation (MSD) often is synonymic with Mean Squared Error (MSE). MSD can be used to compare our estimated values and observed values in a model. For MSD, there are two possible situations, unbiased MSD and biased MSD. Both of them are correct. The following are the formulas of MSD. Method 1: Unbiased MSD … Read more

How to Calculate MSE in R

MSE stands for Mean Squared Error, and can be used to compare our estimated values and observed values in a model. The following is the formula of MSE. How to Calculate MSE in R R can be used to calculate Mean Squared Error (MSE). The following is the core syntax, which calculates the ratio of … Read more

Calculate Mean Squared Residuals (MSR) in R

Mean Squared Residuals (MSR) is ratio between Sum Squared Residuals and the number of observations, i.e., n. The following is the formula of MSR. MSR can be used compare our estimated values and observed values for regression models. R can be used to calculate Mean Squared Residuals (MSR), and the following is the core syntax. … Read more