Scinovex
article Open Access

Statistical modeling: Analysis of population with different categories

Abstract

Regression models with dummy and effect coding methods are used to analyze the census population (total, male, female) of India with three age groups and in four southern states of India also analyzed the sex ratio/ urban rural ration in four southern states of India.

Full Text

Tables and figures are in the full-text PDF.

Introduction

The purpose of this section is to analyze the Indian census population with three age groups and in four southern states of India. Also analyzed the sex ratio / urban rural ratio in four southern states of India. Here we consider age groups and states as qualitative variables. Qualitative variables usually indicate the presence or absence of a quality or an attribute such as male or female, black or white, catholic or non catholic, citizen or non citizen. A regression model which contains explanatory variables that are exclusively qualitative in nature is known as analysis of variance (ANOVA) model and a model which contains the explanatory variables as an admixture of both quantitative and qualitative variables is known as analysis of covariance (ANCOVA) model. The use of categorical variables as independent variables in the regression model involves the application of coding methods. Coding methods refer to ways in which membership in a given group can be represented in mutually exclusive and exhaustive manner. Any qualitative variable with k categories or classes can be represented by creating (k-1) dummy variables that takes on numerical values. This process involves assigning one numerical value which is called a code to all subjects of a particular group and a different numerical value to all those of the other groups to convert the qualitative variables into quantitative variables to run the regression.

Aim (i)

To find the relation between population (total, male, female) on different age groups in India. (ii) To find the relation between population (total, male, female) on four southern states of India. (iii) To find the relation between sex ratio / urban-rural ratio on four southern states of India. (iv) To test the significant difference in population (total, male, female) in India between census years and between age groups in India. (v) To test the significant difference in population (total, male, female) between census years and between four southern states of India (Andhra Pradesh, Tamil Nadu, Kerala and Karnataka). (vi) To test significant difference in sex ratio / urban-rural ratio between census years and between four southern states of India (Andhra Pradesh, Tamil Nadu, Kerala and Karnataka).

Methodology

To achieve the aims (i), (ii), & (iii), we apply the statistical regression model with categorical variables as independent variables using dummy and effect coding methods. To achieve the aims (iv), (v) & (vi) we apply two way analysis of variance.

Dummy coding

Dummy variables are used as a classifying device in that they divide the entire sample into various groups based on qualities and implicitly allow to run the individual regressions for each sub group. Dummy coding method represents a group membership with dummy variables that take on values 0 and 1. That is membership in a particular group is coded as one where as non membership in a group is coded as zero. The regression model involving one qualitative variable as independent variable with k categories or classes, using dummy coding can be represented as

Where 𝑌 𝑖𝑗 = The score on the dependent variable for subject i in group j 𝛼 0 = The intercept that represents the mean of the group coded 0 on all the dummy variables k = number of categories or classifications of dummy independent variable 𝛼 𝑗 = The regression coefficient associated with 𝑗 𝑡ℎ group, it represents the difference between the mean of the group coded 1 on the corresponding dummy variable and the mean of the group coded 0 on all the dummy variables 𝐷 𝑖𝑗 = The numerical value of dummy variable assigned to subject i in the 𝑗 𝑡ℎ group 𝜖 𝑖𝑗 = The error associated with 𝑖 𝑡ℎ subject in the 𝑗 𝑡ℎ group

Effect coding

Effect coding is appropriate where each group is compared with entire set of groups rather than with a reference group. That is effect coding is useful in testing the effect of a treatment defined as the deviation between treatment mean and the grand mean. In effect coding the dummy variables takes the values 1, 0 and -1. The coding method used for effect coding is similar to that used for dummy coding except for the way in which the reference group is identified. Using dummy coding the reference group is coded as 0 but in the effect coding it is coded as -1. A regression model involving one qualitative variable as independent variable with k categories or classes using effect coding can be represented as

where 𝑌 𝑖𝑗 = The score on the dependent variable Y for subject i in group j 𝛽 0 = The intercept that represents the grand mean of the dependent variable for all groups k = number of categories of the dummy independent variable 𝛽 𝑗 = Regression coefficient associated with 𝑗 𝑡ℎ group, it represents the difference between the mean of the group coded 1 on the corresponding dummy variable and the grand mean of all groups 𝐸 𝑖𝑗 = The numerical value of dummy variable assigned to subject i in the 𝑗 𝑡ℎ group 𝜖 𝑖𝑗 = The error associated with the 𝑖 𝑡ℎ subject in the 𝑗 𝑡ℎ group R 2 can be interpreted in terms of the proportion of variance in the dependent variable that is accounted for by the categorical independent variable.

Example for dummy coding and effect coding

Hussain Alkharusi (2012) [1] explained the use of categorical variables in regression analysis through dummy and effect coding methods with an example. In dummy coding method it is observed that the test of significance of a given regression coefficient is equivalent to a test of difference between the mean of the group associated with the regression coefficient and the mean of the reference group. In effect coding method each group is compared with the entire set of groups rather than with a reference group. Here the test for significance of regression coefficient is equivalent to testing the significance of the treatment effect. The two methods, dummy coding and effect coding gives entirely different interpretations regarding regression coefficients. But in both the methods the values of R 2 is same.

In studying the relationship between k groups of independent categorical variable and the corresponding scores of dependent variable, (k-1) dummy variables D 1 , D shows the dummy coding and effect coding of independent categorical variable. In dummy coding method the subjects in the 1 st group have been coded as 1 for D 1 and 0 for D 2 , D 3 …., D k-1 ; those in the 2 nd group have been coded as 1 for D 2 and 0 for others; those in the 3 rd group have been coded as 1 for D 3 and 0 for others ; ..….; those in the k th group have been coded as 0 for all D 1 , D 2, ….., D k-1. And in effect coding method scores of first group receives a 1 for E 1 and 0 for others; scores of second group receive a 1 for E 2 and 0 for others; scores of third group receives a 1 for E 3 and 0 for others; …. ; scores of k th group receives -1 for all E 1 , E 2, ….., E k-1.

Empirical Analysis

For the propose of empirical analysis, the population data with different categories namely total, male, female, urban, rural related to India as well as four southern states of India namely Andhra Pradesh, Tamil Nadu, Kerala and Karnataka for twelve census years (1901 -2011) also the population of India in three age group intervals 0 -14, 15 -59 and 60+ is extracted from census of India, Office of Registrar general,India.(Source:http://www.censusindia.gov.in/2011cen sus/PCA/A2_Data_Tables/00%20A%202-India.pdf).

The data along with dummy and effect coding methods is presented in tables ( 2) -( 4) and ( 5) -( 7) respectively to find the relation between population (total, male, female) on three different age groups 0 -14, 15 -59 and 60 + of India; tables (8) -( 10) and ( 11) -( 13) to find the relation between population (total, male, female) on four southern states of India; tables (14), (15) / ( 16), (17) to find the relation between sex ratio / urban rural ratio on four southern states of India. Note that, since there are three age groups we consider two dummy variables and there are four southern states, we consider three dummy variables as independent variables. Later regression equations are presented for each of the tables from ( 2) -( 17) and the corresponding interpretations are drawn. From equation (3), the intercept 343.8112 represents the mean of the age group 60 +. The regression coefficient associated with D 1 (1639.7151) indicates that the mean of age group 0 ̶ 14 is 1639.7151 points greater than that of age group 60 +. This difference is statistically significant. Also the regression coefficient associated with D 2 (2711.8547) indicates that the mean of age group 15 ̶ 59 is 2711.8547 points greater than that of age group 60 +. This difference is statistically significant. Since R 2 is significant, we say that proportion of variance in total population accounted for by the age group is statistically significant. Similarly we may write the interpretation of equation (4) and equation (5).

Dummy coding data for three age groups

Effect coding method

For total population [from the data of table ( From equation (6), the intercept 1794.3344 represents the grand mean of all age groups. The regression coefficient associated with E 1 (189.1918) indicates that the mean of age group 0 ̶ 14 is 189.1918 points greater than the grand mean of all age groups. This difference is statistically in significant. Also the regression coefficient associated with E 2 (1261.3314) indicates that the mean of age group 15 ̶ 59 is 1261.3314 points greater than the grand mean of all age groups. This difference is statistically significant. Since R 2 is significant, we say that proportion of variance in total population accounted for by the age groups is statistically significant. Similarly we may write the interpretation of equation ( 7 From Two Way ANOVA (1) Regarding India with respect to total population, male population and female population it is observed that there is significant difference both in census years and in three age groups. (2) Regarding total population, male population and female population it is observed that there is significant difference both in census years and in four southern states of India. (3) Regarding sex ratio it is observed that there is no significant difference between census years, but there is significant difference between four states Andhra Pradesh, Tamil Nadu, Kerala and Karnataka. (4) Regarding urban rural ratio it is observed that there is significant difference both in census years and in four southern states of India.

Conclusions

From dummy and effect coding regression methods the following conclusions are drawn:

(ii). Regarding population in four southern states of India

The average no. of total population in Karnataka is 282.668 lakhs. The average no. of total population in Andhra Pradesh, Tamil Nadu, Kerala respectively given by 138.0683,

References

  1. Census Year Andhra Pradesh Tamil Nadu Total Pop Male Female Rural Urban Total Pop Male Female Rural Urban 1901 190.66
  2. Husain Alkharusin. Categorical Variables in Regression Analysis: A Comparison of Dummy and Effect Coding, International Journal of Education. 2012; 4(2):202-210.
  3. Norman R Draper, Harry Smith. Applied regression analysis, Third Edition, Wiley India Pvt. Ltd, 2011.
Citations
0
FWCI
0.00
field-weighted impact
References
0
Percentile
30%
vs. same field & year
Citation Network

How this paper connects to the literature. Drag to explore, click any node to open that paper.