Next Article in Journal
The History of a Lemma from Archimedes to Newton
Next Article in Special Issue
Randomized Response Techniques: A Systematic Review from the Pioneering Work of Warner (1965) to the Present
Previous Article in Journal
Non-Cooperative Target Attitude Estimation Method Based on Deep Learning of Ground and Space Access Scene Radar Images
Previous Article in Special Issue
A Flexible Method for Diagnostic Accuracy with Biomarker Measurement Error
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Logistic Regression Based on Individual-Level Predictors and Aggregate-Level Responses

Department of Mathematics and Statistics, Wright State University, Dayton, OH 45435, USA
Mathematics 2023, 11(3), 746; https://doi.org/10.3390/math11030746
Submission received: 17 January 2023 / Revised: 27 January 2023 / Accepted: 30 January 2023 / Published: 2 February 2023
(This article belongs to the Special Issue Statistical Methods in Data Science and Applications)

Abstract

:
We propose estimation methods to conduct logistic regression based on individual-level predictors and aggregate-level responses. We derive the likelihood of logistic models in this situation and proposed estimators with different optimization methods. Simulation studies have been conducted to evaluate and compare the performance of the different estimators. A real data-based study has been conducted to illustrate the use of our estimators and compare the different estimators.

1. Introduction

Data can be reported at different levels due to various considerations including economic, confidentiality, and data collection difficulty. For example, the US Census Bureau reports income at the household level. The aggregate-level data in this example are household income, which is a measure of the combined incomes of all people sharing a particular household or place of residence. The individual-level data in this example are individuals’ incomes. The aggregate-level data are defined as data aggregated from individual-level data by groups. Although there are risks in estimating individual-level relationships based on aggregate-level data, such as unequal correlations between variables in aggregate-level data and between the same variables in individual-level data [1,2], researchers continue to use aggregate-level data because in many situations, individual-level data are not available and valid methods for estimating individual-level relationships based on aggregate-level data can be derived [1,3]. The terms “individual” and “aggregate” refer to the different levels and units of analysis [1].
This article intends to solve the problem of estimating models describing an individual-level relationship based on an aggregate-level response variable Y and individual-level predictors X. Examples of data situations include survey data, multivariate time series, social data, and biological data, collected and reported at different levels.
Our interest in developing methods to analyze aggregate data was motivated by real-life examples. One example is group testing of infectious diseases in bio-statistics. To reduce the costs, a two-stage sequential testing strategy is applied. In the first stage, group testing is conducted. Individuals showing positive in the first stage are called back for a follow-up individual test. With the first-stage group testing data available, analyses can be conducted. The second example is consumer demand studies in economics. The consumer’s characteristics data are available at the individual level, whereas the consumer’s purchase data are available only at the aggregate level. The third example is the analysis of multivariate time series. It is likely that different time series are reported at different frequencies. To study the relationships between multiple time series with different frequencies, researchers need to develop statistical methods.
Suppose there are n observations in the sample, ( X i , Y i ) , i = 1 , 2 , , n , X R p , Y R , aggregated into K groups, G 1 , G 2 , , G K , with group sizes, respectively, of n 1 , n 2 , , n K , n g = n . Denote the set of observations in Group g as G g = { g 1 , g 2 , , g n g } . Aggregate-level X and Y, i.e., ( X g * , Y g * ) , g = 1 , 2 , , K are
X g * = i G g X i = i = 1 n g X g i and Y g * = i G g Y i = i = 1 n g Y g i .
Note that Y g * can be any summary statistic calculated from individual-level Y in Group g, and we study summation aggregation in this paper.
Researchers have solved this problem for linear models [4,5,6]. Suppose the linear model describing individual-level data ( X i , Y i ) is
Y i = X i T β + ϵ i , i = 1 , 2 , , n .
Then, the corresponding model describing the aggregated data ( X g * , Y g * ) is
Y g * = ( X g * ) T β + ϵ g * , g = 1 , 2 , , K ,
where ϵ g * = i G g ϵ i is the aggregate-level error so that weighted least squares (WLS) can be applied when ϵ i i . i . d . N ( 0 , σ 2 ) [4]. More estimators have been proposed for linear regression based on aggregate data or partially aggregate data including Palm and Nijman’s MLE estimator [5] and Rawashdeh and Obeidat’s Bayesian estimator [6].
Although the estimations of linear regression models in the above data situation have been well studied, more studies are needed for the estimations of other regression models. The aim of this article is to study the estimations of logistic models in the data situation of aggregate-level Y and individual-level X. We derive the likelihoods and our estimators with different optimization methods in Section 2, conduct simulation studies to evaluate and compare the performances of different estimators in Section 3, illustrate the use of different estimators in real data-based studies in Section 4, provide discussions in Section 5, and draw conclusions in Section 6.

2. Methods

Suppose n independent observations ( X i , Y i ) are modeled by a logistic model
log ( P ( Y i = 1 ) 1 P ( Y i = 1 ) ) = X i T β , i = 1 , 2 , , n .
Then, Y i Bernoulli ( π i ) , where π i = P ( Y i = 1 ) = e x p ( X i T β ) 1 + e x p ( X i T β ) . When individual-level X and Y are both available, the logistic model as a general linear model can be estimated using a range of methods including the Newton–Raphson method and Fisher’s scoring method [7,8].

2.1. Likelihood of Aggregate-Level Y and Individual-Level X

When individual-level Y is not available, we can derive estimators based on aggregate-level Y and individual-level X. Suppose the n observations of ( X i , Y i ) are aggregated into K groups, as described in the introduction section, with the aggregated data ( X g * , Y g * ) , g = 1 , , K , defined in Equation (1).
Aggregate-level Y is obtained by summing all Y within each group. Thus, the distribution of the sum of multiple independent random variables is helpful for studying data aggregation. In our logistic regression scenario, we need to calculate the sum of multiple Bernoulli random variables. In statistics, the Poisson binomial distribution is the distribution of a sum of independent Bernoulli random variables, which do not necessarily have different success probabilities [9,10]. The term PoissonBinomial ( n , ( π 1 , π 2 , , π n ) ) is used to refer to the distribution of the sum of n independent Bernoulli random variables with success probabilities π 1 , π 2 , , π n [9].
Because Y g * is the sum of n g independent Bernoulli random variables,
Y g * PoissonBinomial ( n g , ( π g 1 , π g 2 , , π g n g ) ) ,
where the success probability for the ith individual in Group g is
π g i = P ( Y g i = 1 ) = e x p ( X g i T β ) 1 + e x p ( X g i T β ) .
Denote the individual likelihood for Y g * as L g ( β ) = P ( Y g * ; X g 1 , , X g n g , β ) . Then, the aggregate likelihood L ( β ) = g = 1 K L g ( β ) .

2.2. Calculation and Maximization of Likelihood

Computing the likelihood function needs to calculate the probability mass function for Y g * PoissonBinomial ( n g , ( π g 1 , π g 2 , , π g n g ) ) . The variable Y g * will reduce to Binomial ( n g , π ) when π g 1 = π g 2 = = π g n g . This case can happen when aggregation is based on the values of X and the individual-level predictors X i are the same within each group. This specific aggregation has been well studied in the topic of logistic regression based on aggregate data [7,11]. We consider aggregation not based on X, i.e., allowing different values of X in a group, in this paper.
In general, for a variable Y PoissonBinomial ( n , ( π 1 , π 2 , , π n ) ) , the probability mass function is P ( Y = y ) = A F y i A π i j A c ( 1 π j ) , where F y is the set of all subsets of y integers that can be selected from { 1 , 2 , 3 , , n } and A c is the complement of A [9]. The set F k contains n k elements so the sum over it is computationally intensive and even infeasible for large n. Instead, more efficient ways were proposed, including the use of a recursive formula to calculate P ( Y = y ) based on P r ( Y = k ) , k = 0 , , y 1 , which is numerically unstable for large n [12], and the inverse Fourier transform method [13]. Hong [10] further developed it by proposing an algorithm that efficiently implements the exact formula with a closed expression for the Poisson binomial distribution. We adopted Hong’s algorithm [10] and exact formula in calculating the likelihood function L ( β ) since they are more precise and numerically stable.
Commonly used optimization methods were adopted to maximize the likelihood L ( θ ) , including (1) Nelder and Mead’s simplex method (NM) [14], (2) the Broyden–Fletcher–Goldfarb–Shanno (BFGS) method [15], and (3) the conjugate gradient (CG) method [16].

2.3. Large-Sample Properties of Estimators

As mentioned above, our proposed estimators are obtained by maximizing the aggregate likelihood L ( β ) using different optimization methods (NM, BFGS, and CG). The MLE β ^ M L E is an estimator that maximizes the aggregate likelihood function, i.e., β ^ M L E = a r g m a x β L ( β ) . If our three optimization methods can always obtain the maximizer of L ( β ) , the three estimators will be equal and exactly the same as the MLEs.
In practice, the three optimization methods may not obtain the same value as the MLE. We observed that as the sample size increases, the values obtained using the three optimizations become closer and nearly the same for a large sample size. In discussing large-sample properties, we refer to the scenario of an infinite number of observations and assume that the three optimization methods can always obtain MLEs under the scenario of large samples, i.e., the scenario of an infinite number of observations. Then, our three estimators are identical to the MLE and have the same large-sample properties as the MLE. We add a cautious note that if our estimators are still quite different from the MLE under the large-sample scenario, we cannot state that our estimators have the same large-sample properties as the MLE.
The large-sample properties of the MLE β ^ M L E [17] include (i) consistency, i.e., β ^ M L E β in probability, and (ii) asymptotic normality, i.e., β ^ M L E N ( β , I ( β ) 1 ) , where I ( β ) is the expected information matrix, defined as the negative expectation of the second derivative of the log-likelihood. The expected information matrix can be approximated using the observed information matrix, which is the negative of the second derivative (the Hessian matrix) of the log-likelihood function [17].

2.4. Software Implementation

All analyses in this paper were conducted using R software (version 4.2.0). Multiple R packages were used as follows:
  • The P o i s s o n B i o m i a l package. This package implements multiple exact and approximate methods to calculate Poisson binomial distributions [10]. We used this package to calculate the Poisson binomial distributions and aggregate likelihood L ( β ) .
  • The s t a t s package. This package contains the o p t i m ( ) function, which can conduct general-purpose optimization based on multiple optimization methods, including the Nelder–Mead, BFGS, and CG methods. We used this function to obtain our three estimators using three optimization methods.
  • The g l m package. This package can be used to fit generalized linear models including logistic regression. We used this package to conduct logistic regression.

2.5. Computational Burden

The computational burden of our method relies on three factors: (1) p, (2) aggregate-level data sample size K, and (3) group size n g .
Our estimator for β is obtained by maximizing the aggregate likelihood L ( β ) = g = 1 K L g ( β ) , β R p using three optimization methods (NM, BFGS, and CG). The number of evaluations of the optimization function L ( β ) and the derivatives will increase with respect to an increase in p. Large p will decrease the performance. Given a small fixed number p, the number of function evaluations is O ( 1 ) . Because L ( β ) = g = 1 K L g ( β ) , the computational amount for L ( β ) is K times the computational amount for L g ( β ) .
The computation of L g ( β ) includes two steps. In Step 1, the success probabilities are calculated using Equation (4). The computational burden of Step 1 is O ( n g ) . In Step 2, the probability mass for a Poisson binomial random variable described in Equation (3) is calculated. This step adopts Hong’s Algorithm A, which is an efficient implementation of the discrete Fourier transform of the characteristic function (DFT-CF) of the Poisson binomial distribution [10]. The computational burden of Step 2 is O ( n g 2 ) . In total, the computational burden of our estimation method is O ( 1 ) × K × O ( n g 2 ) = O ( K n g 2 ) , given a small constant p.

3. Simulation Studies

We conducted simulation studies to evaluate the performance of the five estimators. The first estimator, named individual-LR, is the logistic regression estimator based on individual-level X and Y. This estimator is infeasible when only aggregate Y is available. Because aggregate-level Y contains less information compared to individual-level Y, we expect that this infeasible estimator can provide an upper bound for the performance of feasible estimators based on aggregate-level Y. The second estimator, named naive LR, is the logistic regression estimator based on the mean X in each group and the aggregate Y, i.e., Y g * B i n ( n g , X g * / n g ) , g = 1 , 2 , , K . This estimator can provide a rough approximate estimation.
Estimators 3 to 5 are our estimators that maximize the aggregate likelihood L ( β ) using the Nelder–Mead optimization, CG optimization, and BFGS optimization, named aggregate LR with NM, aggregate LR with CG, and aggregate LR based on BFGS, respectively.
The performances of the estimators were compared in three scenarios. In each scenario, simulations were conducted with sample sizes ( K = 300 , 500 , 1000 ), equal group sizes ( n g = 7 , 30 ), and different parameter values. Data were generated as follows:
  • In Scenario 1, X i 1 N ( 0 , 1 ) , X i = ( 1 , X i 1 ) T , Y i Bernoulli ( e X i T β / ( 1 + e X i T β ) ) ,
    β = ( 1 , 2 ) T (Scenario 1A) or ( 1 , 3 ) T (Scenario 1B).
  • In Scenario 2, X i 1 N ( 0 , 1 ) , X i 2 t ( d f = 5 ) , X i = ( 1 , X i 1 , X i 2 ) T ,
    Y i Bernoulli ( e X i T β / ( 1 + e X i T β ) ) , β = ( 1 , 1 , 2 ) T (Scenario 2A) or ( 0 , 2 , 1 ) T
    (Scenario 2B).
  • In Scenario 3, ( X i 1 , X i 2 ) BivariateNormal ( 0 , 2 , 1 , 4 , ρ = 0.5 ) , X i 3 Cauchy ( 0 , 1 ) , X i = ( 1 , X i 1 , X i 2 , X i 3 ) T , Y i Bernoulli ( e X i T β / ( 1 + e X i T β ) ) , β = ( 1 , 1 , 0 , 1 ) T
    (Scenario 3A) or ( 0 , 2 , 1 , 1 ) T (Scenario 3B).
The bias, variance, mean square error (MSE), and mean absolute deviation (MAD) of each of the five estimators’ (E1 to E5) model parameters ( β 0 , , β p ) were calculated. Denote the bias, variance, MSE, and MAD of the q-th estimator of β j as B i a s ( β ^ j , E q ) , V a r ( β ^ j , E q ) , M S E ( β ^ j , E q ) , and M A D ( β ^ j , E q ) . The average squared bias, variance, MSE, and MAD of the qth estimator were calculated as
B i a s 2 ¯ ( E q ) = [ ( B i a s 2 ( β ^ 0 , E q ) + + ( B i a s 2 ( β ^ p , E q ) ] / ( p + 1 ) , V a r ¯ ( E q ) = [ V a r ( β ^ 0 , E q ) + + V a r ( β ^ p , E q ) ] / ( p + 1 ) , M S E ¯ ( E q ) = [ M S E ( β ^ 0 , E q ) + + ( M S E ( β ^ p , E q ) ] / ( p + 1 ) , M A D ¯ ( E q ) = [ M A D ( β ^ 0 , E q ) + + ( M A D ( β ^ p , E q ) ] / ( p + 1 ) .
Please note that we averaged over the squared bias instead of the bias because the positive bias and negative bias can cancel out when averaging the bias. The average across the parameters allows us to obtain the average performance in terms of the squared bias, variance, MSE, and MAD and still maintain the equality of the bias, variance, and MSE, i.e.,
M S E ¯ ( E q ) = B i a s 2 ¯ ( E q ) + V a r ¯ ( E q ) .
In Table 1, we report the average squared biases and variances for the five estimators (E1 to E5) under the different scenarios, sample sizes K, and aggregation sizes n g . As we expected, there was a relatively large bias for the naive estimator E2, which used an approximate likelihood by conducting logistic regressions using the average X. Our estimators (E3 to E5) had relatively small biases because these estimators were working on the correct and exact likelihood functions. The first estimator E1 had the smallest bias by working on individual-level X and individual-level Y. This estimator is widely used when individual-level Y is available. However, under the scenario we intended to solve, only aggregate-level Y was available. Thus, the E1 estimator is infeasible. We still report the performance of E1 to provide some measurements of the possible upper bound of the performance. Because data aggregation will discard information, we expect that estimator E1 will generally perform better than the estimators based on aggregate Y.
Next, we check the variances of all five estimators. The variances of all five estimators were similar in the same magnitude level. There was no estimator that performed uniformly better or even generally better than the other estimators. The naive estimator E2 had similar performance or even slightly better performance in the average variance compared with the other estimators (E1, E3–E5). Our estimators (E3 to E5) were slightly worse in terms of variance. We think the slightly worse performance of our estimators (E3–E5) was likely due to the nonlinear optimization to find the MLE in our estimators. In comparison, the logistic regression estimators (E1 and E2) were calculated using iteratively re-weighted least squares (IRLS) (logistic regression ensures global concavity so that it is simpler to find the MLE), which was numerically more stable compared to the nonlinear optimization of a general likelihood function using (1) Nelder and Mead’s simplex method [14], (2) the BFGS method [15], and (3) the conjugate gradient (CG) method [16].
We point out that although the naive estimator E2 worked on an incorrect (or approximate) likelihood function, which can lead to a large bias due to the incorrect likelihood function, the performance of the variance of E2 did not necessarily become worse. A similar phenomenon was the under-fitting in the data analysis. Suppose the true relationship is a quadratic function. If a linear function is used in model fitting, the estimator will have a large bias due to model mis-specification, whereas the variance may not increase. We note that the main disadvantage of estimator E2 was the use of an incorrect or approximate likelihood function, which can lead to a large bias. Using the correct exact likelihood, i.e., our estimators (E3 to E5), can solve the issue of bias due to the slight increase in variance from the switch in finding the MLE from iteratively reweighted least squares (IRLS) to nonlinear optimization using the Nelder and Mead’s simplex, BFGS, and CG methods. We compared the decrease in bias and increase in variance and think the bias reduction will dominate the variance increase in our estimators. We calculated the overall performance in terms of the MSE and MAD to confirm it.
Our simulation results showed that the naive estimator had a large bias due to the use of an incorrect or approximate likelihood function, which can hurt the MSE. Thus, in Table 2, we report the average performance of the five estimators (E1 to E5) in terms of the MSE and MAD. Our simulation results indicated that our proposed estimators (E3 to E5) were better than the naive LR estimator (E2). As expected, the infeasible estimator (E1) based on individual-level Y performed better than the other four feasible estimators (E2 to E5) based on aggregate-level Y due to the loss of information in the data aggregation. Our estimator based on Nelder and Mead’s simplex optimization (E3) performed slightly better than our estimator based on BFGS optimization (E4) and CG optimization (E5).
We found the performances of our estimators (E3, E4, E5) were slightly worse when the group size n g = 30 compared with the performances of our estimators when the group size n g = 7 . We expect that the performance of our estimators may decrease for a large group size n g due to rounding errors in computation.

4. Real Data-Based Studies

We used real data to illustrate the use of our estimators and compare the different estimators. The dataset used was the “Social-Network-Ads” dataset from the Kaggle Machine Learning Forum (https://www.kaggle.com, accessed on 12 January 2023).
The dataset has been used by statisticians and data scientists to illustrate the use of logistic regression in categorical data analysis. We used the dataset to illustrate the use of our method to conduct logistic regression in the presence of data aggregation.
The Social-Network-Ads dataset in Kaggle is a categorical dataset for determining whether a user purchased a particular product. The dataset (https://www.kaggle.com/datasets, accessed on 12 January 2023) contains 400 people/observations. The information about the person’s purchase action (purchased with a binary variable of 1 denotes purchased and 0 denotes not purchased), as well as the person’s age and estimated salary, is provided. Logistic regression has been recommended in Kaggle to model the person’s purchase action based on the person’s age and estimated salary. We intend to apply our method to this dataset in the presence of data aggregation.
The original dataset is at the individual level, which allows us to conduct logistic regression based on individual-level Y and X. We standardized X by X * = ( X m e a n ( X ) ) / s d ( X ) in data pre-processing. Standardization of X allows for better estimation and interpretation. Standardized coefficients β * are obtained by logistics regression of Y on standardized data X * . The original slope coefficients in β can be calculated by the formula β ^ = β ^ * × s d ( X ) and then the intercept coefficient can be calculated.
We imposed data aggregation on this dataset with an aggregation size n g = 3 , 5 , 7 . We randomly divided the persons into groups of size n g and calculated the group aggregate of the purchase actions Y. Due to confidentiality and the cost of collecting individual-level data, businesses and organizations can choose to post data information at an aggregate level. We mimicked the data aggregation process by random grouping and calculated the aggregate-level Y based on the individual-level Y. We repeated the data aggregation 300 times. In this way, we generated 300 datasets, with the individual-level X and aggregate-level Y calculated.
For each dataset, we conducted logistic regression based on individual-level X and Y and obtained our estimator E1. Since data aggregation discards information, we evaluated the other estimators by checking whether they were close to estimator E1. Because the true values of the coefficients in individual-level logistic regression models are not known in real data-based studies, we used estimator E1 as a gold-standard estimator. We compared the other estimators based on aggregate-level Y to determine which estimator was closer to our gold-standard estimator E1. Note that E1 is an infeasible estimator when individual-level X is not available.
The estimator E1 was calculated based on individual-level X and individual-level Y. The estimated value of estimator E1 remained the same in our 300 generated datasets and E1 was treated as the gold-standard estimator; thus, we denote it as ( β 0 , β 1 , β 2 ) .
Denote the estimated value of β i for the j-th estimator in the k-th dataset by β ^ i , E j ( D k ) . The bias, variance, MSE, and MAD of estimators E2 to E5 for β 0 , β 1 , and β 2 were calculated by the formulae
β ^ i , E j ¯ = k = 1 300 β ^ i , E j ( D k ) / 300 B i a s ( β ^ i , E j ) = β ^ i , E j ¯ β i V a r ( β ^ i , E j ) = k = 1 300 { β ^ i , E j ( D k ) β ^ i , E j ¯ } 2 / 300 M S E ( β ^ i , E j ) = k = 1 300 { β ^ i , E j ( D k ) β i } 2 / 300 M A D ( β ^ i , E j ) = k = 1 300 | β ^ i , E j ( D k ) β i | / 300
For the four estimators based on aggregate-level Y and individual-level X, i.e., E2 to E5, we report the biases and variances in Table 3. We can see that in most cases, there are large biases in estimating β 0 and β 2 and relatively smaller biases in estimating β 1 using the naive estimator E2. Our proposed estimators (E3 to E5) always achieved smaller biases compared to the naive estimator E2. This is because the naive estimator E2 used an approximate likelihood instead of an exact likelihood, which our proposed estimators are based on. In terms of variance, the naive estimator had a relatively smaller variance compared with our estimators E3 to E5. We point out that the calculation algorithm used in E2, i.e., iteratively reweighted least squares (IRLS), was more numerically stable compared with the nonlinear optimization algorithms adopted by our estimators, i.e., Nelder and Mead’s simplex method, the BFGS method, and the conjugate gradient method.
We then checked the overall performance of the different estimators and report the MSE and MAD in Table 4. We found that our estimators (E3 to E5) had better performance than the naive estimator (E2) in terms of the MSE and MAD in all situations based on the Social-Network-Ads dataset.

5. Discussion

Our estimators are obtained by maximizing the nonlinear likelihood function L ( β ) , β R p . Different optimization methods can influence the performance of our estimators. Further studies can be conducted on other optimization methods such as the genetic algorithm or using multiple starting values. The performance of optimization is expected to decrease when p increases.
We only consider independent individual-level data, i.e., ( X i , Y i ) , i = 1 , 2 , , n . The n observations are randomly divided into groups of size n g and the aggregate-level Y is calculated after grouping. In this paper, we only consider the situation of “grouping completely at random”, which means that the grouping mechanism is completely random. The values of X and Y do not influence the grouping. Further studies can be conducted beyond this type of grouping mechanism.
Our aggregation scheme is based on independent individual-level data. There are more aggregations schemes. For example, temporal aggregation can aggregate dependent data, which can generate aggregated low-frequency time series based on high-frequency time series by summing every m consecutive time points. For example, we can aggregate daily time series into weekly time series by summing every m = 7 consecutive daily observations. Temporal aggregation is often based on a time series model such as an integer-valued generalized autoregressive conditional heteroskedasticity (INGARCH) [18].
We note that the proposed methods also allow for other link functions in addition to the logit link. For example, when a probit link function is used, we can estimate individual-level probit models based on aggregate-level Y and individual-level X. In addition, we only consider binary responses in this paper. A follow-up study to extend our methods to handle responses with more than two levels are under development.

6. Conclusions

We proposed methods to estimate logistic models based on individual-level predictors and aggregate-level responses. We conducted simulation studies to evaluate the performance of the estimators and show the advantage of our estimators. We then used the Social-Network-Ads dataset to illustrate the use of our estimators in the presence of data aggregation and compared the different estimators. Both the simulation studies and real data-based studies have shown the advantage of our estimators in estimating logistics models describing individual-level behaviors based on aggregate-level Y and individual-level X, i.e., when there is data aggregation in the response variable.

Funding

This research received no external funding.

Data Availability Statement

All data used in the study are publicly available.

Conflicts of Interest

The author declares no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
BFGSBroyden–Fletcher–Goldfarb–Shanno method
CFCharacteristic function
CGConjugate gradient
DFTDiscrete Fourier transform
IRLSIteratively re-weighted least squares
LRLogistics regression
MADMean Absolute Deviation
MSEMean Square Error
NMNelder-Mead method

References

  1. Firebaugh, G. A rule for inferring individual-level relationships from aggregate data. Am. Sociol. Rev. 1978, 43, 557–572. [Google Scholar] [CrossRef]
  2. Robinson, W.S. Ecological correlations and the behavior of individuals. Int. J. Epidemiol. 2009, 38, 337–341. [Google Scholar] [CrossRef]
  3. Hammond, J.L. Two sources of error in ecological correlations. Am. Sociol. Rev. 1973, 38, 764–777. [Google Scholar] [CrossRef]
  4. Hsiao, C. Linear regression using both temporally aggregated and temporally disaggregated data. J. Econom. 1979, 10, 243–252. [Google Scholar] [CrossRef]
  5. Palm, F.C.; Nijman, T.E. Linear regression using both temporally aggregated and temporally disaggregated data. J. Econom. 1982, 19, 333–343. [Google Scholar] [CrossRef]
  6. Rawashdeh, A.; Obeidat, M. A Bayesian Approach to Estimate a Linear Regression Model with Aggregate Data. Austrian J. Stat. 2019, 48, 90–100. [Google Scholar] [CrossRef]
  7. Agresti, A. Categorical Data Analysis; Wiley Series in Probability and Statistics; Wiley: Hoboken, NJ, USA, 2013. [Google Scholar]
  8. Givens, G.; Hoeting, J. Computational Statistics; Wiley Series in Probability and Statistics; Wiley: Hoboken, NJ, USA, 2012. [Google Scholar]
  9. Wang, Y.H. On the number of successes in independent trials. Stat. Sin. 1993, 3, 295–312. [Google Scholar]
  10. Hong, Y. On computing the distribution function for the Poisson binomial distribution. Comput. Stat. Data Anal. 2013, 59, 41–51. [Google Scholar] [CrossRef]
  11. Bilder, C.; Loughin, T. Analysis of Categorical Data with R; Chapman & Hall/CRC Texts in Statistical Science; CRC Press: Boca Raton, FL, USA, 2014. [Google Scholar]
  12. Chen, X.H.; Dempster, A.P.; Liu, J.S. Weighted finite population sampling to maximize entropy. Biometrika 1994, 81, 457–469. [Google Scholar] [CrossRef]
  13. Fernández, M.; Williams, S. Closed-form expression for the poisson-binomial probability density function. IEEE Trans. Aerosp. Electron. Syst. 2010, 46, 803–817. [Google Scholar] [CrossRef]
  14. Nelder, J.A.; Mead, R. A simplex method for function minimization. Comput. J. 1965, 7, 308–313. [Google Scholar] [CrossRef]
  15. Fletcher, R. A new approach to variable metric algorithms. Comput. J. 1970, 13, 317–322. [Google Scholar] [CrossRef]
  16. Flecher, R.; Reeves, C. Function minimization by conjugate gradient. Comput. J. 1964, 7, 149–154. [Google Scholar] [CrossRef]
  17. Shao, J. Mathematical Statistics; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2003. [Google Scholar]
  18. Su, B.; Zhu, F. Temporal aggregation and systematic sampling for INGARCH processes. J. Stat. Plan. Inference 2022, 219, 120–133. [Google Scholar] [CrossRef]
Table 1. Average Squared Bias and Variance of Estimators E1 to E5 in Scenarios 1A to 3B. K is the sample size of the aggregate data. n g is the group size in the aggregation.
Table 1. Average Squared Bias and Variance of Estimators E1 to E5 in Scenarios 1A to 3B. K is the sample size of the aggregate data. n g is the group size in the aggregation.
Average Squared BiasAverage Variance
Scen.K n g E1E2E3E4E5E1E2E3E4E5
1A30070.0010.2810.0010.0010.0010.0270.0250.0770.0770.077
1A300300.0000.3440.0010.0010.0010.0060.0180.0710.0710.071
1A50070.0000.2930.0000.0000.0000.0090.0080.0200.0200.020
1A500300.0000.3580.0000.0000.0000.0020.0050.0170.0170.017
1A100070.0000.2880.0000.0000.0000.0050.0050.0110.0110.011
1A1000300.0000.3510.0000.0000.0000.0010.0030.0120.0120.012
1B30070.0011.1760.0020.0020.0020.0500.0250.1080.1080.108
1B300300.0001.3670.0000.0000.0000.0120.0140.0990.0980.099
1B50070.0001.1930.0000.0000.0000.0170.0060.0320.0320.032
1B500300.0001.3690.0000.0000.0000.0040.0040.0320.0300.033
1B100070.0001.1810.0000.0000.0000.0090.0040.0180.0180.018
1B1000300.0001.3880.0000.0000.0000.0020.0030.0190.0190.019
2A30070.0000.4710.0020.0020.0020.0310.0230.0730.0730.073
2A300300.0000.5230.0040.0040.0040.0070.0160.0710.0710.071
2A50070.0000.4620.0000.0000.0000.0080.0070.0200.0200.020
2A500300.0000.5380.0000.0000.0000.0020.0060.0190.0190.019
2A100070.0000.4640.0000.0000.0000.0050.0040.0120.0120.012
2A1000300.0000.5320.0000.0000.0000.0010.0030.0130.0130.013
2B30070.0000.2910.0000.0000.0000.0250.0180.0590.0590.059
2B300300.0000.3360.0030.0030.0030.0060.0160.0660.0660.066
2B50070.0000.2770.0000.0000.0000.0070.0070.0170.0170.017
2B500300.0000.3400.0000.0000.0000.0020.0050.0170.0170.017
2B100070.0000.2820.0000.0000.0000.0050.0040.0120.0120.012
2B1000300.0000.3400.0000.0000.0000.0010.0030.0120.0120.012
3A30070.0000.3320.0010.0000.0000.0180.0200.0450.0520.055
3A300300.0000.3450.0030.0020.0010.0040.0190.0450.0490.055
3A50070.0000.3360.0000.0000.0000.0060.0060.0140.0150.015
3A500300.0000.3440.0000.0000.0000.0010.0060.0130.0160.017
3A100070.0000.3400.0000.0000.0000.0030.0040.0080.0090.009
3A1000300.0000.3460.0000.0000.0000.0010.0040.0080.0080.010
3B30070.0000.5670.0020.0010.0010.0250.0200.0560.0640.068
3B300300.0000.6030.0050.0040.0030.0060.0140.0630.0690.077
3B50070.0000.5780.0010.0000.0000.0070.0050.0150.0190.018
3B500300.0000.6140.0000.0000.0000.0020.0050.0180.0250.022
3B100070.0000.5870.0000.0000.0000.0050.0030.0100.0100.010
3B1000300.0000.6080.0000.0000.0000.0010.0030.0100.0120.012
Table 2. Average MSE and MAD of Estimators E1 to E5 in Scenarios 1A to 3B. K is the sample size of the aggregate data. n g is the group size in the aggregation.
Table 2. Average MSE and MAD of Estimators E1 to E5 in Scenarios 1A to 3B. K is the sample size of the aggregate data. n g is the group size in the aggregation.
Average MSEAverage MAD
Scen.K n g E1E2E3E4E5E1E2E3E4E5
1A30070.0270.3070.0780.0780.0780.1290.5040.1980.1980.198
1A300300.0060.3620.0720.0720.0720.0620.5580.1920.1920.192
1A50070.0090.3020.0200.0200.0200.0750.5150.1090.1090.109
1A500300.0020.3630.0170.0170.0170.0360.5680.0930.0930.093
1A100070.0050.2930.0110.0110.0110.0570.5090.0800.0800.080
1A1000300.0010.3540.0120.0120.0120.0280.5630.0780.0780.078
1B30070.0511.2000.1090.1090.1090.1730.9700.2350.2350.235
1B300300.0121.3800.0990.0980.0990.0841.0460.2220.2210.222
1B50070.0171.2000.0320.0320.0320.0980.9770.1300.1300.130
1B500300.0041.3730.0330.0310.0330.0481.0480.1290.1250.129
1B100070.0091.1850.0180.0180.0180.0720.9730.1000.1000.100
1B1000300.0021.3900.0190.0190.0190.0381.0540.0980.0980.098
2A30070.0310.4940.0750.0750.0750.1380.6270.2040.2040.204
2A300300.0070.5390.0750.0750.0750.0650.6610.2000.2000.200
2A50070.0080.4690.0210.0210.0210.0700.6220.1110.1110.111
2A500300.0020.5430.0200.0200.0200.0360.6690.1060.1060.106
2A100070.0050.4680.0120.0120.0120.0570.6200.0840.0840.084
2A1000300.0010.5350.0130.0130.0130.0300.6670.0850.0850.085
2B30070.0250.3090.0590.0590.0590.1240.4450.1820.1820.182
2B300300.0060.3520.0680.0680.0680.0600.4640.1800.1800.180
2B50070.0070.2840.0170.0170.0170.0650.4240.0990.0990.099
2B500300.0020.3440.0180.0180.0180.0340.4630.0930.0930.093
2B100070.0050.2860.0120.0120.0120.0540.4250.0810.0810.081
2B1000300.0010.3430.0120.0120.0120.0240.4610.0750.0750.075
3A30070.0180.3520.0460.0520.0550.1040.4860.1620.1680.170
3A300300.0040.3640.0470.0510.0560.0490.4950.1610.1650.170
3A50070.0060.3420.0140.0150.0150.0580.4740.0900.0910.091
3A500300.0010.3500.0140.0160.0170.0280.4810.0880.0900.091
3A100070.0030.3440.0080.0090.0090.0430.4750.0660.0670.067
3A1000300.0010.3500.0080.0080.0090.0220.4800.0690.0690.070
3B30070.0250.5870.0580.0650.0690.1190.6450.1780.1840.188
3B300300.0060.6170.0680.0730.0790.0570.6560.1800.1840.190
3B50070.0070.5840.0150.0190.0180.0660.6440.0920.0950.095
3B500300.0020.6190.0190.0250.0220.0330.6590.0960.1020.099
3B100070.0050.5900.0100.0100.0100.0550.6470.0750.0750.075
3B1000300.0010.6110.0110.0120.0120.0260.6550.0720.0740.074
Table 3. Biases and Variances of Estimators E2 to E5 based on Aggregate-Level Y and Individual-Level X. n g is the group size in the aggregation.
Table 3. Biases and Variances of Estimators E2 to E5 based on Aggregate-Level Y and Individual-Level X. n g is the group size in the aggregation.
BiasVariance
Coef. n g E2E3E4E5E2E3E4E5
β 0 31.580−0.0180.620−0.0170.0940.1600.1250.160
β 0 51.721−0.0540.877−0.0540.1150.3830.2180.383
β 0 71.769−0.1561.019−0.1560.1940.7210.3190.721
β 1 3−0.1630.001−0.0730.0010.0020.0030.0020.003
β 1 5−0.1760.005−0.1080.0050.0020.0060.0040.006
β 1 7−0.1800.016−0.1270.0160.0040.0120.0060.012
β 2 3−1.0070.039−0.1950.0390.0250.0620.0260.062
β 2 5−1.1230.075−0.2580.0750.0430.1740.0530.174
β 2 7−1.1410.150−0.2660.1500.0530.2600.0870.260
Table 4. MSE and MAD of Estimators E2 to E5 based on Aggregate-Level Y and Individual-Level X. n g is the group size in the aggregation.
Table 4. MSE and MAD of Estimators E2 to E5 based on Aggregate-Level Y and Individual-Level X. n g is the group size in the aggregation.
MSEMAD
Coef. n g E2E3E4E5E2E3E4E5
β 0 32.5910.1600.5090.1601.5800.3170.6440.317
β 0 53.0760.3850.9860.3851.7210.4800.9090.480
β 0 73.3220.7431.3560.7421.7690.6511.0360.650
β 1 30.0280.0030.0080.0030.1630.0410.0770.041
β 1 50.0330.0060.0160.0060.1760.0600.1120.060
β 1 70.0360.0120.0230.0120.1810.0850.1300.085
β 2 31.0390.0630.0640.0631.0070.1860.2220.186
β 2 51.3040.1790.1200.1791.1230.3250.2970.325
β 2 71.3560.2820.1570.2821.1410.4090.3310.409
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Xu, Z. Logistic Regression Based on Individual-Level Predictors and Aggregate-Level Responses. Mathematics 2023, 11, 746. https://doi.org/10.3390/math11030746

AMA Style

Xu Z. Logistic Regression Based on Individual-Level Predictors and Aggregate-Level Responses. Mathematics. 2023; 11(3):746. https://doi.org/10.3390/math11030746

Chicago/Turabian Style

Xu, Zheng. 2023. "Logistic Regression Based on Individual-Level Predictors and Aggregate-Level Responses" Mathematics 11, no. 3: 746. https://doi.org/10.3390/math11030746

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop