Hi Rudi
If you want to test the impact of survey year (time) on the relationship between housing affordability, anxiety, stress, and health, few options are there, including adding survey year as a covariate, creating interaction terms, conducting separate regression analyses for each year and so on. In case of adding survey year as a covariate, add "survey_time" as a categorical covariate (dummy variable) in your linear regression model, which would allow us to examine the main effect of survey year on the outcome variables (anxiety, stress, and health) while controlling for the other independent variables (housing affordability). This approach is suitable if you want to directly test the effect of survey year while accounting for other factors. Since the regression model here would be "Outcome = Housing Affordability + Survey Year + Other Covariates", the coefficient for "Survey Year" will tell us whether there is a significant difference in the outcome variables between 2010 and 2020 after controlling for housing affordability and other covariates. In SPSS, first you need to recode the "survey_time" variable into a categorical variable with two values, for example "2010" and "2020." For this, go to "Transform" > "Recode into Different Variables". Then select "survey_time" as the input variable and create a new variable, say, "survey_year" and define the recoding rules (say, 1 for 2010 and 2 for 2020). Proceed with Analyse > Regression > Linear. Move your outcome variable (e.g., health) into the "Dependent" box, the independent variables (housing affordability, anxiety, stress) into the "Independent(s)" box and the "survey_year" variable into the "Covariates" box. This tests the main effect of survey year on the outcome. In case of creating interacting terms to assess whether the relationships between your IVs and the outcome differ between 2010 and 2020, it is required to create interaction terms for each IV and survey year. For this, click on "Options" in the linear regression dialog box, under "Include" add the interaction terms. For example, if your IV is "housing_affordability," then create an interaction term by clicking on the "housing_affordability" variable and then click the "Add" button under "Include". Repeat this step for each IV (housing affordability, anxiety, stress) to create interaction terms with "survey_year." Click "OK" to run the regression analysis. In the output, look at the the interaction terms' significance levels to determine whether the relationships between your IVs and the outcome are significantly different in 2010 compared to 2020. A significant interaction term indicates that the relationship between the corresponding IV and the outcome is different in 2010 compared to 2020. Also, the direction and strength of these differences could be assessed by examining the coefficients for the interaction terms. In addition, separate regression analysis for each survey year can also be carry out to examine the relationships between the independent variables and the outcome variables separately for 2010 and 2020. This might be useful if you are primarily interested in understanding how these relationships have changed over time.
------------------------------
Bindu Krishnan
------------------------------
Original Message:
Sent: Mon September 04, 2023 04:18 AM
From: Rudi Klanjsek
Subject: Modeling time when having two samples , one from 2010 another from 2020
Hi. I have the following question:
I have two samples of youth (not the same individuals, but both are nationally representative of youth aged 15-29 and include the same measures). One was taken in 2010 and another in 2020. The model tests the relationship between housing affordability, anxiety, stress, and health. Now, the model as such works as predicted (in regression), but which method would be appropriate if I would like to test the impact of survey year (i.e., time)?
When I do mean comparisons, I can see that in 10 years, housing affordability decreased, anxiety and stress both increased, and health decreased. Is it permissible to just enter "survey_time" (which has two values, 2010 and 2020) as another variable in the regression analysis? Another option I was thinking about was calculating interaction terms between all IV and survey_time and entering them in the linear regression. Thank you for your help.
------------------------------
Rudi Klanjsek
------------------------------