Chapter 19 Regression Analysis

To explore the association between one predictor and a continuous dependent variable, regression analysis can be used. In this example, a dataset/dataframe called dat contains two continuous numerical variables predictorVariable1 and dependentVariable, and one nominal variable predictorVariable3.

19.1 jamovi

If the predictor is numerical go to the Regression menu and select ‘Linear Regression’. The numerical variable is dragged to the window, labeled ‘Covariates’.

Select the variables for the regression analysis with a numerical predictor

Figure 19.1: Select the variables for the regression analysis with a numerical predictor

If the predictor is nominal go to the Regression menu and select ‘Linear Regression’. The nominal variable (factor) is dragged to the window, labeled ‘Factors’.
Select the variables for the regression analysis with a nominal predictor

Figure 19.2: Select the variables for the regression analysis with a nominal predictor

19.2 R

The most simple function to use is lm (linear model), which comes with R base. The summary function shows the most important results. With a numerical predictor the code is as follows.

result <- lm(dependentVariable ~ predictorVariable1, data=dat)
summary(result)

With a nominal predictor the code is essentially the same, since R “sees” whether the predictor is numerical or nominal.

result <- lm(dependentVariable ~ predictorVariable3, data=dat)
summary(res

19.3 SPSS

With a numerical predictor the code is as follows.

REGRESSION
  /DEPENDENT dependentVariable
  /METHOD ENTER predictorVariable1 
  /STATISTICS COEF CI(95) R ANOVA.

With a nominal predictor the code is essentially the same, since SPSS “sees” whether the predictor is numerical or nominal.

REGRESSION
  /DEPENDENT dependentVariable
  /METHOD ENTER predictorVariable3
  /STATISTICS COEF CI(95) R ANOVA.