stepwise multiple regression l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Stepwise Multiple Regression PowerPoint Presentation
Download Presentation
Stepwise Multiple Regression

Loading in 2 Seconds...

play fullscreen
1 / 98

Stepwise Multiple Regression - PowerPoint PPT Presentation


  • 1121 Views
  • Uploaded on

Stepwise Multiple Regression. Different Methods for Entering Variables in Multiple Regression. Different types of multiple regression are distinguished by the method for entering the independent variables into the analysis.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Stepwise Multiple Regression' - Olivia


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
different methods for entering variables in multiple regression
Different Methods for Entering Variables in Multiple Regression
  • Different types of multiple regression are distinguished by the method for entering the independent variables into the analysis.
  • In standard (or simultaneous) multiple regression, all of the independent variables are entered into the analysis at the same.
  • In hierarchical (or sequential) multiple regression, the independent variables are entered in an order prescribed by the analyst.
  • In stepwise (or statistical) multiple regression, the independent variables are entered according to their statistical contribution in explaining the variance in the dependent variable.
  • No matter what method of entry is chosen, a multiple regression that includes the same independent variables and the same dependent variables will produce the same multiple regression equation.
  • The number of cases required for stepwise regression is greater than the number for the other forms. We will use the norm of 40 cases for each independent variable.
purpose of stepwise multiple regression
Purpose of Stepwise Multiple Regression
  • Stepwise regression is designed to find the most parsimonious set of predictors that are most effective in predicting the dependent variable.
  • Variables are added to the regression equation one at a time, using the statistical criterion of maximizing the R² of the included variables.
  • After each variable is entered, each of the included variables are tested to see if the model would be better off it were excluded. This does not happen often.
  • The process of adding more variables stops when all of the available variables have been included or when it is not possible to make a statistically significant improvement in R² using any of the variables not yet included.
  • Since variables will not be added to the regression equation unless they make a statistically significant addition to the analysis, all of the independent variable selected for inclusion will have a statistically significant relationship to the dependent variable.
  • An example of how SPSS does stepwise regression is shown below.
stepwise multiple regression in spss
Stepwise Multiple Regression in SPSS
  • Each time SPSS includes or removes a variable from the analysis, SPSS considers it a new step or model, i.e. there will be one model and result for each variable included in the analysis.
  • SPSS provides a table of variables included in the analysis and a table of variables excluded from the analysis.  It is possible that none of the variables will be included.  It is possible that all of the variables will be included.
  • The order of entry of the variables can be used as a measure of relative importance.
  • Once a variable is included, its interpretation in stepwise regression is the same as it would be using other methods for including regression variables.
pros and cons of stepwise regression
Pros and Cons of Stepwise Regression
  • Stepwise multiple regression can be used when the goal is to produce a predictive model that is parsimonious and accurate because it excludes variables that do not contribute to explaining differences in the dependent variable.
  • Stepwise multiple regression is less useful for testing hypotheses about statistical relationships. It is widely regarded as atheoretical and its usage is not recommended.
  • Stepwise multiple regression can be useful in finding relationships that have not been tested before. Its findings invite one to speculate on why an unusual relationship makes sense.
  • It is not legitimate to do a stepwise multiple regression and present the results as though one were testing a hypothesis that included the variables found to be significant in the stepwise regression.
  • Using statistical criteria to determine relationships is vulnerable to over-fitting the data set used to develop the model at the expense of generalizability.
  • When stepwise regression is used, some form of validation analysis is a necessity. We will use 75/25% cross-validation.
75 25 cross validation
75/25% Cross-validation
  • To do cross validation, we randomly split the data set into a 75% training sample and a 25% validation sample. We will use the training sample to develop the model, and we test its effectiveness on the validation sample to test the applicability of the model to cases not used to develop it.
  • In order to be successful, the follow two questions must be answers affirmatively:
    • Did the stepwise regression of the training sample produce the same subset of predictors produced by the regression model of the full data set?
    • If yes, compare the R2 for the 25% validation sample to the R2 for the 75% training sample. If the shrinkage (R2 for the 75% training sample - R2 for the 25% validation sample) is 2% (0.02) or less, we conclude that validation was successful.
  • Note: shrinkage may be a negative value, indicating that the accuracy rate for the validation sample is larger than the accuracy rate for the training sample. Negative shrinkage (increase in accuracy) is evidence of a successful validation analysis.
  • If the validation is successful, we base our interpretation on the model that included all cases.
correlations between dependent variable and independent variables

IV1

IV2

DV

DV

Correlations between dependent variable and independent variables

We have two independent variables, IV1 and IV2, which each have a relationship to the dependent variable. The areas of IV1 and IV2 which overlap with DV are r² values, i.e. the proportion of the dv that is explained by the iv.

DV and IV1 are correlated at r = .70. The area of overlap is r² = .49.

DV and IV2 are correlated at r = .40. The area of overlap is r² = .16.

correlations between independent variables

IV1

IV2

Correlations between independent variables

The two independent variables, IV1 and IV2, are correlated at r = .20. This correlation represents redundant information in the independent variables.

variance in the dependent variable explained by the independent variables

IV1

IV2

DV

Variance in the dependent variable explained by the independent variables

The variance explained in DV is divided into three areas. The total variance explained is the sum of the three areas.

The green area is the variance in DV uniquely explained by IV1.

The orange area is the variance in DV uniquely explained by IV2.

The brown area is the variance in DV that is explained by both IV1 and IV2.

correlations at step 1 of the stepwise regression

IV1

DV

Correlations at step 1 of the stepwise regression

Since IV1 had the stronger relationship with DV (.70 versus .40), it will be the variable entered first in the stepwise regression.

As the only variable in the regression equation, it is given full credit (.70) for its relationship to DV.

The partial correlation and the part correlation have the same value as the zero-order correlation at .70.

change in variance explained when a second variable in included
Change in variance explained when a second variable in included

At step 2, IV2 enters the model, increasing the total variance explained from .49 to .56, an increase 0f .07.

By itself, IV2 explained .16 of the variance in DV, but since it was itself correlated with IV1, a portion of what it could explain had already been attributed to IV1.

differences in correlations when a second variable is entered
Differences in correlations when a second variable is entered

While the zero-order correlations do not change, both the partial and the part correlations decrease.

Partial correlation represents the relationship between the dependent variable and an independent variable when the relationship between the dependent variable and other independent variables has been removed from the variance of both the dependent and the independent variable.

Part (or semi-partial) correlation is the portion of the total variance in the dependent variable that is by only that independent variable. The square of part correlation is the amount of change in R² by including this variable.

zero order partial and part correlations

IV1

IV1

IV2

DV

DV

Zero-order, partial, and part correlations

The zero-order correlation is based on the relationship between the independent variable and the dependent variable, ignoring all other independent variables.

Part correlation for IV1 is the green area divided by all parts of DV, i.e. including areas associated with IV2.

The partial correlation for IV1 is the green area divided by the area in DV and IV1 that is not part of IV2, i.e. green divided by green + yellow.

NOTE: diagrams are scaled to r2 rather than r.

zero order partial and part correlations14

IV1

IV2

IV2

DV

DV

Zero-order, partial, and part correlations

The partial correlation for IV2 is the green area divided by the area in DV and IV2 that is not part of IV2, i.e. orange divided by orange + yellow.

The zero-order correlation is based on the relationship between the independent variable and the dependent variable, ignoring all other independent variables.

Part correlation for IV2 is the orange area divided by all parts of DV, i.e. including areas associated with IV1.

how spss stepwise regression chooses variables 1
How SPSS Stepwise Regression Chooses Variables - 1

We can use the table of correlations to identify which variable will be entered at the first step of the stepwise regression.

The table of Correlations shows the the variable with the strongest individual relationship with the dependent variable is RACE OF HOUSEHOLD=WHITE, with a correlation of -.247.

Provided that the relationship between this variable and the dependent variable is statistically significant, this will be the variable that enters first.

how spss stepwise regression chooses variables 2
How SPSS Stepwise Regression Chooses Variables - 2

The correlation between RACE OF HOUSEHOLD=WHITE and importance of ethnic group to R is statistically significant at p < .001.

It will be the first variable entered into the regression equation.

how spss stepwise regression chooses variables 3
How SPSS Stepwise Regression Chooses Variables - 3

Model 1 contains the variable RACE OF HOUSEHOLD=WHITE, with a Multiple R of .247, producing an R² of .061 (.247²), which is statistically significant at p < .001.

We cannot use the table of correlations to show which variable will be entered second, since the variable entered second must take into account its correlation to the independent variable entered first.

how spss stepwise regression chooses variables 4
How SPSS Stepwise Regression Chooses Variables - 4

The table of Excluded Variables, however, shows the Partial Correlation between each candidate for entry and the dependent variable.

In this example, RACE OF HOUSEHOLD=BLACK has the largest Partial Correlation (.252) and is statistically significant at p < .001, so it will be entered on the next step

Partial correlation is a measure of the relationship of the dependent variable to an independent variable, where the variance explained by previously entered independent variables has been removed from both.

how spss stepwise regression chooses variables 5
How SPSS Stepwise Regression Chooses Variables - 5

As expected, Model 2 contains the variable RACE OF HOUSEHOLD=WHITE and RACE OF HOUSEHOLD=BLACK. The R² for Model 2 increased by 0.059 to a total of .120. The increase in R² was statistically significant at p < .001.

how spss stepwise regression chooses variables 6
How SPSS Stepwise Regression Chooses Variables - 6

The increase in R² of .059 is the square of the Part Correlation for RACE OF HOUSEHOLD=BLACK (.244² = 0.059). Part correlation, also referred to as semi-partial correlation, is the unique relationship between this independent variable and the dependent variable.

how spss stepwise regression chooses variables 7
How SPSS Stepwise Regression Chooses Variables - 7

Partial

Correlation

Column

Sig. Column

In the table of Excluded Variables for model 2, the next largest partial correlation is HOW OFTEN R ATTENDS RELIGIOUS SERVICES at .149.

This is the variable that will be added in Model 3 because the relationships is statistically significant at p = 0.32.

how spss stepwise regression chooses variables 8
How SPSS Stepwise Regression Chooses Variables - 8

As expected, Model 3 contains the variable RACE OF HOUSEHOLD=WHITE and RACE OF HOUSEHOLD=BLACK, and HOW OFTEN R ATTENDS RELIGIOUS SERVICES . The R² for Model 3 increased by 0.019 to a total of .140. The increase in R² was statistically significant at p = .032.

how spss stepwise regression chooses variables 9
How SPSS Stepwise Regression Chooses Variables - 9

Partial

Correlation

Column

In the table of Excluded Variables for model 3, the next largest partial correlation is THINK OF SELF AS LIBERAL OR CONSERVATIVE at .089.

Sig. Column

However, the partial correlation is not significant (p=.203), so no additional variables will be added to the model.

what spss displays when nothing is significant
What SPSS Displays when Nothing is Significant

If none of the independent variables has a statistically significant relationship to the dependent variable, SPSS displays an empty table for Variables Entered/Removed.

the problem in blackboard 1
The Problem in BlackBoard - 1
  • The introductory problem statement tells us:
  • the data set to use: GSS2002_PrejudiceAndAltruism.SAV
  • the method for including variables in the regression
  • The dependent variable for the analysis
  • the list of independent variables that stepwise regression will select from
this week s problems
This Week’s Problems
  • The problems this week take the 13 questions on prejudice from the general social survey and explore the relationship of each to the demographic characteristics of age, education, income, political views (conservative versus liberal), religiosity (attendance at church), socioeconomic index, gender, and race.
  • I had no specific hypothesis about which demographic factors would be related to which question on prejudice, beyond an expectation that race would be a significant contributor to explaining differences on each of the questions.
  • My analyses were exploratory (to identify what demographic characteristics were associated with different aspects of prejudice) and, thus, appropriate for stepwise regression.
the problem in blackboard 2
The Problem in BlackBoard - 2

In these problems, we will assume that our data satisfies the assumptions required by multiple regression without explicitly testing for it.

We should recognize that failing to use a needed transformation could preclude a variable from being selected as a predictor.

In your analyses, you would, of course, want to test for conformity to all of the assumptions.

the problem in blackboard 3
The Problem in BlackBoard - 3

The next sequence of specific instructions tell us whether each variable should be treated as metric or non-metric, along with the reference category to use when dummy-coding non-metric variables.

Though we will not use the script to test for assumptions, we can use it to do the dummy coding that we need for the problem.

the problem in blackboard 4
The Problem in BlackBoard - 4

The next pair of instructions tell us the probability values to use for alpha for both the tests of statistical relationships and for the diagnostic tests.

the problem in blackboard 430
The Problem in BlackBoard - 4

The final instruction tells us the random number seed to use in the validation analysis.

If you do not use this number for the seed, it is likely that you will get different results from those shown in the feedback.

the statement about level of measurement
The Statement about Level of Measurement

The first statement in the problem asks about level of measurement. Stepwise multiple regression requires the dependent variable and the metric independent variables be interval level, and the non-metric independent variables be dummy-coded if they are not dichotomous.

The only way we would violate the level of measurement would be to use a nominal variable as the dependent variable, or to attempt to dummy-code an interval level variable that was not grouped.

marking the statement about level of measurement 1
Marking the Statement about Level of Measurement - 1

Stepwise multiple regression requires the dependent variable and the metric independent variables be interval level, and the non-metric independent variables be dummy-coded if they are not dichotomous.

  • Mark the check box as a correct statement because:
  • "Importance of ethnic identity" [ethimp] is ordinal level, but the problem calls for treating it as metric, applying the common convention of treating ordinal variables as interval level.
  • The metric independent variable "age" [age] was interval level, satisfying the requirement for independent variables.
  • The metric independent variable "highest year of school completed" [educ] was interval level, satisfying the requirement for independent variables.
  • "Income" [rincom98] is ordinal level, but the problem calls for treating it as metric, applying the common convention of treating ordinal variables as interval level.
marking the statement about level of measurement 2
Marking the Statement about Level of Measurement - 2
  • In addition:
  • "Description of political views" [polviews] is ordinal level, but the problem calls for treating it as metric, applying the common convention of treating ordinal variables as interval level.
  • "Frequency of attendance at religious services" [attend] is ordinal level, but the problem calls for treating it as metric, applying the common convention of treating ordinal variables as interval level.
  • The metric independent variable "socioeconomic index" [sei] was interval level, satisfying the requirement for independent variables.
  • The non-metric independent variable "sex" [sex] was dichotomous level, satisfying the requirement for independent variables.
  • The non-metric independent variable "race of the household" [hhrace] was nominal level, but will satisfy the requirement for independent variables when dummy coded.
the statement for sample size
The Statement for Sample Size

The statement for sample size indicates that the available data satisfies the requirement.

Because of the tendency for stepwise regression to over-fit the data, we have a larger sample size requirement, i.e. 40 cases per independent variable (Tabachnick and Fidell, p. 117)

To obtain the number of cases available for this analysis, we run the stepwise regression.

using the script to create dummy coded variables 1
Using the Script to Create Dummy-coded Variables - 1

Before we can run the stepwise regression, we need to dummy code sex and race. We will use the script to create the dummy-coded variables.

Select the Run Script command from the Utilities menu.

using the script to create dummy coded variables 2
Using the Script to Create Dummy-coded Variables - 2

Navigate to the My Documents folder, if necessary.

Highlight the script file

SatisfyingRegressionAssumptionsWith

MetricAndNonMetricVariables.SBS.

Click on the Run button to open the script.

using the script to create dummy coded variables 3
Using the Script to Create Dummy-coded Variables - 3

Move the non-metric variable "sex" [sex] to the list box for Non-metric independent variables list box.

With the variable highlighted, select the reference category, 2=FEMALE from the Reference category drop down menu.

using the script to create dummy coded variables 4
Using the Script to Create Dummy-coded Variables - 4

Move the non-metric variable "race of the household" [hhrace] to the list box for Non-metric independent variables list box.

With the variable highlighted, select the reference category, 3=OTHER from the Reference category drop down menu.

The OK button to run the regression is deactivated until we select a dependent variable.

using the script to create dummy coded variables 5
Using the Script to Create Dummy-coded Variables - 5

We select the dependent variable "importance of ethnic identity" [ethimp], though since we are not going to interpret the output, we could select any variable.

To have the script save the dummy-coded variables, clear the check box Delete variables created in this analysis.

using the script to create dummy coded variables 6
Using the Script to Create Dummy-coded Variables - 6

Click on the OK button to run the regression, creating the dummy-coded variables as a by-product.

the dummy coded variables in the data editor
The Dummy-Coded Variables in the Data Editor

If we scroll the variable list to the right, we see that the three dummy-coded variables have been added to the data set.

run the stepwise regression 1
Run the Stepwise Regression - 1

To run the regression, select Regression > Linear from the Analyze menu.

run the stepwise regression 2
Run the Stepwise Regression - 2
  • Move the dependent variable
  • "importance of ethnic identity" [ethimp]
  • to the Dependent text box.
  • Move the independent variables:
  • "age" [age]
  • "highest year of school completed" [educ],
  • "income" [rincom98],
  • "description of political views" [polviews],
  • "frequency of attendance at religious services" [attend],
  • "socioeconomic index" [sei],
  • “survey respondents were male" [sex_1],
  • "survey respondents who were white" [hhrace_1],
  • "survey respondents who were black" [hhrace_2]
  • to the Independent(s) list box.
run the stepwise regression 3
Run the Stepwise Regression - 3

The critical step to produce a stepwise regression is the selection of the method for entering variables.

Select Stepwise from the Method drop down menu.

run the stepwise regression 4
Run the Stepwise Regression - 4

Click on the Statistics button to specify additional output.

run the stepwise regression 5
Run the Stepwise Regression - 5
  • We mark the check boxes for optional statistics:
    • R squared change,
    • Descriptives,
    • Part and partial correlations,
    • Collinearity diagnostics, and
    • Durbin-Watson.

Click on the Continue button to close the dialog box.

run the stepwise regression 6
Run the Stepwise Regression - 6

Click on the OK button to produce the output.

answering the sample size question
Answering the Sample Size Question

The analysis included 9 independent variables (6 metric independent variables plus 3 dummy-coded variables). The number of cases available for the analysis was 209, not satisfying the requirement for 360 cases based on the rule of thumb that the required number of cases for stepwise multiple regression should be 40 x the number of independent variables recommended by Tabachnick and Fidell (p. 117).

We should consider mentioning the sample size issue as a limitation of the analysis.

marking the statement for sample size
Marking the Statement for Sample Size

The check box is not marked because we did not satisfy the sample size requirement.

statements about variables included in stepwise regression
Statements about Variables Included in Stepwise Regression

Three statements in the problem list different combinations of the variables included in the stepwise regression.

To determine which is correct, we look at the table of Variables Entered and Removed in the SPSS output.

answering the question about variables included in stepwise regression 1
Answering the Question about Variables Included in Stepwise Regression - 1

Three independent variables satisfied the statistical criteria for entry into the model. The variable "survey respondents who were white" [hhrace_1] had the largest individual impact on the dependent variable "importance of ethnic identity" [ethimp]. The second variable included in the model was "survey respondents who were black" [hhrace_2]. The third variable included in the model was "frequency of attendance at religious services" [attend].

The column for Variables Removed is empty, telling us that no variables were removed after being entered.

marking the statement about variables included in stepwise regression
Marking the Statement about Variables Included in Stepwise Regression

Three independent variables satisfied the statistical criteria for entry into the model. The variable "survey respondents who were white" [hhrace_1] had the largest individual impact on the dependent variable "importance of ethnic identity" [ethimp]. The second variable included in the model was "survey respondents who were black" [hhrace_2]. The third variable included in the model was "frequency of attendance at religious services" [attend].

We mark the check box for the first of the three statements.

statement about the strength of the relationship
Statement about the Strength of the Relationship

The next two statements focus on the strength of the overall relationship between the dependent variable and the set of predictors that are selected in the stepwise entry of variables. The statement assumes that the overall relationship will be statistically significant, which will be true if any variables are selected for the model.

  • We will use Cohen’s scale for assigning an adjective to the strength of the relationship:
  • less than .10 = trivial
  • .10 up to 0.30 = weak
  • .30 up to .50 = moderately strong
  • .50 or greater = strong
statement about the strength of the relationship54
Statement about the Strength of the Relationship

Three independent variables satisfied the statistical criteria for inclusion in the model. We interpret the results for the last step for all of the questions about statistical relationships (Model 3 in this example).

Applying Cohen's criteria for effect size, the relationship was correctly characterized as moderately strong (Multiple R = .374).

The overall relationship was statistically significant (F(3, 205) = 11.11, p < .001. The null hypothesis that "all of the partial slopes (b coefficients) = 0" is rejected, supporting the research hypothesis that "at least one of the partial slopes (b coefficients) is not equal to 0".

marking the statement about the strength of the relationship
Marking the Statement about the Strength of the Relationship

The Multiple R of .374 translates to a moderately strong relationship, so we mark the check box for the second statement on strength of the relationship.

statements about relationships to the dependent variable for individual predictors
Statements about Relationships to the Dependent Variable for Individual Predictors

The next set of statements focus on individual relationships between predictors and the dependent variable. In order for a statement to be true, it must have a statistically significant individual relationship (i.e. it entered into the model), and the direction of the relationship must be interpreted correctly.

answering question about relationship of race of household white
Answering Question about Relationship of RACE OF HOUSEHOLD=WHITE

Again, we base our interpretation about statistical relationships on the last model for variables entered, i.e. Model 3 for this problem.

The statement that "survey respondents who were white attached less importance to ethnic identity compared to the average for all survey respondents" is correct. The individual relationship between the independent variable "survey respondents who were white" [hhrace_1] and the dependent variable "importance of ethnic identity" [ethimp] was statistically significant, ß = -.290, t(199) = -4.38, p < .001.

We reject the null hypothesis that the partial slope (b coefficient) for the variable "survey respondents who were white" = 0 and conclude that the partial slope (b coefficient) for the variable "survey respondents who were white" is not equal to 0. The negative sign of the b coefficient (-0.518) means that survey respondents who were white attached less importance to ethnic identity compared to the average for all survey respondents.

marking the statement about relationship of race of household white
Marking the Statement about Relationship of RACE OF HOUSEHOLD=WHITE

Since the statement “survey respondents who were white attached less importance to ethnic identity compared to the average for all survey respondents” is supported by our statistical results, we mark the check box.

answering question about relationship of race of household black
Answering Question about Relationship of RACE OF HOUSEHOLD=BLACK

The statement that "survey respondents who were black attached greater importance to ethnic identity compared to the average for all survey respondents" is correct. The individual relationship between the independent variable "survey respondents who were black" [hhrace_2] and the dependent variable "importance of ethnic identity" [ethimp] was statistically significant, ß = .225, t(199) = 3.37, p < .001.

We reject the null hypothesis that the partial slope (b coefficient) for the variable "survey respondents who were black" = 0 and conclude that the partial slope (b coefficient) for the variable "survey respondents who were black" is not equal to 0. The positive sign of the b coefficient (0.524) means that survey respondents who were black attached greater importance to ethnic identity compared to the average for all survey respondents.

marking the statement about relationship of race of household black
Marking the Statement about Relationship of RACE OF HOUSEHOLD=BLACK

Since the statement “survey respondents who were black attached greater importance to ethnic identity compared to the average for all survey respondents" is supported by our statistical results, we mark the check box.

Since the previous statement was correct, this statement cannot be true, so the check box is not marked.

answering question about relationship of attend religious services
Answering Question about Relationship of ATTEND RELIGIOUS SERVICES

The statement that "survey respondents who attended religious services more often attached greater importance to ethnic identity" is correct. The individual relationship between the independent variable "frequency of attendance at religious services" [attend] and the dependent variable "importance of ethnic identity" [ethimp] was statistically significant, ß = .141, t(199) = 2.16, p = .032.

We reject the null hypothesis that the partial slope (b coefficient) for the variable "frequency of attendance at religious services" = 0 and conclude that the partial slope (b coefficient) for the variable "frequency of attendance at religious services" is not equal to 0. The positive sign of the b coefficient (0.062) means that higher values of frequency of attendance at religious services were associated with higher values of "importance of ethnic identity".

marking the statement about relationship of attend religious services
Marking the Statement about Relationship of ATTEND RELIGIOUS SERVICES

Since the statement “survey respondents who attended religious services more often attached greater importance to ethnic identity" is supported by our statistical results, we mark the check box.

The following check box is not marked because the statement contradicts the finding we have just made.

answering question about relationship of age
Answering Question about Relationship of AGE

The statement that "survey respondents who were older attached greater importance to ethnic identity" is not correct. The variable "age" [age] was not among the list of variables included in the stepwise model.

marking the statement for age
Marking the Statement for Age

The check box for the statement for age is not marked because the variable did not enter the model in the stepwise regression.

statement about cross validation
Statement about Cross-validation

The findings from our analysis are generalizable to the extent that they are applicable to cases not included in the analysis. Since we cannot collect new cases, we will divide our sample into two subsets, using one subset to create the model and test the findings on the second subset of cases which were not included in the analysis that created the model.

The final statement concerns the generalizability of our findings to the larger population. To answer this question, we will do a 75/25% cross-validation.

creating the training sample and the validation sample 1
Creating the Training Sample and the Validation Sample - 1

The 75/25% cross-validation requires that we randomly divide the cases for this analysis into two parts:

75% of the cases will be used to run the stepwise regression (the training sample), which will be tested for accuracy on the remaining 25% of the cases (the validation sample).

To set the seed for the random number generator, select Random Number Generator from the Transform menu.

NOTE: you must use the random number seed that is stated in the problem in order to produce the same results that I found. Any other seed will generate a different random sequence that can produce results that are very different from mine.

creating the training sample and the validation sample 2
Creating the Training Sample and the Validation Sample - 2

First, mark the check for Set Starting Point.

Fourth, click on the OK button to complete the action.

Second, select the option button for a Fixed Value.

Third, type the seed number provided in the problem directions: 726201.

NOTE: SPSS does not provide any feedback that the seed has been set or changed. If you are in doubt, you can reopen the dialog box and see what it indicates.

creating the training sample and the validation sample 3
Creating the Training Sample and the Validation Sample - 3

We will create a variable that will contain the information about whether a case is in the training sample or the validation sample. We will name this variable “split” and use a value of 1 to indicate the training sample and a value of 0 to indicate the validation sample.

To create the new variable, select Compute from the Transform menu.

creating the training sample and the validation sample 4
Creating the Training Sample and the Validation Sample - 4

Type the formula as shown in the Numeric Expression text box.

Type the name of the new variable, split, in the Target Variable text box.

The formula uses the SPSS UNIFORM function to create a uniform distribution of decimal numbers between 0 and 1. If the generated number for a case is less than or equal to 0.75, the statement in the text box is True and the split variable will be assigned a 1 for that case. If the generated number is larger than 0.75, the statement is false and the case will be assigned a 0 for split.

Click on the OK button to create the variable.

creating the training sample and the validation sample 5
Creating the Training Sample and the Validation Sample - 5

If we scroll the data editor window to the right, we see the split variable in a new column.

creating the training sample and the validation sample 6
Creating the Training Sample and the Validation Sample - 6

If we created a frequency distribution for the split variable, we see that the breakdown is approximately, not exactly, correct. This is a consequence of generating random numbers – you have no control over the sequence that it generates beyond setting an initial seed.

Though I have done it to create specific results for homework problems, it is not acceptable to run repeated series of random numbers until one gets a sequence that has desirable properties.

an additional task before running the stepwise regression on the training sample
An Additional Task before Running the Stepwise Regression on the Training Sample
  • Before we run the regression on the training sample, we need an additional step that will enable us to compare the accuracy of the model for the training sample to the accuracy of the model for the validation sample, using the R2 for each as our measure of accuracy.
  • We need to exclude from the analysis cases that are missing data for any of the variables that we have designated as candidates for inclusion. If we don’t specifically do this, SPSS may include different cases in predicting values for the dependent variable than it does in determining which variables to include in the model.
  • In model building, SPSS does listwise exclusion of missing data and omits any cases that have missing data for any variable. In predicting scores on the dependent variable, it excludes cases that are missing data for only the variables included in the stepwise model. Thus, when selecting variables, SPSS assumes that only respondents who answer all questions are valid cases; in predicting scores, it assumes that failing to answer a question on a variable that is not included has no importance in the analysis.
selecting cases with valid data for all variables in the analysis 1
Selecting Cases with Valid Data for All Variables in the Analysis - 1

To include only those cases that have valid data for all variables in the analysis, choose the Select Cases command from the Data menu.

selecting cases with valid data for all variables in the analysis 2
Selecting Cases with Valid Data for All Variables in the Analysis - 2

First, mark the option button for If condition is satisfied.

Second, click on the If button to add the condition.

selecting cases with valid data for all variables in the analysis 3
Selecting Cases with Valid Data for All Variables in the Analysis - 3

Type

NMISS(ethimp,age,educ,rincom98,polviews,

attend,sei,sex_1,hhrace_1,hhrace_2) = 0

in the condition textbox. In the parentheses, we type the names of the dependent variable and all of the independent variables.

The SPSS NMISS function counts the number of variables in the list that have missing data.

Telling SPSS to include cases for which this calculation results in 0 indicates that the case was not missing data for any of the variables.

selecting cases with valid data for all variables in the analysis 4
Selecting Cases with Valid Data for All Variables in the Analysis - 4

Click on the Continue button to close the dialog box.

selecting cases with valid data for all variables in the analysis 5
Selecting Cases with Valid Data for All Variables in the Analysis - 5

Click on the OK button to execute the command.

selecting cases with valid data for all variables in the analysis 6
Selecting Cases with Valid Data for All Variables in the Analysis - 6

The excluded cases have a slash through the case number.

run the stepwise regression on the training sample 1
Run the Stepwise Regression on the Training Sample - 1

To run the regression, select Regression > Linear from the Analyze menu.

run the stepwise regression on the training sample 2
Run the Stepwise Regression on the Training Sample - 2
  • Move the dependent variable
  • "importance of ethnic identity" [ethimp]
  • to the Dependent text box.
  • Move the independent variables:
  • "age" [age]
  • "highest year of school completed" [educ],
  • "income" [rincom98],
  • "description of political views" [polviews],
  • "frequency of attendance at religious services" [attend],
  • "socioeconomic index" [sei],
  • “survey respondents were male" [sex_1],
  • "survey respondents who were white" [hhrace_1],
  • "survey respondents who were black" [hhrace_2]
  • to the Independent(s) list box.
run the stepwise regression on the training sample 3
Run the Stepwise Regression on the Training Sample - 3

The critical steps to produce a stepwise regression on the training sample are the selection of the stepwise method for entering variables and the inclusion of the training sample cases.

Select Stepwise from the Method drop down menu.

run the stepwise regression on the training sample 4
Run the Stepwise Regression on the Training Sample - 4

To select the training sample, we move the split variable to the Selection Variable text box.

First, highlight the split variable.

Second, click on the right arrow button to the left of the Selection Variable text box..

run the stepwise regression on the training sample 5
Run the Stepwise Regression on the Training Sample - 5

Click on the Rule button to specify the value that we want split to use to select cases.

run the stepwise regression on the training sample 6
Run the Stepwise Regression on the Training Sample - 6

First, type 1 in the Value text box. Recall that this is the value of split indicating training cases.

Second, click on the Continue button to close the dialog box.

run the stepwise regression on the training sample 7
Run the Stepwise Regression on the Training Sample - 7

Click on the Statistics button to specify additional output.

run the stepwise regression on the training sample 8
Run the Stepwise Regression on the Training Sample - 8
  • We mark the check boxes for optional statistics:
    • R squared change,
    • Descriptives,
    • Part and partial correlations,
    • Collinearity diagnostics, and
    • Durbin-Watson.

Click on the Continue button to close the dialog box.

run the stepwise regression on the training sample 9
Run the Stepwise Regression on the Training Sample - 9
  • We mark the check boxes for optional statistics:
    • R squared change,
    • Descriptives,
    • Part and partial correlations,
    • Collinearity diagnostics, and
    • Durbin-Watson.

Click on the Continue button to close the dialog box.

run the stepwise regression on the training sample 10
Run the Stepwise Regression on the Training Sample - 10

Click on the OK button to produce the output.

validating the model 1
Validating the Model - 1

The first step in our validation is to make certain that the model based on the training sample reasonably approximates the model based on the full sample.

Here we see that both models included 3 variables.

If the number of models (steps) were different, the validation would fail.

validating the model 2
Validating the Model - 2

Second, we verify that the model based on the training sample included the same three variables as the model based on the full data set.

We do not require that the variables be entered in the same order, as the difference in samples can easily result in small shifts.

The same variables entered into the stepwise regression of the training sample that entered into the stepwise regression using the full sample ("frequency of attendance at religious services" [attend], "survey respondents who were black" [hhrace_2] and "survey respondents who were white" [hhrace_1]).

validating the model 3
Validating the Model - 3

Third, we compare the accuracy of the model for the validation sample to the accuracy of the model for the training sample.

We have to calculate the R² for the validation sample (split ~= 1.0) by hand from the Multiple R: .402² = .162.

The R² for the 75% training sample was 0.131 and the R² for the 25% validation sample was 0.162, resulting in a value of .131 – 162 = -.031 for shrinkage. Since

-.031 is <= .02, the validation is successful.

If the shrinkage were greater than .02 (2%), the validation fails.

marking the check box for the cross validation statement
Marking the Check Box for the Cross-validation Statement

The validation analysis supported the generalizability of the findings of the analysis to the population represented by the sample in the data set.

We mark the check box for the validation.

the question graded in blackboard
The Question Graded in Blackboard

When the problem was submitted, BlackBoard confirmed that all marked answers were correct.

logic diagram for solving homework problems level of measurement

No

Yes

Yes

No

Logic Diagram for Solving Homework Problems: Level of Measurement

Run script to dummy-code

non-metric variables, if needed

  • Do not mark check box
  • Mark: Inappropriate application of the statistic
  • Stop

Level of

measurement ok?

Ordinal level variable

treated as metric?

Consider limitation in discussion of findings

Run stepwise regression

logic diagram for solving homework problems sample size and overall relationship

No

No

No

Yes

Yes

Yes

Logic Diagram for Solving Homework Problems: Sample Size and Overall Relationship

Sample size ok

(number of Iv’s x 40)?

  • Do not mark check box
  • Consider limitation in discussion of findings

Mark check box

for correct sample size

Model will be statistically significant if any variables entered

1+ variables entered

in model?

Stop (no significant predictors)

Model is not trivial

(Multiple R >= .10)

Stop (model is

not usable)

logic diagram for solving homework problems strength of overall relationship

No

No

Yes

Yes

Logic Diagram for Solving Homework Problems: Strength of Overall Relationship

Subset of entered variables correctly identified?

Do not mark check box for correct subset

Mark check box

for correct subset

Strength of model

correctly characterized

  • Do not mark check box

Mark check box

for correct strength

logic diagram for solving homework problems individual relationships

Yes

Yes

No

No

Logic Diagram for Solving Homework Problems: Individual Relationships

Variable entered

and not removed?

No

Correct interpretation of direction of relationship?

Do not mark check box for individual relationship

Mark check box

for individual relationship

Additional variables

entered?

Yes

logic diagram for solving homework problems cross validation

Yes

Yes

No

No

Logic Diagram for Solving Homework Problems: Cross-validation

Create split variable

using specified seed

Select cases with no missing

values for all variables

Run stepwise regression

on training sample

Same variables entered in full model?

Do not mark check box for supporting validation

Shrinkage

< or = 2%?

Do not mark check box for supporting validation

Mark check box for supporting validation