12. Dummy variables
Module items¶
R Script file code¶
-
[[Copy the code]] below ➜ Paste into [[RStudio console]] ➜ Hit Enter
-
source(url("https://raw.githubusercontent.com/ttezcann/ssric-reg/refs/heads/main/docs/assets/attachments/data/0-packages-data.R")); (function(f="12-dummy.R"){if(!file.exists(f)){download.file("https://raw.githubusercontent.com/ttezcann/ssric-reg/refs/heads/main/docs/assets/attachments/modules/12.-dummy-variables/12-dummy.R",f,mode="wb");file.edit(f)}else{download.file("https://raw.githubusercontent.com/ttezcann/ssric-reg/refs/heads/main/docs/assets/attachments/modules/12.-dummy-variables/12-dummy.R",gsub(".R","-original.R",f),mode="wb");file.edit(gsub(".R","-original.R",f))}})()- When this R script file opens in a new tab, [[Save R script file|save your previous R script file(s)]], and
- Close the previous tabs (R Script files), which you can find later in the [[Files tab]].
- When this R script file opens in a new tab, [[Save R script file|save your previous R script file(s)]], and
-
Lab assignment¶
Sample lab assignment¶
Suggested reading¶
Allen, Michael Patrick. 1997. “Regression Analysis with Dummy Variables.” Pp. 128–32 in Understanding Regression Analysis. Boston, MA: Springer.
Learning outcomes¶
- Explain how dummy variables represent categorical factor variables in linear regression
- Create dummy variables from binary and nominal variables and from groups based on continuous variables
- Determine which dummy variables to include in a regression model and identify the omitted comparison category
- Interpret coefficients of dummy variables in a linear regression model, referencing the omitted comparison category
- Compare the relative size of associations for dummy and continuous factor variables using standardized coefficients.
[[Dummy variable]] definition¶
- Linear regression uses a continuous outcome variable. Factor variables can be continuous or categorical.
- In the social sciences, we often work with categorical factor variables whose numbers are category codes rather than measurements.
- A [[dummy variable]] is a variable coded zero (0) or one (1) to represent a category in a regression model.
- Dummy variables allow us to compare categories. For example, we can compare the predicted personal income of females with that of males.
Examples¶
Example: Rent prices¶
- Imagine a linear regression analysis in which we examine the association between population of the city (continuous) and house type (categorical: 1 for Townhouse, 2 for Studio) and the monthly rent (outcome variable).
-
We want to know whether predicted rent differs between townhouses and studios and how it is associated with the population of the city.
-
flowchart LR subgraph F["Factor variables"] A[Population of city <br><br> Continuous variable <br><br> Min: 5K, Max: 10M] end subgraph H["Factor variables"] B[House type <br><br> Categorical variable <br><br> 1: Townhouse; 2: Studio] end subgraph O["Outcome variable"] C[Rent] end A -.->|Association?| C B -.->|Association?| C
-
-
If we include the original house type variable in our model as it is, the linear regression model will incorrectly assume that:
- Living in a "Studio" (2) is somehow twice the value of living in a “Townhouse” (1).
- This would be similar to estimating the coefficients for age; 20-year-old and 40-year-old respondents (40 is twice 20).
- The solution:
- We use [[dummy variable]]s, which have only two values, zero (0) and one (1).
- In the townhouse dummy variable, 1 means townhouse and 0 means not townhouse.
-
In the studio dummy variable, 1 means studio and 0 means not studio.
-
We create both variables to learn their coding, but a regression model with an intercept needs only one of these two dummy variables.
-
respondent Original variable Dummy variable 1 Dummy variable 2 housetype townhouse studio 1 2 (studio) 0 1 2 1 (townhouse) 1 0 3 2 (studio) 0 1 4 1 (townhouse) 1 0 5 2 (studio) 0 1 6 1 (townhouse) 1 0
-
- We use [[dummy variable]]s, which have only two values, zero (0) and one (1).
GSS example: Sex¶
- The original sex variable uses 1=Male and 2=Female in GSS.
- If we have a variable for sex with two responses (1=Male and 2=Female), we can't use the original values of 1 and 2, and interpret that as meaning being female is somehow two times of that being male.
- The solution is to use dummy variables - variables with only two values, zero and one.
- It does make sense to create a variable called “male" and interpret it as meaning that someone assigned a 1 on this variable is male and someone with a 0 is not.
-
Following this procedure, we also create a separate “female” dummy variable to show the effects of being female on the outcome variable, such as "personal income."
-
respondent Original variable Dummy variable 1 Dummy variable 2 sex male female 1 1 (male) 1 0 2 1 (male) 1 0 3 2 (female) 0 1 4 1 (male) 1 0 5 2 (female) 0 1 6 2 (female) 0 1
-
-
Dummy variable coding structure¶
-
If a variable has two categories, we can create two dummy variables, one for each category.
-
Variable name Variable label Variable type Question wording and response categories sexRespondents' sex Binary What's your sex?
(1: Male; 2: Female)
-
-
Since we create new variables using the dummy variable codes below, we also need to write these dummy variables' new variable labels. For example:
- Respondents' sex (1: Male; 2: Female)
- Being male
- Being female
- Respondents' immigrant status (1: Yes; 2: No)
- Being nonimmigrant
- Being immigrant
- Belief in life after death (1: Yes; 2: No)
- Believing in life after death
- Not believing in life after death
- Level of finding life exciting (1: Exciting; 2: Routine; 3: Dull)
- Finding life exciting
- Finding life routine
- Finding life dull
- Confidence level in education (1: A great deal; 2: Only some; 3: Hardly any)
- Having a great deal of confidence in education
- Having only some confidence in education
- Having hardly any confidence in education
- Home ownership status (1: Own; 2: Rent)
- Owning a house
- Or Having a house
- Not owning a house
- Or Not having a house
- Owning a house
- Respondents' sex (1: Male; 2: Female)
-
[[Model code]]
-
[[Working code]]
-
- Line 1: We put the new variable name here:
malehere ➜dummyvariable1_name- It's better to write the value label here, thus
male. Something simple and memorable.
- It's better to write the value label here, thus
- Line 2: We put the original variable that we want to create a dummy variable.
sexhere ➜orig_var- since
1is male in GSS dataset, we put1here ➜value- The whole code with the last
1, 0means:- "if sex is 1, create a new variable called “male”, assign them “1”, and assign the rest “0”".
- The whole code with the last
- Line 3: We write this new dummy variable's variable label here "
Being male" - Line 5: We put the new variable name here:
femalehere ➜dummyvariable2_name- It is useful to choose a simple and memorable variable name, such as
female.
- It is useful to choose a simple and memorable variable name, such as
- Line 6: We put the original variable that we want to create a dummy variable.
sexhere ➜orig_var- since
2is female in GSS dataset, we put2here ➜value- The whole code with the last
1, 0means:- "if sex is 2, create a new variable called “female”, assign them “1”, and assign the rest “0”".
- The whole code with the last
- Line 7: We write this new dummy variable's variable label here "
Being female" - Creating a dummy variable is in a way recoding a variable, and thus creating a new variable.
- Line 1: We put the new variable name here:
-
Adding dummy variable to a regression model¶
-
Let's add the dummy variables we have just created to the model we used in Linear regression basics module.
-
[[Model code]]
-
[[Working code]]
-
- Line 1: We put
conrinchere ➜outcome_here;res16here ➜factor_var1;agehere ➜factor_var2;prestg10here ➜factor_var3;educhere ➜factor_var4;malehere ➜factor_var5;femalehere ➜factor_var6.- Outcome variable variable first; then, factor variables separated by plus (+).
- Line 2: Check the first argument:
model5. If this is model5, then we should use model5 here- This needs to be
model5, otherwise this code won't work.
- This needs to be
- Line 1: We put
-
-
-
Respondents' personal income
-
Factors Coeff. std. Coeff. p (Intercept) -48487.47
(3955.96)-0.00
(0.02)0.001*** Population density of residence during
adolescence years570.97
(409.78)0.03
(0.02)0.164 Respondents' age 191.36
(40.68)0.09
(0.02)0.001*** Respondents' occupational prestige score 624.94
(49.18)0.26
(0.02)0.001*** Respondents' education in years 2786.02
(252.43)0.23
(0.02)0.001*** Being male 11787.50
(1187.55)0.18
(0.02)0.001*** Observations 2268 R² / R² adjusted 0.231 / 0.229 - RStudio created the table, but where's
female? -
Actually, RStudio console part shows: "Parameters
femalewere not estimable : -
First, let's interpret the coefficient for the male dummy variable:
- Being male is associated with $11,788 higher predicted personal income than being female.
- We inherently know that “being female is associated with $11,788 lowe predicted personal income compared to being female.” Therefore, adding both dummy variables is redundant.
- If we included
femaleinstead ofmale, its coefficient would be approximately -11,787.50, and the comparison group would be male.
- If we included
- We inherently know that “being female is associated with $11,788 lowe predicted personal income compared to being female.” Therefore, adding both dummy variables is redundant.
- Being male is associated with $11,788 higher predicted personal income than being female.
- RStudio created the table, but where's
-
[[Omitting dummy variable]]¶
- Then, which dummy variable(s) to include and which one(s) to omit?
- We include male if we want to compare males with females on predicted personal income.
- We include female if we want to compare females with males on predicted personal income.
- Either choice produces the same predicted values when the same respondents and other factors are used.
- We include one dummy variable and omit the other as the comparison category.
- If both are included, R cannot estimate both coefficients separately and it will remove the last added dummy variable.
- We include one dummy variable and omit the other as the comparison category.
- Either choice produces the same predicted values when the same respondents and other factors are used.
-
Omitting a dummy variable does not mean removing respondents from that category:
-
We actually attribute a significant meaning to the omitted dummy variable that:
- The omitted variable becomes our [[comparison dummy variable]]:
-
Its category remains in the data and is used as the reference for interpreting the included dummy variable.
-
Interpretation of dummy variables
Being male (included dummy variable) is associated with $11,788 higher predicted personal income than being female (omitted - comparison dummy variable).
OR
Being female (included dummy variable) is associated with $11,788 lower predicted personal income than being male (omitted - comparison dummy variable).
-
-
- The omitted variable becomes our [[comparison dummy variable]]:
-
Likewise,
- if we create two dummy variables using a single original variable:
- We need to include one, and omit one.
- if we create three dummy variables using a single original variable:
- We need to include two, and omit one.
- if we create four dummy variables using a single original variable:
- We need to include three, and omit one.
- if we create two dummy variables using a single original variable:
-
GSS example: Predicting personal income (conrinc)¶
- We'll add dummy variables to the model we used in Linear regression basics module.
Find the variables in Variables in GSS page¶
-
In this analysis, we examine whether the factor variables are associated with higher or lower personal income. Linear regression alone does not establish that they cause changes in personal income.
-
flowchart LR subgraph C0[Numerical factor variables] direction TB A[Population density] B[Age] C[Occupational prestige] D[Education] end subgraph D0[Dummy factor variables] subgraph I0[Immigration status] direction TB I1[Being nonimmigrant] I2[Being immigrant] end subgraph M0[Marital status] direction TB M1[Being married] M2[Being formerly in union] M3[Being single ] end subgraph S0[Socio-economic status] direction TB S1[Low SES] S2[Moderate SES] S3[High SES] end end subgraph O0[Outcome variable] E[Personal income] end A -.->|Association?| E B -.->|Association?| E C -.->|Association?| E D -.->|Association?| E I0 -.->|Association?| E M0 -.->|Association?| E S0 -.->|Association?| E
-
-
We want to check the variable types:
conrincis continuous,res16is a coded residence category, andage,prestg10, andeducare treated as numerical factors. We also need to identify the categories of the variables used to create dummy variables. -
[[Search]] these variable names in Variables in GSS page.
-
Variable name Variable label Variable type Question wording and response categories conrincRespondents' personal income Continuous What is your income in dollars?
(Min: $281.5; Max, $123,761.9)res16Population density of residence during adolescence years Ordinal ✅ Which of the categories on this card comes closest to the type of place you were living in when you were 16 years old?
(1: Country, nonfarm; 2: Farm; 3: Town less than 50K; 4: 50K to 250K; 5: Big city, suburb; 6: City greater than 250K)ageRespondents' age Continuous What is your age?
(Min: 18, Max: 89)prestg10Respondents' occupational prestige score Continuous Respondent's occupational prestige score (calculated)
(Min: 16, Max: 80)educRespondents' education in years Continuous What is the highest year of school you completed?
(Min: 0, Max: 20)bornRespondents' immigrant status Binary Were you born in this country?
(1: Yes; 2: No)maritalRespondents' marital status Nominal Are you currently — married, widowed, divorced, separated, or have you never been married?
(1: Married; 2: Widowed; 3: Divorced; 4: Separated; 5: Never married)sei10Respondents' socio-economic index score Continuous Socio-economic index score of the respondent (calculated)
(Min: 9, Max: 92.8)
-
[[Dummy variable]]: Categorical (binary) #code¶
-
[[Model code]]
-
[[Working code]]
-
- Line 1: We put the new variable name here:
nonimmigranthere ➜dummyvar1- It's better to write something simple and memorable value label here, thus
nonimmigrant.
- It's better to write something simple and memorable value label here, thus
- Line 2: We put the original variable that we want to create a dummy variable.
bornhere ➜orig_var- since
1is "yes to being born in this country" in GSS dataset, we put1here ➜value- The whole code with the last
1, 0means:- "if born is 1, create a new variable called nonimmigrant, assign them “1”, and assign the rest “0”".
- The whole code with the last
- Line 3: We write this new dummy variable's variable label here "
Being nonimmigrant" - Line 5: We put the new variable name here:
immigranthere ➜dummyvar2- It's better to write something simple and memorable here, thus
immigrant.
- It's better to write something simple and memorable here, thus
- Line 6: We put the original variable that we want to create a dummy variable.
bornhere ➜orig_var- since
2is "no to being born in this country" in GSS dataset, we put2here ➜value- The whole code with the last
1, 0means:- "if born is 2, create a new variable called immigrant, assign them “1”, and assign the rest “0”".
- The whole code with the last
- Line 7: We write this new dummy variable's variable label here "
Being immigrant" - Creating a dummy variable is in a way recoding a variable, and thus creating a new variable.
- [[Find this working code in the R script file]].
- [[Highlighting and running]] this code will create two more variables,
nonimmigrantandimmigrant.
- [[Highlighting and running]] this code will create two more variables,
- [[Find this working code in the R script file]].
- Line 1: We put the new variable name here:
-
[[Dummy variable]]: Categorical (nominal/ordinal) #code¶
-
[[Model code]]
-
-
[[Working code]]
-
- These codes follow the same approach as the dummy variable codes for binary variables.
- The exception is the second dummy variable in which we merge some categories.
- Line 5: We put the new variable name here:
formerlyunionhere ➜dummyvar2- It's better to write something simple and memorable, thus
formerlyunion.
- It's better to write something simple and memorable, thus
- Line 6: We put the original variable that we want to create a dummy variable.
maritalhere ➜orig_var- Since we want to merge respondents who are
2"Widowed",3"Divorced", and4"Separated", we putmarital == 2 | gss$marital == 3 | gss$marital == 4, 1, 0here ➜gss$orig_var == value | gss$orig_var == value | gss$orig_var == value, 1, 0- The whole code with the last
1, 0means:- "if marital is 2 or 3 or 4, create a new variable called formerlyunion, assign them “1”, and assign the rest “0”".
- The whole code with the last
- Line 7: We write this new dummy variable's variable label here "
Being formerly in union"- Creating a dummy variable is in a way recoding a variable, and thus creating a new variable.
- [[Find this working code in the R script file]].
- [[Highlighting and running]] this code will create three more variables,
married,formerlyunion, andsingle.
- [[Highlighting and running]] this code will create three more variables,
- [[Find this working code in the R script file]].
- Creating a dummy variable is in a way recoding a variable, and thus creating a new variable.
- These codes follow the same approach as the dummy variable codes for binary variables.
-
[[Dummy variable]]: Continuous #code¶
-
[[Model code]]
-
-
[[Working code]]
-
- Line 1: We put the new variable name here:
lowseshere ➜dummyvar1- It's better to write something simple and memorable value label here, thus
lowses.
- It's better to write something simple and memorable value label here, thus
- Line 2: We put the original variable that we want to create a dummy variable.
sei10here ➜orig_var- since we define low ses as "40 and all values below 40", we put
40here ➜value- The whole code with the last
1, 0means:- "if sei10 is 40 and below, create a new variable called lowses, assign them “1”, and assign the rest “0”".
- The whole code with the last
- Line 3: We write this new dummy variable's variable label here "
Having low socio-economic status" - Line 5: We put the new variable name here:
moderateseshere ➜dummyvar2- It's better to write something simple and memorable value label here, thus
moderateses.
- It's better to write something simple and memorable value label here, thus
- Line 6: We put the original variable that we want to create a dummy variable.
sei10here ➜orig_var- We define moderate SES as scores from 41 to 75, including both endpoints. We put
41here ➜lowest_valueand75here ➜highest_value.- The whole code with the last
1, 0means:- "if sei10 is 41 or higher and 75 or lower, create a new variable called moderateses, assign them “1”, and assign the rest “0”".
- The whole code with the last
- Line 7: We write this new dummy variable's variable label here "
Having moderate socio-economic status" - Line 9: We put the new variable name here:
highseshere ➜dummyvar3- It's better to write something simple and memorable value label here, thus
highses.
- It's better to write something simple and memorable value label here, thus
- Line 10: We put the original variable that we want to create a dummy variable.
sei10here ➜orig_var- since we define high ses as "76 or higher" we put
76here ➜value- The whole code with the last
1, 0means:- "if sei10 is 76 and higher, create a new variable called highses, assign them “1”, and assign the rest “0”".
- The whole code with the last
-
Line 11: We write this new dummy variable's variable label here "
Having high socio-economic status"- Creating a dummy variable is in a way recoding a variable, and thus creating a new variable.
- [[Find this working code in the R script file]].
- [[Highlighting and running]] this code will create three more variables,
lowses,moderateses, andhighses.
- [[Highlighting and running]] this code will create three more variables,
- [[Find this working code in the R script file]].
- Creating a dummy variable is in a way recoding a variable, and thus creating a new variable.
-
Clarification on codes
- Creating dummy variables using continuous variables requires a different coding structure.
- This is because continuous variables have many possible values.
sei10is the socio-economic index score of the respondent with minimum value of 9 and maximum value of 92.8.- We will create three separate categories for this continuous variable:
- 1: Less than or equal to 40
- This means respondents with a
sei10score of 40 or lower. - Code:
ifelse(gss$sei10 <= 40, 1, 0)
- This means respondents with a
- 2: From 41 to 75
- This means respondents with a
sei10score from 41 through 75, including decimals within this range. - Code:
ifelse(gss$sei10 >= 41 & gss$sei10 <= 75, 1, 0)
- This means respondents with a
- 3: Greater than or equal to 76
- This means respondents with a
sei10score of 76 or higher. - Code:
ifelse(gss$sei10 >= 76, 1, 0)
- This means respondents with a
- In these codes:
<=means less than or equal to.- Example:
sei10 <= 40 - This includes 40 and all values below 40.
- Example:
>=means greater than or equal to.- Example:
sei10 >= 76 - This includes 76 and all values above 76.
- Example:
>=and<=include the boundary values in the moderate SES category.- For example, a score of 41 belongs to moderate SES.
- For example, a score of 74 belongs to moderate SES.
&means and.- We use
&when both conditions must be true at the same time. - This means:
- The
sei10score must be 41 or higher- and
- The
sei10score must be 75 or lower
- The
- We use
- 1: Less than or equal to 40
- We will create three separate categories for this continuous variable:
- Creating dummy variables using continuous variables requires a different coding structure.
- Line 1: We put the new variable name here:
-
[[Linear regression]] with [[dummy variable]]s #code¶
-
[[Model code]]
-
[[Working code]]
-
- Line 1: We put
conrinchere ➜outcome_here;res16here ➜factor1_here;agehere ➜factor2_here;prestg10here ➜factor3_here;educhere ➜factor4_here;malehere ➜factor5_here;immigranthere ➜factor6_here;marriedhere ➜factor7_here;singlehere ➜factor8_here;lowseshere ➜factor9_here;moderateseshere ➜factor10_here.- Outcome variable variable first; then, factor variables separated by plus (+).
- Line 2: Check the first argument:
model5. If this is model5, then we should use model5 here.- This needs to be
model5, otherwise this code won't work.- [[Find this working code in the R script file]].
- [[Highlighting and running]] this code will generate the output below (which will appear in the [[viewer tab]] of RStudio).
- [[Find this working code in the R script file]].
- This needs to be
- Line 1: We put
-
[[Linear regression]] with [[dummy variable]]s #output¶
-
Respondents' personal income
-
Factors Coeff. std. Coeff. p (Intercept) 1716.51
(6516.85)-0.00
(0.02)0.792 Population density of residence during
adolescence years432.41
(400.58)0.02
(0.02)0.281 Respondents' age 67.87
(44.24)0.03
(0.02)0.125 Respondents' occupational prestige score 154.14
(68.21)0.07
(0.03)0.024* Respondents' education in years 1983.68
(253.42)0.16
(0.02)< 0.001*** Being male 10472.43
(1154.80)0.16
(0.02)< 0.001*** Being immigrant 2133.64
(1610.78)0.02
(0.02)0.185 Being married 6191.99
(1583.73)0.10
(0.02)< 0.001*** Being single -5568.24
(1765.27)-0.08
(0.03)0.002** Having low socio-economic status -21005.16
(2579.48)-0.33
(0.04)< 0.001*** Having moderate socio-economic status -5320.48
(1974.35)-0.08
(0.03)0.007** Observations 2260 R² / R² adjusted 0.290 / 0.287
-
[[Linear regression]] with [[dummy variable]]s #interpretation¶
-
Linear regression interpretation sample
- First section: The significance levels
- Respondents' occupational prestige score, respondents' education in years, being male, being married, being single, having low socio-economic status, and having moderate socio-economic status have statistically significant associations with respondents' personal income since their p-values are less than 0.05.
- Population density of residence during adolescence years, respondents' age, and being immigrant are not statistically significant factors of respondents' personal income since their p-values are greater than 0.05.
- Second section: The explanation of coefficients
- One additional point of respondents' occupational prestige score is associated with $154 higher predicted personal income.
- One additional year of respondents' education is associated with $1,984 higher predicted personal income.
- Being male is associated with $10,472 higher predicted personal income than being female.
- Being married is associated with $6,192 higher predicted personal income than being formerly in union.
- Being single is associated with $5,568 lower predicted personal income than being formerly in union.
- Having low socio-economic status is associated with $21,005 lower predicted personal income than having high socio-economic status.
- Having moderate socio-economic status is associated with $5,320 lower predicted personal income than having high socio-economic status.
- Third section: The explanation of standardized coefficients
- The largest standardized association with respondents' personal income is for having low socio-economic status (std. Coeff=-0.33), followed by respondents' education in years and being male (both std. Coeff=0.16), being married (std. Coeff=0.10), being single and having moderate socio-economic status (both std. Coeff=-0.08), and respondents' occupational prestige score (std. Coeff=0.07).
- Fourth section: The explanation of adjusted R-squared
- The adjusted R-squared value indicates that the model, which includes population density of residence during adolescence years, age, occupational prestige score, education in years, sex, immigrant status, marital status, and socio-economic status, accounts for 28.7% of the variation in respondents' personal income.
- First section: The significance levels
-
Linear regression with dummy variables interpretation template
- First section: The significance levels
- [[Variable label]] of significant [[factor variable]] 1, variable label of significant factor variable 2, variable label of significant factor variable 3... have statistically significant associations with variable label of [[outcome variable]] since their p-values are less than 0.05.
- [If any]: Variable label of nonsignificant factor variable 4, variable label of nonsignificant factor variable 5... are not statistically significant factors of variable label of outcome variable since their p-values are greater than 0.05.
- Second section: The explanation of coefficients
- One additional [year/point/unit/score/dollar of factor variable 1] of variable label of significant factor variable 1 is associated with [coefficient with outcome variable unit] higher/lower predicted variable label of outcome variable.
- Variable label of included dummy variable 1 is associated with [coefficient with outcome variable unit] higher/lower predicted variable label of outcome variable than variable label of omitted - comparison dummy variable 1.
- Variable label of included dummy variable 2 is associated with [coefficient with outcome variable unit] higher/lower predicted variable label of outcome variable than variable label of omitted - comparison dummy variable 2.
- Variable label of included dummy variable 3 is associated with [coefficient with outcome variable unit] higher/lower predicted variable label of outcome variable than variable label of omitted - comparison dummy variable 3.
- Third section: The explanation of standardized coefficients
- The largest standardized association with variable label of outcome variable is for variable label of the strongest factor variable (std. Coeff=0.xx), followed by variable label of the second strongest factor variable (std. Coeff=0.xx), and variable label of the third strongest factor variable (std. Coeff=0.xx)...
- Fourth section: The explanation of adjusted R-squared
- The [[adjusted R-squared]] value indicates that the model, which includes variable label of factor variable 1, variable label of factor variable 2, variable label of factor variable 3..., accounts for [adjusted R-squared as a percentage] of the variation in variable label of outcome variable.
- First section: The significance levels
-
Interpretation explanation
- First section: The significance levels
- We identify the variable labels of the factor variables that have statistically significant associations with the outcome variable.
- When the p-value is less than 0.05, we say the factor variable has a statistically significant association with the outcome variable.
- When the p-value is greater than 0.05, we say the factor variable is not a statistically significant factor of the outcome variable.
- We identify the variable labels of the factor variables that have statistically significant associations with the outcome variable.
- Second section: The explanation of coefficients
- We use the Coeff. column to explain how one-unit increases in statistically significant continuous or numerical factor variables are associated with higher or lower predicted values of the outcome variable.
- We include the units of both the factor variable and outcome variable (year, point, unit, score, dollar, etc.).
- For significant dummy variables, we explain how the included category differs in predicted outcome from the omitted comparison category.
- Note: We do not include nonsignificant factor variables in this section.
- We use the Coeff. column to explain how one-unit increases in statistically significant continuous or numerical factor variables are associated with higher or lower predicted values of the outcome variable.
- Third section: The explanation of standardized coefficients
- We use the std. Coeff. column to identify the factor variables with the largest standardized associations with the outcome variable.
- We list statistically significant factor variables from the largest to the smallest absolute standardized coefficient. A negative coefficient can have a larger absolute value than a positive coefficient.
- Note: We do not include nonsignificant factor variables in this section.
- We use the std. Coeff. column to identify the factor variables with the largest standardized associations with the outcome variable.
- Fourth section: The explanation of adjusted R-squared
- We report the adjusted R-squared as a percentage to explain how much of the variation in the outcome variable is accounted for by the model.
- We list all factor variables included in the model, including those that are not statistically significant.
- We report the adjusted R-squared as a percentage to explain how much of the variation in the outcome variable is accounted for by the model.
- First section: The significance levels