Modeling Length of Hospital Stay for Patients With COVID-19 in West Sumatra Using Quantile Regression CAUCHY – Jurnal Matematika Murni dan Aplikasi Volume 7(1) (2021), Pages 118-128 p-ISSN: 2086-0382; e-ISSN: 2477-3344 Submitted: July 25, 2021 Reviewed: November 05, 2021 Accepted: November 08, 2021 DOI: https://doi.org/10.18860/ca.v7i1.12995 Modeling Length of Hospital Stay for Patients With COVID-19 in West Sumatra Using Quantile Regression Ferra Yanuar1, Athifa Salsabila Deva2, Maiyastri3, Hazmira Yozza4, Aidinil Zetra5 1,2,3,4Mathematics Department, Faculty of Mathematics and Natural Sciences, Universitas Andalas, Padang 5Political Sciences Department, Faculty of Social and Political Sciences, Universitas Andalas, Padang Email: ferrayanuar@sci.unand.ac.id, athifasalsabila4300@gmail.com, maiyastri@sci.unand.ac.id, hazmirayozza@sci.unand.ac.id, aidinil@soc.unand.ac.id ABSTRACT This study aims to construct the model for the length of hospital stay for patients with COVID-19 using quantile regression and Bayesian quantile approaches. The quantile regression models the relationship at any point of the conditional distribution of the dependent variable on several independent variables. The Bayesian quantile regression combines the concept of quantile analysis into the Bayesian approach. In the Bayesian approach, the Asymmetric Laplace Distribution (ALD) distribution is used to form the likelihood function as the basis for formulating the posterior distribution. All 688 patients with COVID-19 treated in M. Djamil Hospital and Universitas Andalas Hospital in Padang City between March-July 2020 were used in this study. This study found that the Bayesian quantile regression method results in a smaller 95% confidence interval and higher value than the quantile regression method. It is concluded that the Bayesian quantile regression method tends to yield a better model than the quantile method. Based on the Bayesian quantile regression method, it was found that the length of hospital stay for patients with COVID-19 in West Sumatra was significantly influenced by Age, Diagnoses, and Discharge status. Keywords: Length of hospital stay; Bayesian quantile regression; Asymmetric Laplace Distribution (ALD) INTRODUCTION The problem of COVID-19 has become the concern of the world community from every group. In cases of being infected with COVID-19 in West Sumatra Province, not a few people have been declared cured, died, or are undergoing treatment at the hospital. People with criteria for severe symptoms of COVID-19 must undergo treatment in a hospital [1]. Certain factors influence the length of stay of COVID-19 patients. An estimation of the regression model parameters is carried out using quantile regression and Bayesian quantile regression methods to identify the factors that influence the length of stay of COVID-19 patients. The estimated length of stay for COVID-19 patients who are hospitalized can be used for specific purposes such as in health service activities. the need for health facilities at each level of health care. and the preparation of decisions related to mitigation scenarios and preparedness for COVID-19 [2]–[4]. https://doi.org/10.18860/ca.v7i1.12995 mailto:ferrayanuar@sci.unand.ac.id mailto:athifasalsabila4300@gmail.com mailto:maiyastri@sci.unand.ac.id mailto:hazmirayozza@sci.unand.ac.id mailto:aidinil@soc.unand.ac.id Modeling Length of Hospital Stay for Patients With COVID-19 in West Sumatra Using Quantile Regression Ferra Yanuar 119 If linear model assumptions are fulfilled, such as no multicollinearity, homoscedasticity, and no autocorrelation, the Ordinary Least Squares (OLS) method is used to estimate the model parameters [5]. In the preliminary analysis, data on the length of stay of COVID-19 patients in West Sumatra Province were not normally distributed. Therefore, the use of OLS was not efficient in estimating model parameters. For this reason, an analysis of the estimated parameters was carried out using quantile regression and Bayesian quantile regression. Quantile regression analysis was chosen because in estimating the parameters, it does not require any assumptions, including the assumption of normality, which only requires large data. The merging of quantile analysis into Bayesian concepts is carried out so that the resulting estimator becomes more effective and natural so that it can produce a better predictive model that is closer to the actual value [6], [7]. Research related to Bayesian quantile regression was initiated by Yu and Mooyed [8]. Research on this topic then developed rapidly, including research on numerical simulations in estimating the parameters of the Bayesian quantile regression method using the Gibbs sampling algorithm [9]. The application of the Bayesian quantile regression method is also applied in the use of binary response data based on the Asymmetric Laplace Distribution (ALD) distribution [10]. Subsequent research discussed the analysis of variable selection in quantile regression using the Gibbs sampling concept [7]. Further Bayesian quantile regression analysis was also used to estimate the model by approximating the likelihood function [11], as well as the analysis of posterior inference with the likelihood of the ALD distribution [12]. The application of Bayesian quantile regression was also used in modeling the Jeonse deposit in Korea [13]. Oh et al. do selecting variables using the Bayesian quantile regression method using the Savage– Dickey density ratio [14]. Furthermore, the application of Bayesian quantile regression was also applied in constructing a low birth weight model using the Gibbs Sampling algorithm approach [15]. This study aims to construct a model of length of stay for COVID-19 patients using quantile and Bayesian quantile regression methods to then compare the results between two methods. This case is important to be investigated since the cases of Covid-19 is increasing. As the results, rooms in hospitals become full. For this reason, this research needs to be carried out in an effort to find out what factors affect the length of stay of COVID-19 patients. This research will give information on how to shorten the length of stay of COVID-19 patients. METHODS Material Huskamp et al. and Kaufman et al. have found that mortalities are higher for the old populace than young populace [16], [17]. Yuki et al. recognized that older patients were more powerless to longer the length of hospital stay than younger patients [18]. This information implies that age could influence the length of hospital stay of a patient. Many studies also investigated that the presence of hypertension, diabetes, and coronary artery disease were considered as hazard factors to Covid-19 [19]. Gebhard et al, demonstrated that Covid-19 is deadlier for infected men than women [20]. The hypothesis model is constructed based on literatures to be then fitted to the data. The data used were 688 COVID-19 patients treated at M. Djamil Hospital, Padang City, and Andalas University Hospital in March-July 2020. In this study, the variables used are factors that are assumed to affect the length of stay of COVID-19 patients in West Sumatra Modeling Length of Hospital Stay for Patients With COVID-19 in West Sumatra Using Quantile Regression Ferra Yanuar 120 Province, they are: Age (𝑋1), Gender (𝑋2) with male and female categories, Diagnosis of COVID-19 (𝑋3) by categories are Asymptomatic Person (Asymp), Person Under Supervision (PerUS), Patients Under Supervision (PaUS), and Positive, Discharge status (𝑋4) with the categories are recovered, died, forced discharge, outpatient, referred to another hospital, and the number of Comorbid (𝑋5). Table 1 presents the frequency distribution for data of COVID-19 patients by categorical independent variables, i.e., Gender, Diagnosis, and Discharge status. Table 1 shows that most Diagnose of the respondents are PaUS (Patients Under Supervision) with 87.7% of all respondents and 73.3% respondents were Recovered. Table 1. Frequency Distribution of COVID-19 Patients for Categorical Independent Variables Variable Category Frequency Percentage Gender (𝑋1) Male 347 50.4 Female 341 49.6 Diagnose (𝑋3) Asymp 1 0.1 PerUS 6 0.9 PaUS 604 87.8 Positive 77 11.2 Discharge Status (𝑋4) Recovered 504 73.3 Died 141 20.5 Forced discharge 30 4.4 Outpatient 4 0.6 Referred to another hospital 9 1.3 In Figure 1 below, part (a) shows that the length of stay for COVID-19 patients has a histogram that is skewed to the left, while part (b) shows that some data are not located around a linear line. Based on both figures, these are informed that the data on the length of stay of COVID-19 patients is not normally distributed. (a) (b) Figure 1. Data of Length of Hospital Stay: (a) Histogram and (b) QQ-Plot Quantile Regression Method Assummed that π’š = (𝑦1, 𝑦2, β‹― , 𝑦𝑛) β€² is response variable vector and 𝒙 = (π‘₯1, π‘₯2, β‹― , π‘₯π‘˜ ) β€² is a covariate vector. In general, a linear regression equation model for the 𝜏-th quantile. Modeling Length of Hospital Stay for Patients With COVID-19 in West Sumatra Using Quantile Regression Ferra Yanuar 121 where 0 < 𝜏 < 1 with 𝑛 sample and π‘˜ predictor for 𝑖 = 1,2, … , 𝑛 written in the form: 𝑦𝑖 = 𝛽0𝜏 + 𝛽1𝜏 π‘₯𝑖1 + 𝛽2𝜏 π‘₯𝑖2 + β‹― + π›½π‘˜πœπ‘₯π‘–π‘˜ + πœ€π‘– , (1) where 𝜷(𝜏) is parameter’s vector and 𝜺 is the leftover vector. The 𝜏-th conditional quantile function in the quantile regression method is defined as 𝑄𝑦𝑖 (𝜏|π‘₯𝑖 ) = π‘₯ β€² 𝑖 𝜷(𝜏) then the estimated value of the parameter is οΏ½Μ‚οΏ½(𝜏) obtained by minimizing [21]: βˆ‘ 𝜌𝜏 (𝑦𝑖 βˆ’ π‘₯𝑖 β€²πœ·)𝑛𝑖=1 , (2) where 𝜌𝜏 (𝑒) = 𝑒(𝜏 βˆ’ 𝐼(𝑒 < 0)) is a loss function which is equivalent to : 𝜌𝜏 (πœ€) = πœ€(𝜏𝐼(πœ€ > 0) βˆ’ (1 βˆ’ 𝜏)𝐼(πœ€ < 0)), (3) 𝐼(. ) is an indicator function. with value 1 if 𝐼(. ) is true and zero rest. Minimization of Equation (2) was done by using the simplex method in linear programming. However, using the simplex method in estimating parameters is complicated to do. Therefore, an approach with the Bayes method is carried out so that the parameter estimation process becomes a little easier. Bayesian Quantile Regression Method Yu and Mooyed [8] found that minimizing the loss function of the quantile regression is equivalent to maximizing the likelihood function formed from the data assumed to be distributed in the Asymmetric Laplace Distribution (ALD). The ALD is used in the likelihood distribution to make Bayesian estimators more effective and natural. This estimation resulted in the ALD distribution is a possible parametric relationship between the minimization problem of Equation (2) and the maximum likelihood theory [7]. In addition, the quantile regression loss function is identical to the likelihood function of ALD [22]. The ALD distribution is one of the continuous probability distributions. A random variable πœ€ has an ALD distribution with probability density function 𝑓(πœ€) [7], [8]: π‘“πœ (πœ€) = 𝜏(1 βˆ’ 𝜏)𝑒π‘₯𝑝(βˆ’πœŒπœ (πœ€)). (4) where 0 < 𝜏 < 1 and 𝜌𝜏 (πœ€) where defined in Equation (3). The estimation of model parameters using the Bayesian quantile regression method can be done for any data distribution by assuming the following [8]: 1. 𝑓(𝑦 ; πœ‡π‘– ) has ALD distribution. 2. 𝑔(πœ‡π‘– ) = π‘₯𝑖 β€²πœ·(𝜏). The observation was given by π’š = (𝑦1, 𝑦2, β‹― , 𝑦𝑛 ). Based on Equation (4), to combine the quantile regression method into the Bayesian method to estimate the parameter, 𝜷. ALD was used to form the likelihood function. The ALD has a combined representation of several distributions based on the exponential distribution and normal distribution [9]. A random variable πœ€ can be expressed in: πœ€ = πœƒπ‘§ + π‘π‘’βˆšπ‘§, (5) where πœƒ = 1βˆ’2Ο„ (1βˆ’Ο„)Ο„ and 𝑝2 = 2 (1βˆ’Ο„)Ο„ . The 𝜏-th quantile regression model can be written as: 𝑦𝑖 = π‘₯𝑖 β€²πœ·πœ + πœŽπœƒπ‘§π‘– + πœŽπ‘π‘’π‘– βˆšπ‘§π‘– , (6) where 𝑧𝑖 ~𝑒π‘₯𝑝(1) and 𝑒𝑖 ~𝑁(0,1), 𝑣𝑖 = πœŽπ‘§π‘– , 𝒗 = (𝑣1, 𝑣2, β‹― , 𝑣𝑛 ) β€². Because of 𝑧𝑖 ~𝑒π‘₯𝑝(1) then 𝑣𝑖 ~𝑒π‘₯𝑝(𝜎), and 𝑖 = 1,2, β‹― , 𝑛. So, we get the probability density function of 𝑦𝑖 : 𝑓(𝑦𝑖 ; 𝜷𝜏 , 𝑣𝑖 , 𝜎) = 1 π‘βˆšπœŽπ‘£π‘–βˆš2πœ‹ 𝑒π‘₯𝑝 (βˆ’ (π‘¦π‘–βˆ’(π‘₯𝑖 β€²πœ·πœ+πœƒπ‘£π‘–)) 2 2𝑝2πœŽπ‘£π‘– ) , (7) and the likelihood function is obtained as follows: Modeling Length of Hospital Stay for Patients With COVID-19 in West Sumatra Using Quantile Regression Ferra Yanuar 122 𝐿(𝜷𝜏 , 𝒗, 𝜎) ∝ (∏ (πœŽπ‘£π‘– ) βˆ’ 1 2 𝑛 𝑖=1 ) (𝑒π‘₯𝑝 (βˆ’ βˆ‘ (π‘¦π‘–βˆ’(π‘₯𝑖 β€²πœ·πœ+πœƒπ‘£π‘–)) 2 2𝑝2πœŽπ‘£π‘– 𝑛 𝑖=1 )). (8) Then, the prior distribution is selected for the parameter 𝜷𝜏 ~𝑁(𝑏0, 𝑩0). 𝑣𝑖 ~𝑒π‘₯𝑝(𝜎), and 𝜎~𝐼𝐺(π‘Ž, 𝑏). The posterior distribution is obtained, i.e: (𝜷𝜏|𝒗, 𝜎, π’š)~𝑁 [(𝑩0 βˆ’1 + π‘₯𝑖 (𝑝 2πœŽπ’—)βˆ’πŸπ‘₯𝑖 β€²) βˆ’1 (𝑩0 βˆ’1π‘πŸŽ + π‘₯𝑖 (𝑝 2πœŽπ’—)βˆ’πŸπ’š βˆ’ π‘₯𝑖 (𝑝 2πœŽπ’—)βˆ’πŸπœƒπ’—), (𝑩0 βˆ’1 + π‘₯𝑖 (𝑝 2πœŽπ’—)βˆ’πŸπ‘₯𝑖 β€²) βˆ’1 ] ; (π‘£π’Š|𝜷𝜏 , 𝜎, π’š)~𝐺𝐼𝐺 ( 1 2 , ( (π‘¦π‘–βˆ’π‘₯𝑖 β€²πœ·πœ) 2 𝑝2𝜎 ) , ( 2 𝜎 + πœƒπŸ 𝑝2𝜎 )) ; (𝜎|𝜷𝜏, 𝒗, π’š)~𝐼𝐺 ((π‘Ž + 3𝑛 2 ) , (𝑏 + βˆ‘ 𝑣𝑖 𝑛 𝑖=1 + βˆ‘ (𝑦𝑖 βˆ’ (π‘₯𝑖 β€²πœ·πœ + πœƒπ‘£π‘– )) 2 2𝑝2𝑣𝑖 𝑛 𝑖=1 )). These posterior distribution then are used to estimate mean posterior and variance posterior as point estimate for unknown parameter using Gibbs sampling iteration method [23], [24]. The goodness of fit for both methods is measured using π‘ƒπ‘ π‘’π‘’π‘‘π‘œ 𝑅2 [25]. The formula for π‘ƒπ‘ π‘’π‘’π‘‘π‘œ 𝑅2 is as follows: π‘ƒπ‘ π‘’π‘’π‘‘π‘œ 𝑅2 = 1 βˆ’ π‘…π΄π‘†π‘Šπœ π‘‡π΄π‘†π‘Šπœ , (9) where π‘…π΄π‘†π‘Šπœ is the residual absolute sum of weighted differences between the observed dependent variable and the estimated quantile of conditional distribution in the more complex model. While, π‘‡π΄π‘†π‘Šπœ is the total absolute sum of weighted differences between the observed dependent variable and the estimated quantile of conditional distribution in the simplest model. The range values for π‘ƒπ‘ π‘’π‘’π‘‘π‘œ 𝑅2 are between zero and one. The value of π‘ƒπ‘ π‘’π‘’π‘‘π‘œ 𝑅2 indicates the goodness of fit of the proposed model in explaining the variance of the response variable. The higher the value of π‘ƒπ‘ π‘’π‘’π‘‘π‘œ 𝑅2 the better the proposed model obtained. RESULTS AND DISCUSSION Data analysis begins with fitting the data to the hypothesis model using the OLS method to select the significant variables involved for modeling in the quantile and Bayesian analysis. Based on OLS analysis, the variables of Age, Diagnosis, and Discharge status contributed significantly. Furthermore, a model of the length of stay for COVID-19 patients is constructed using the quantile regression method and the Bayesian quantile regression method. The analysis results are then compared between both methods by looking at the width of the 95% confidence interval and π‘ƒπ‘ π‘’π‘’π‘‘π‘œ 𝑅2 of the selected quantile. The quantile used are 0.10; 0.25; 0.50; 0.75; dan 0.90. R software was used to analyze the data. The results of the analysis from both methods are provided in Table 3. Modeling Length of Hospital Stay for Patients With COVID-19 in West Sumatra Using Quantile Regression Ferra Yanuar 123 Table 3. Comparison between Quantile and Bayesian Quantile Method Indicator Variables Quantile Method Bayesian Quantile Method Estimate 95% CI Estimate 95% CI 𝜏 = 0.10 Intersep 2.0000 NA -1.5006 14.6799 Age (𝑋1) 0.0000 0.0000 0.0002 0.0041 Diagnose (𝑋3) PerUS (𝑋3𝐷1) -2.0000 NA 1.3864 15.3326 PaUS (𝑋3𝐷2) -1.0000 NA 2.4139 14.6589 Positive (𝑋3𝐷3) 0.0000 NA 3.1337 14.8359 Discharge Status (𝑋4) Recovered (𝑋4𝐷1) 2.0000* 0.0000 2.0446* 0.6021 Died (𝑋4𝐷2) 0.0000 0.0000 0.0275 0.6264 Outpatient (𝑋4𝐷3) 0.0000 NA -0.2693 5.0697 Referred to another hospital (𝑋4𝐷4) 0.0000 NA -0.1649 2.0374 𝜏 = 0.25 Intersep 1.0000 NA -1.0118 14.2889 Age (𝑋1) 0.0000 0.0000 0.0014 0.0094 Diagnose (𝑋3) PerUS (𝑋3𝐷1) -1.0000 NA 1.2671 14.8492 PaUS (𝑋3𝐷2) 0.0000 NA 2.1446 14.2644 Positive (𝑋3𝐷3) 3.0000 NA 5.1174* 14.4329 Discharge Status (𝑋4) Recovered (𝑋4𝐷1) 3.0000* 1.2544 2.6699* 1.2514 Died (𝑋4𝐷2) 0.0000 0.9709 -0.2344 1.1873 Outpatient (𝑋4𝐷3) 0.0000 NA 1.5336 6.3011 Referred to another hospital (𝑋4𝐷4) 0.0000 1.1155 0.1684 2.9599 𝜏 = 0.50 Intersep 1.0000 NA 1.4877 15.5613 Age (𝑋1) 0.0000 0.0000 0.0002 0.0010 Diagnose (𝑋3) PerUS (𝑋3𝐷1) 1.0000 NA 0.9143 16.1529 PaUS (𝑋3𝐷2) 1.0000 NA 0.9518 15.4168 Positive (𝑋3𝐷3) 7.0000 NA 6.8087 15.6258 Discharge Status (𝑋4) Recovered (𝑋4𝐷1) 3.0000* 1.3265 2.4889* 2.1480 Died (𝑋4𝐷2) -1.0000* 2.1006 -1.3962* 2.1555 Outpatient (𝑋4𝐷3) 3.0000 6.1705 2.4900 7.1299 Referred to another hospital (𝑋4𝐷4) 0.0000 2.9157 0.0397 4.2175 𝜏 = 0.75 Intersep 2.0000 NA 5.7668 22.7172 Age (𝑋1) -1.05π‘₯10 βˆ’7 0.0210 -0.0071* 0.0229 Diagnose (𝑋3) PerUS (𝑋3𝐷1) 5.0000 NA 0.1273 24.1500 PaUS (𝑋3𝐷2) 2.0000 NA -1.4964 22.7243 Positive (𝑋3𝐷3) 12.0000 NA 9.2450 23.1280 Modeling Length of Hospital Stay for Patients With COVID-19 in West Sumatra Using Quantile Regression Ferra Yanuar 124 Indicator Variables Quantile Method Bayesian Quantile Method Estimate 95% CI Estimate 95% CI Discharge Status (𝑋4) Recovered (𝑋4𝐷1) 2.0000* 2.0233 2.2849* 2.2233 Died (𝑋4𝐷2) -2.0000* 1.5733 -1.8134* 2.3198 Outpatient (𝑋4𝐷3) 2.0000 NA 2.8668 8.5570 Referred to another hospital (𝑋4𝐷4) 0.0000 9.5010 0.5922 5.9888 𝜏 = 0.90 Intersep -0.6596 NA 8.3752 36.4268 Age (𝑋1) -0.0213 0.0539 -0.0181 * 0.0339 Diagnose (𝑋3) PerUS (𝑋3𝐷1) 8.7021 NA 0.2688 38.0224 PaUS (𝑋3𝐷2) 5.6596 NA -2.9586 36.2285 Positive (𝑋3𝐷3) 27.5957 NA 18.1682 37.1268 Discharge Status (𝑋4) Recovered (𝑋4𝐷1) 5.9362* 2.7045 5.2751 * 2.7938 Died (𝑋4𝐷2) -0.5957* 2.7368 -1.1434 * 2.8253 Outpatient (𝑋4𝐷3) 2.1702 NA 3.5015 10.9954 Referred to another hospital (𝑋4𝐷4) 0.7660 NA 1.2313 6.3550 * Significant at 𝛼 = 0.05, NA = not available. In Table 3, it can be seen that for the quantile regression method, the 𝑋4𝐷1 variable (Recovered) contributed significantly in each quantile, and the category Died is significant in the quantile 0.50; 0.75; and 0.90. Meanwhile, none were statistically significant for other categories in other quantiles in influencing the length of stay of COVID-19 patients. Meanwhile, by using the Bayesian quantile regression method, the Age contributed significantly at the quantile 0.75, and 0.90 in giving affects to the length of stay of COVID- 19 patients. While, diagnose variable (only Positive category) contributed significantly to the length of stay of COVID-19 patients in quantile 0.25, Discharge Status (only Recovered category) contributed significantly in all quantiles, Discharge Status (only Died category) is significant in quantile 0.50; 0.75; and 0.90 to affect the length of stay of COVID-19 patients. From the results of this estimation analysis, it is found that the Bayesian quantile regression method as a whole has more significant parameter and smaller 95% confidence interval than the quantile regression method. In order to determine the best method including the best model, it could be based on the higher value of π‘ƒπ‘ π‘’π‘’π‘‘π‘œ 𝑅2. The π‘ƒπ‘ π‘’π‘’π‘‘π‘œ 𝑅2 values for both methods for all selected quantiles are provided in Table 4. Table 4. The Pseudo R2 Values at All Selected Quantiles. Quantile 𝝉𝒕𝒉 𝑷𝒔𝒆𝒖𝒅𝒐 π‘ΉπŸ Quantile Bayesian Quantile 0.10 0.27030 0.27235 0.25 0.57550 0.57843 0.50 0.87950 0.88262 0.75 0.93925 0.94244 0.90 0.67508 0.67787 Modeling Length of Hospital Stay for Patients With COVID-19 in West Sumatra Using Quantile Regression Ferra Yanuar 125 In Table 4 above, it can be seen that for the quantile regression method, the model at quantile 0.75 is the best model because it has the highest value of π‘ƒπ‘ π‘’π‘’π‘‘π‘œ 𝑅2, that is 0.93925. This value informs that the proposed model can explain the variance of length of hospital stay for patients with COVID-19 is 93.925%. This means that the proposed model at quantile 0.75 is acceptable and could be accepted. Meanwhile for the Bayesian quantile regression method, the quantile 0.75 is also as the best model because it has the highest value of π‘ƒπ‘ π‘’π‘’π‘‘π‘œ 𝑅2, that is 0.94244. This informs us that the model can explain the variance of the length of stay for COVID-19 patients by 94.244%. Since the π‘ƒπ‘ π‘’π‘’π‘‘π‘œ 𝑅2 value obtained from Bayesian quantile regression model is higher than quantile method at corresponding quantiles, we could conclude here that Bayesian quantile method tends to result better model than quantile method. Therefore, the best model for the length of stay of COVID-19 patients in West Sumatra is model at quantile 0.75 based on Bayesian quantile regression method. This proposed model is formulated as follows: οΏ½Μ‚οΏ½ = 5.7668 βˆ’ 0.0071𝑋1 + 0.1273𝑋3𝐷1 βˆ’ 1.4964𝑋3𝐷2 + 9.2450𝑋3𝐷3 + 2.2849𝑋4𝐷1 βˆ’ 1.8134𝑋4𝐷2 + 2.8668𝑋4𝐷3 + 0.5922𝑋4𝐷4. There were 75% of the length of stay for COVID-19 patients diagnosed with PerUS (Person Under Supervision) is 0.1273 days longer than patients diagnosed with Asymp (Asymptotic Persons) assuming others constants. Around 75% of the length of stay for COVID-19 patients diagnosed with PaUS (Patients Under Supervision) is 1.4964 days longer than patients diagnosed with Asymp (Asymptotic Persons) assuming others constants. Approximately, 75% of the length of stay of COVID-19 patients diagnosed with Positive was 9.2450 days longer than patients diagnosed with Asymp (Asymptotic Persons) assuming other variables constant. The similar interpretation could be stated for other variables. Furthermore, the convergence test of the proposed parameter model obtained was carried out. Because of limited space, the selected results of these test are provided in Figure 2 below. (a) (b) (c) Figure 2. Convergency test for Category Recovered at quantile 0.75 (a) Trace-Plot, (b) Density- Plot, dan (c) ACF Plot In Figure 2 (a), it can be seen that the resulting trace-plot forms a pattern that converges to a value so that it can be stated that the model parameters have converged. Modeling Length of Hospital Stay for Patients With COVID-19 in West Sumatra Using Quantile Regression Ferra Yanuar 126 While in part (b), it can be seen that the resulting density plot resembles a normal distribution curve. It can be stated that the model parameters are normally distributed. Then in part (c), the resulting ACF plot shows a smaller autocorrelation value so that it can be stated that there is no autocorrelation between samples. Based on these convergency test, it can be concluded that the model parameters have converged and proposed model could be accepted. CONCLUSIONS This study found that the length of stay of COVID-19 patients in West Sumatra was influenced by Age, Diagnoses of COVID-19 patients, and Discharge status. From the analysis carried out, the Bayesian quantile regression method is better in modeling the length of stay of COVID-19 patients than quantile method. The 95% confidence interval based on Bayesian quantile regression is smaller, and the π‘ƒπ‘ π‘’π‘’π‘‘π‘œ 𝑅2 value is greater than the quantile regression method. ACKNOWLEDGMENTS This research was funded by Directorate of Resources Directorate General of Higher Education, Ministry of Education, Culture, and Research and Technology of Indonesia, in accordance with Contract Number 104/E4.1/AK.04.PT/2021. REFERENCES [1] Kemenkes RI, β€œKMK No. HK.01.07-MENKES-413-2020 ttg Pedoman Pencegahan dan Pengendalian COVID-19.pdf.” 2020. [Online]. Available: https://covid19.go.id/p/regulasi/keputusan-menteri-kesehatan-republik- indonesia-nomor-hk0107menkes4132020 [2] N. Lapidus, X. Zhou, F. Carrat, B. Riou, Y. Zhao, and G. Hejblum, β€œBiased and unbiased estimation of the average length of stay in intensive care units in the Covid-19 pandemic,” Ann. Intensive Care, vol. 10, no. 135, pp. 1–9, Dec. 2020, doi: 10.1186/s13613-020-00749-6. [3] E. M. Rees et al., β€œCOVID-19 length of hospital stay: a systematic review and data synthesis,” BMC Med, vol. 18, no. 270, pp. 1–22, Dec. 2020, doi: 10.1186/s12916- 020-01726-3. [4] S. Wu et al., β€œUnderstanding factors influencing the length of hospital stay among non-severe COVID-19 patients: A retrospective cohort study in a Fangcang shelter hospital,” PLoS ONE, vol. 15, no. 10, p. e0240959, Oct. 2020, doi: 10.1371/journal.pone.0240959. [5] N. Desviona and F. Yanuar, β€œSimulation Study of Autocorrelated Error Using Bayesian Quantile Regression,” sci. technol. indones., vol. 5, no. 3, pp. 70–74, Jul. 2020, doi: 10.26554/sti.2020.5.3.70-74. [6] R. Alhamzawi, K. Yu, and D. F. Benoit, β€œBayesian adaptive Lasso quantile regression,” Statistical Modelling, vol. 12, no. 3, pp. 279–297, Jun. 2012, doi: 10.1177/1471082X1101200304. Modeling Length of Hospital Stay for Patients With COVID-19 in West Sumatra Using Quantile Regression Ferra Yanuar 127 [7] R. Alhamzawi and K. Yu, β€œVariable selection in quantile regression via Gibbs sampling,” Journal of Applied Statistics, vol. 39, no. 4, pp. 799–813, Apr. 2012, doi: 10.1080/02664763.2011.620082. [8] K. Yu and R. A. Moyeed, β€œBayesian quantile regression,” Statistics & Probability Letters, vol. 54, pp. 437–447, 2001. [9] H. Kozumi and G. Kobayashi, β€œGibbs sampling methods for Bayesian quantile regression,” Journal of Statistical Computation and Simulation, vol. 81, no. 11, pp. 1565–1578, Nov. 2011, doi: 10.1080/00949655.2010.496117. [10] D. F. Benoit and D. Van den Poel, β€œBinary quantile regression: a Bayesian approach based on the asymmetric Laplace distribution,” J. Appl. Econ., vol. 27, no. 7, pp. 1174–1188, Nov. 2012, doi: 10.1002/jae.1216. [11] Y. Feng, Y. Chen, and X. He, β€œBayesian quantile regression with approximate likelihood,” Bernoulli, vol. 21, no. 2, pp. 832–850, May 2015, doi: 10.3150/13- BEJ589. [12] Y. Yang, H. J. Wang, and X. He, β€œPosterior Inference in Bayesian Quantile Regression with Asymmetric Laplace Likelihood: Bayesian Quantile Regression,” International Statistical Review, vol. 84, no. 3, pp. 327–344, Dec. 2016, doi: 10.1111/insr.12114. [13] E. J. Nam, E. K. Lee, and M.-S. Oh, β€œBayesian quantile regression analysis of Korean Jeonse deposit,” CSAM, vol. 25, no. 5, pp. 489–499, 2018, doi: 10.29220/CSAM.2018.25.5.489. [14] M.-S. Oh, J. Choi, and E. S. Park, β€œBayesian variable selection in quantile regression using the Savage–Dickey density ratio,” Journal of the Korean Statistical Society, vol. 45, no. 3, pp. 466–476, 2016, doi: 10.1016/j.jkss.2016.01.006. [15] F. Yanuar, A. Zetra, C. Muharisa, D. Devianto, A. R. Putri, and Y. Asdi, β€œBayesian Quantile Regression Method to Construct the Low Birth Weight Model,” J. Phys.: Conf. Ser., vol. 1245, p. 012044, Aug. 2019, doi: 10.1088/1742- 6596/1245/1/012044. [16] H. A. Huskamp, D. G. Stevenson, D. C. Grabowski, E. Brennan, and N. L. Keating, β€œLong and Short Hospice Stays among Nursing Home Residents at the End of Life,” Journal of Palliative Medicine, vol. 13, no. 8, pp. 957–964, Aug. 2010, doi: 10.1089/jpm.2009.0387. [17] B. G. Kaufman, C. A. Sueta, C. Chen, B. G. Windham, and S. C. Stearns, β€œAre Trends in Hospitalization Prior to Hospice Use Associated With Hospice Episode Characteristics?,” Am J Hosp Palliat Care, vol. 34, no. 9, pp. 860–868, Nov. 2017, doi: 10.1177/1049909116659049. [18] K. Yuki, M. Fujiogi, and S. Koutsogiannaki, β€œCOVID-19 pathophysiology: A review,” Clinical Immunology, vol. 215, no. 108427, pp. 1–7, Jun. 2020, doi: 10.1016/j.clim.2020.108427. [19] Y. Du et al., β€œClinical Features of 85 Fatal Cases of COVID-19 from Wuhan. A Retrospective Observational Study,” Am J Respir Crit Care Med, vol. 201, no. 11, pp. 1372–1379, Jun. 2020, doi: 10.1164/rccm.202003-0543OC. [20] C. Gebhard, V. Regitz-Zagrosek, H. K. Neuhauser, R. Morgan, and S. L. Klein, β€œImpact of sex and gender on COVID-19 outcomes in Europe,” Biol Sex Differ, vol. 11, no. 1, pp. 1–13, Dec. 2020, doi: 10.1186/s13293-020-00304-9. [21] R. Alhamzawi and K. Yu, β€œConjugate priors and variable selection for Bayesian quantile regression,” Computational Statistics & Data Analysis, vol. 64, pp. 209–219, Aug. 2013, doi: 10.1016/j.csda.2012.01.014. Modeling Length of Hospital Stay for Patients With COVID-19 in West Sumatra Using Quantile Regression Ferra Yanuar 128 [22] Y. Yang, H. J. Wang, and X. He, β€œPosterior Inference in Bayesian Quantile Regression with Asymmetric Laplace Likelihood: Bayesian Quantile Regression,” International Statistical Review, vol. 84, no. 3, pp. 327–344, 2015, doi: 10.1111/insr.12114. [23] C. Muharisa, F. Yanuar, and D. Devianto, β€œSimulation Study The Using of Bayesian Quantile Regression in Nonnormal Error,” CAUCHY, vol. 5, no. 3, pp. 121–126, Dec. 2018, doi: 10.18860/ca.v5i3.5633. [24] I. Ntzoufras, Bayesian modeling using WinBUGS. Hoboken, N.J: Wiley, 2009. [25] F. Yanuar, H. Yozza, F. Firdawati, I. Rahmi, and A. Zetra, β€œApplying bootstrap quantile regression for the construction of a low birth weight model,” Makara Journal of Health Research, vol. 23, no. 2, pp. 90–95, Aug. 2019, doi: 10.7454/msk.v23i2.9886.