Identifying Factors Associated with Functional Limitation Among Diabetic Patients in Northwest of Iran: Application of the Generalized Additive Model


avatar leili Faraji Gavgani 1 , avatar Parvin Sarbakhsh ORCID 1 , 2 , * , avatar Mohamad Asghari Jafarabadi 1 , 3 , avatar Seyed Morteza Shamshirgaran 1 , avatar Leila Jahangiry 4

Department of Statistics and Epidemiology, Faculty of Health, Tabriz University of Medical Sciences, Tabriz, Iran
Road Traffic Injury Research Center, Tabriz University of Medical Sciences, Tabriz, Iran
Medical Education Research Center, Tabriz University of Medical Sciences, Tabriz, Iran
Department of Health Education and Health Promotion, School of Public Health, Tabriz University of Medical Sciences, Tabriz, Iran

how to cite: Faraji Gavgani L, Sarbakhsh P, Asghari Jafarabadi M, Shamshirgaran S M, Jahangiry L. Identifying Factors Associated with Functional Limitation Among Diabetic Patients in Northwest of Iran: Application of the Generalized Additive Model. Int J Endocrinol Metab. 2018;16(2):e12757. doi: 10.5812/ijem.12757.



Functional limitation is one of the most important health - related concerns of diabetic patients. This study aimed to identify the factors associated with functional limitation among diabetic patients using generalized additive model (GAM) as a flexible technique to reveal the non - linear and non - monotonic association between the response and a set of independent variables.


The source data belonged to two cross - sectional studies conducted in 2014. A total of 694 people with type 2 diabetes in the age range of 31 - 70 years were selected via convenience sampling from diabetes clinics in Ardabil and Tabriz. The data were collected by interviewers using structured questionnaires and checklists. The functional capacity was measured using the physical functioning subscale of the Medical Outcomes Study Short Form 36 - Item Health Survey (SF36). Participants with a total functional capacity of less than 90 were considered to have “moderate or high level of functional limitation.” To identify the factors associated with functional limitation and reveal the shape of associations, the GAM procedure with “logit” link function was applied to the dataset of 378 diabetic patients without any missing data by smoothening of the effect of underlying factors. The Akaike information criterion (AIC) as the relative quality of the model’s criterion was computed for GAM and compared with AIC of the simple logistic regression.


Sex (P = 0.029), age (P < 0.001), BMI (P = 0.029), and SBP (P = 0.04) were significant in the GAM. Moreover, age with a linear function (df = 0.98), BMI with quadratic function (df = 1.75), and SBP with the degree 1.33 were significantly related to functional capacity. AIC of the GAM was lower than that of the logistic model.


In our sample, GAM could identify some linear and nonlinear associations between underlying factors and functional limitation in diabetic patients. These complex associations could relatively increase the fit quality of the GAM when compared to logistic regression.

1. Background

In past decades, there has been an increasing trend for chronic disorders with a large number of people living with such disease. The presence of chronic illness is related to unhappiness and psychological distress, physical mobility, and functional independent activities that can adversely affect the quality of life (1). A low health - related quality of life in people with chronic and metabolic disorders has been shown in many studies (2, 3). Thus, evaluating and improving the quality of life in patients with chronic illnesses has become a target (4). One of the most frequent chronic diseases leading to reduced quality of life is type 2 diabetes, which is a metabolic disorder and the sixth most common cause of death and the leading cause of coronary artery disease, stroke, diabetic nephropathy, neuropathy, retinopathy, neurological complication, chronic kidney failure, non - traumatic foot amputation, and blindness in the world (5, 6). Type 2 diabetes, due to its chronicity, morbidity, and disability that require lifelong patient care, can affect the quality of life and has many individual, physical, and mental consequences (7).

One of the most important health - related concerns among people with diabetes is functional limitation. The functional limitation is defined as impairment in performing daily activities such as bath, heavier activities like sports that increase mobility, strength, and endurance (8). Several studies have shown the impact of diabetes on inability in a daily performance that enhances the chance of functional limitation (9-11). It is obvious that assessing and identifying factors leading to functional limitation in diabetic patients would be effective in the prevention or inhibition of the progression of this consequence.

There are several statistical models to find factors affecting the outcome. Generalized Linear Models (GLM) such as logistic regression that is routinely used can evaluate the simple, linear form of associations between independent and dependent variables. However, in practice, assessing and considering the complex, non - linear form of relationships between independent variables and outcome can improve the quality of the model and reveal the nature of relationships (12). In this regard, generalized additive model (GAM) is a flexible, effective technique for conducting non - linear regression analysis to reveal the non - linear and non - monotonic association between the response and a set of explanatory variables.

Therefore, due to the importance of identifying factors related to functional limitation and assessing the shape of association between them, the aim of this study was to determine the association between underlying factors and functional limitation using GAM and to compare its fit quality with logistic model as a member of the generalized linear models (GLM) family.

2. Methods

Data of this study were drawn from two separate studies conducted among patients with diabetes in Tabriz and Ardebil. The first study was conducted on a sample of 300 diabetic patients in order to investigate the association between the quality of diabetes care and health - related quality of life and mental distress in 2015. The participants aged 31 to 70 years were recruited through a convenience sampling method from diabetes clinics in Tabriz. The second study was done in 2014 on a sample of 396 diabetic patients from Ardabil diabetes clinics to investigate the association between the quality of diabetes care and health - related quality of life and functional limitation. General information needed for these studies including age, gender, weight, and height was gathered by two trained interviewers using questionnaires. Weight was measured while participants were minimally clothed without shoes and recorded to the nearest 100 g. Height was measured in a standing position without shoes using tape meter while shoulders were in a normal alignment. BMI was considered as weight (kg) divided by square of height (m2).

Clinical features including blood pressure, lipid profile, sugar profile, and disease duration were drawn from clinic’s records using a checklist. In the clinic records of these patients, systolic and diastolic blood pressure had been measured using a standardized mercury sphygmomanometer on the right arm. Fasting blood sugar (FBS) and total CHOL had been measured using the enzymatic colorimetric method.

More explanation of studies has been documented well (13-15). Data from these studies were merged to provide data for the current study.

According to the literature review, clinician opinion and availability of data, the required variables for the purpose of this study were some demographic, clinical, and biochemical variables including age, gender, body mass index (BMI), hemoglobin A1C (HbA1C), systolic blood pressure (SBP), diastolic blood pressure (DBP), cholesterol (Chol), triglycerides (TG), Fasting blood sugar (FBS), high - density lipoprotein (HDL), and duration of diabetes.

Functional limitation status was complete for all patients. The missing rate of CHOL, HDL, and TG was significantly different between study locations because of the lack of laboratory measures in the care records of patients from Ardabil clinics. Other clinical and demographic covariates were missed for some cases completely at random. After screening the information of 694 patients for needed data, casewise deletion of missing data was done and finally, 378 patients with complete data for all needed variables were included in the study.

2.1. Measuring of Functional Capacity

To determine the functional capacity in patients with diabetes, the physical functioning subscale of the Medical Outcomes Study Short Form 36 - Item Health Survey (SF36) was used. SF36 has been translated and validated in Iran and the results of the validation study suggest that it is a valid and reliable questionnaire to assess health - related quality of life among the Iranian population (16). This short form contains ten questions in the field of functional disorder caused by chronic diseases such as diabetes (5). The questionnaire that was completed by trained interviewers at the diabetes clinic included 10 questions about daily physical activities such as bathing, shopping, and doing housework with the answers of three options: 1. I have a lot of trouble, 2. I have a little problem, and 3. I have no problem.

The total score of dysfunction was calculated for each patient based on the sum of the scores of 10 items and scale - up of this summation to 100. The higher scores indicated a better physical functioning. According to the references, scores from this scale were categorized as follows: no limitation (score of 100); minor limitation (score 90 - 99); moderate limitation (60 - 89); and severe limitation (score 0 - 59). For this study, those with a total score of less than 90 were considered to have “moderate to severe functional limitation” and patients with score ≥ 90 were considered as patients without any limitation or just with minor limitation (17-19).

The ethics committee of Tabriz University of Medical Sciences, Vice Chancellor for Research, approved the present study (the Ethics number TBZMED.REC.1395.794). In addition, the ethics approval number for the two mentioned studies was TBZMED.REC.1392.207 and TBZMED.REC.1394.55.

2.2. Statistical Analyses

Data normality was checked using Kolmogorov - Smirnov test and some visual methods such as histogram, Q - Q plot, and skewness and kurtosis indices.

Mean ± SD was used to describe normally distributed data and non-normally distributed variables were transformed to log-scale and described as geometric mean (geometric SD). Means of variables were compared between two groups by using independent t test.

The GAM procedure was applied to the dataset of 378 diabetic patients without any missing data by smoothening the effect of covariates. We also fitted an ordinary logistic regression model (from GLM family) that considers only the linear form of the explanatory variables in the model. As a criterion of the relative quality of statistical models for a given dataset (20), AIC was computed for both the models.

2.3. Generalized Additive Models (GAM)

Generalized linear models (GLM) are an extension of linear models to the exponential family of distribution. In these models, the response variable has an exponential family distribution with a mean (μ), assumed to be affected by independent variables only through the linear combination of them. Generalized additive models (GAM) extend the parametric form of independent variables in the GLM to nonparametric forms where the response variable has a probability density function from the exponential family. GAM uses a link function to establish an association between the mean of the response variable (μ) and a smoothed function of the explanatory variables. Due to the flexibility of GAM compared to the traditional parametric modeling tools, it is used for handling the non-parametric regression.

GAM is defined as:

Equation 1.

Where µ = E (Y | x1…xp) and sj are smoothers defining the additive component. The GAM approach replaces the simple products of parameter values, time, and the values of independent variables with a spline smoother for each variable. The degrees of freedom are specified for the spline smoothers by GAM (12).

There are many smoothers to estimate the unknown functions such as kernel smoothers, regression splines, and cubic smoothing splines. “mgcv” package for GAM uses regression splines as smoother. In this study, GAM with “logit” link function and REML method to find the appropriate degrees of freedom for each covariate was used to identify linear and nonlinear associations between age, sex, BMI, duration of disease, HDL, Chol, TG, FBS, SBP, DBP, and HbA1C as independent variables and functional limitation as dependent variable. Also, we adjusted the effect of the location (Tabriz vs. Ardabil) in our model.

To determine the relative quality of the models, the Akaike information criterion (AIC) was computed for GAM and compared with AIC of its equivalent logistic regression. Statistical analysis was performed by R 3.3.1 software (“mgcv” package) and P < 0.05 were considered to indicate statistical significance.

3. Results

Of the 378 diabetic patients, 255 (67.46%) had a moderate or severer functional limitation. This outcome was more prevalent in females than in males so that, from 255 females, 72.3% had functional limitation while this proportion was 58.1% in males (P = 0.005). The basic clinical characteristics of diabetic patients according to functional limitation status are presented in Table 1. In our data, FBS, HDL, and TG had a non-normal distribution. Thus, we used log transformation, compared them in log - scale, and reported geometrical means (geometric SD) for them. In addition, because of different behavior of HDL in males and females, we reported it separately for male and female participants. Age, BMI, and duration of diabetes were significantly higher in patients with functional limitation.

Table 1. Demographic and Quality of Care Indices According to Different Subgroups of Functional Limitation
VariablesWithout Functional Limitation (N = 123)With Functional Limitation (N = 255)P Value
Agea (year)51.02 ± 8.6758.65 ± 7.72< 0.001
BMIa (kg/m2)27.76 ± 3.8629.74 ± 4.87< 0.001
Hemoglobin A1Ca (%)7.85 ± 1.858.03 ± 1.940.390
FBSb(mg/dL)152.14(1.45)153.56 (1.47)0.827
SBPa (mmHg)127.19 ± 17.01125.52 ± 17.380.380
DBPa (mmHg)75.16 ± 10.5975.13 ± 9.530.981
Chola (mmol/L)174.55 ± 40.87174.38 ± 43.860.971
HDLb (mmol/L)
Female47.08 (1.31)49.37 (1.26)0.175
Male42.10 (1.28)43.11 (1.32)0.620
TGb (mmol/L)145.79 (1.56)155.62 (1.61)0.205
Duration of diabetesa (year)7.80 ± 5.609.45 ± 6.280.014

Associations between functional limitation and explanatory variables resulted from ordinary logistic regression with the linear from of variables, adjusted for location, are shown in Table 2. According to this model, sex (P = 0.024) and linear forms of age (P < 0.001), HDL (P = 0.040) and TG (P = 0.032) were significantly associated with functional limitation.

Table 2. The Results of the Logistic Regression on the Assessment of Factors Related to Functional Limitation
VariablesOR (CI 95%)P Value
Ardabil2.034 (1.07, 3.84)
Sex 0.024
Female 1.907 (1.089, 3.338)
Age (year)1.136 (1.097, 1.176)< 0.001
BMI (m/kg)1.054(.994 , 1.119)0.080
Hemoglobin A1C (%)1.015(.855, 1.205)0.867
FBS (mg/dL)1.000(.996, 1.005)0.931
SBP (mg/dL)0.983(.965, 1.00)0.068
DBP (mg/dL)1.002(.972, 1.033)0.897
Chol (mg/dL)0.993(.985, 1.001)0.076
HDL (mg/dL)1.024(1.001, 1.047)0.040
TG (mg/dL)1.004(1.000, 1.009)0.032
Duration of diabetes (year)1.032(.986, 1.081)0.179

The results of GAM are given in Table 3. A degree of freedom equal to one shows the linear association and a degree of freedom higher than one shows the nonlinear association and a df about zero indicates no effect of the covariate on the outcome. After adjusting for location, Sex (P = 0.029), Age with linear effect (df = 0.98, P < 0.001), BMI with the degree of freedom df = 1.75 (P = 0.029), and SBP with df = 1.33 (P = 0.04) were significantly associated with suffering from functional limitation. HDL (df = 1.07) and TG (df = 0.69) had a borderline significant effect on the risk of functional limitation.

Table 3. The Result of the Generalized Additive Model (GAM) on the Assessment of Factors Related to Functional Limitationa, b
VariableDegree of FreedomP Value
Sex -0.029
Age (year)0.982< 0.001
BMI (kg/m2)1.7580.0299
Hemoglobin A1C (%) 0.0001
FBS (mg/dl)0.0000.890
SBP (mmHg)1.3360.041
DBP (mmHg)0.0001
Chol (mg/dl)0.5010.171
HDL (mg/dl)1.0730.058
TG (mg/dl)0.6990.063
Duration of diabetes (year)0.8960.129

R squared of the GAM model (the proportion of the variance in the dependent variable that is predictable from the independent variables) was 25.9%. Figure 1 represents the shape of associations between explanatory variables and functional limitation in diabetic patients.

AIC for GAM (392.68) was lower than AIC of the logistic model (AIC = 398.83).

The shape of associations between covariates and functional limitation in patients with diabetes. Legend: The x - axis contains the covariates values and the y - axis contains the logit of functional limitation produced by GAM model. This plot takes the fitted values and plots the component smooth functions that make it up on the scale of the linear predictor. Upper and lower lines are +1 and -1 standard errors. Abbreviations: BMI, body mass index; Chol, cholesterol; DBP, diastolic blood pressure; DM, diabetes mellitus; FBS, fasting blood sugar; HbA1C, glycated hemoglobin; HDL, high density lipoprotein; SBP, systolic blood pressure; TG, triglyceride

4. Discussion

In this study, GAM was used to assess associations between functional limitation and some demographic, clinical, and biochemical characteristics. The results showed some linear and nonlinear associations. In the present study, it was found that in addition to linear associations (for age), some slight non - linear functions of SBP and BMI were associated with functional limitation. Although there was no strong non-linearity in our data, considering these slight nonlinear relationships in the model could improve the quality of GAM compared to logistic model just with the linear form (degree 1) of variables according to their AIC. Since in the common regression models, we do not have enough knowledge about the nature and form of the relationship between the dependent and independent variables, variables are entered in the model just with the linear form of them, while in the case of existing more complex associations and nonlinear relationships, ignoring such complex relationships in the model can lead to reduced efficiency of the model.

According to the results of GAM, there were significant or borderline associations between the factors of age, BMI, SBP, HDL, and TG with impaired daily functioning. This is because these variables are linked with disease control in patients with diabetes (19) and the poor control of diabetes has a direct impact on the development or progression of symptoms of functional limitation (9).

Females were more likely to suffer from functional limitation. This finding is supported by other studies (21). A reason for high functional limitation among females could be their higher BMI compared to males, which is associated with functional limitation.

Duration of diabetes in this study had no significant effect on functional limitation. Probably, the correlation between this variable and age is the reason for the non-significant effect of this variable and age could partly convey the information of the duration of diabetes.

In the case of blood pressure, the logistic model showed the non - significant linear inverse association of SBP with functional limitation in the sense that always an increase in blood pressure leads to a decrease in the odds of having functional limitation that is not consistent to our expectation. This is while the GAM model shows a slight nonlinear relationship with concavity upward between these variables, which indicates that SBP with degree 1.33 (see Figure 1) at first, decreases and then increases the risk of functional limitation and the relationship is not linear. This shows that it is essential to use methods such as GAM to detect the shape of relations and GLM is not able to reveal such complicated functions.

The results of the study in Iran done by Salehi and colleagues in determining risk factors for retinopathy using the GAM in diabetic patients show significant non-linear relationships of diabetes duration, hemoglobin A1C, and systolic blood pressure with diabetic retinopathy so that the duration of diabetes and hemoglobin A1C with degree 5 and systolic blood pressure with degree 2 were associated with retinopathy outcome (22).

Other studies carried out on the risk factors associated with functional limitation in diabetic patients also show that poorly controlled diabetes (based on hemoglobin A1C) was associated with functional limitation and people with poor control and higher hemoglobin A1C had greater impairment and disability in daily functioning compared to those with better control of the disease (9). However, similar studies using GAM to examine factors associated with functional limitation and determining the shape and kind of relationship between risk factors and functional limitation were not found in our search.

4.1. Limitation

One of the limitations of this study was the presence of missing data. In this study, missing data were excluded from the analysis and imputation of missing data was not performed. However, according to the pattern of the missing that could be considered random and with regard to the calculation of sample size for regression, the sample size for analysis appeared to be sufficient, and the results indicated an acceptable precision of the estimations; but the lack of complete information of all patients is a limitation of the study. Another limitation of this study is that some important variables were not available; thus, they were not included in the models. Furthermore, due to the sampling method, the study sample might not be representative of all diabetic patients in Ardabil and Tabriz.

4.2. Conclusion

As a conclusion, GAM with the identification of linear and nonlinear relationships between risk factors related to functional limitation could slightly increase the quality of the model compared to the logistic model with linear forms of the variables.


  • 1.

    James SR, Nelson K, Ashwill J. Nursing care of children: principles and practice. Elsevier Health Sciences; 2014.

  • 2.

    Jahangiry L, Shojaeezadeh D, Montazeri A, Najafi M, Mohammad K. Health-related Quality of Life Among People Participating in a Metabolic Syndrome E-screening Program: A Web-based Study. Int J Prev Med. 2016;7:27. doi: 10.4103/2008-7802.174893. [PubMed: 26941928].

  • 3.

    Kiadaliri AA, Najafi B, Mirmalek-Sani M. Quality of life in people with diabetes: a systematic review of studies in Iran. J Diabetes Metab Disord. 2013;12(1):54. doi: 10.1186/2251-6581-12-54. [PubMed: 24354933].

  • 4.

    Daugherty C, Dewhurst W, Spertus J. Health related quality of life outcomes in clinical research. Am J Epidemiol. 1998;51(7):569-75.

  • 5.

    Kamalifard M, Sattarzadeh N, Babapour J, Gholami S. Personal And Social Predictors of Sexual Function of Women With Type Two Diabetes in West of Iran in 2015-2016. Crescent J Med Biol Sci. 2018;(in press).

  • 6.

    Schoenberg NE, Traywick LS, Jacobs-Lawson J, Kart CS. Diabetes self-care among a multiethnic sample of older adults. J Cross Cult Gerontol. 2008;23(4):361-76. doi: 10.1007/s10823-008-9060-z. [PubMed: 18369715].

  • 7.

    Group UPDS. Intensive blood-glucose control with sulphonylureas or insulin compared with conventional treatment and risk of complications in patients with type 2 diabetes (UKPDS 33). UK Prospective Diabetes Study (UKPDS) Group. Lancet. 1998;352(9131):837-53. [PubMed: 9742976].

  • 8.

    Hays RD, Liu H, Spritzer K, Cella D. Item response theory analyses of physical functioning items in the medical outcomes study. Med Care. 2007;45(5 Suppl 1):S32-8. doi: 10.1097/01.mlr.0000246649.43232.82. [PubMed: 17443117].

  • 9.

    De Rekeneire N, Resnick HE, Schwartz AV, Shorr RI, Kuller LH, Simonsick EM, et al. Diabetes is associated with subclinical functional limitation in nondisabled older individuals: the Health, Aging, and Body Composition study. Diabetes Care. 2003;26(12):3257-63. [PubMed: 14633811].

  • 10.

    Lu FP, Lin KP, Kuo HK. Diabetes and the risk of multi-system aging phenotypes: a systematic review and meta-analysis. PLoS One. 2009;4(1). e4144. doi: 10.1371/journal.pone.0004144. [PubMed: 19127292].

  • 11.

    Volpato S, Ferrucci L, Blaum C, Ostir G, Cappola A, Fried LP, et al. Progression of lower-extremity disability in older women with diabetes: the Women's Health and Aging Study. Diabetes Care. 2003;26(1):70-5. [PubMed: 12502660].

  • 12.

    Hastie T, Tibshirani R. Generalized Additive Models. Stat Sci. 1986;1(3):297-310. doi: 10.1214/ss/1177013604.

  • 13.

    Ataei J, Shamshirgaran SM, Iranparvar Alamdari M, Safaeian AR. Evaluation of diabetes quality of care based on a care scoring system among people referring to diabetes clinic in Ardabil, 2014. J Ardabil Univ Med Sci. 2015;15(2):207-19.

  • 14.

    Shamshirgaran SM, Mamaghanian A, Aliasgarzadeh A, Aiminisani N, Iranparvar-Alamdari M, Ataie J. Age differences in diabetes-related complications and glycemic control. BMC Endocr Disord. 2017;17(1):25. doi: 10.1186/s12902-017-0175-5. [PubMed: 28472985].

  • 15.

    Shamshirgaran SM, Ataei J, Malek A, Iranparvar-Alamdari M, Aminisani N. Quality of sleep and its determinants among people with type 2 diabetes mellitus in Northwest of Iran. World J Diabetes. 2017;8(7):358-64. doi: 10.4239/wjd.v8.i7.358. [PubMed: 28751959].

  • 16.

    Montazeri A, Goshtasebi A, Vahdaninia M, Gandek B. The Short Form Health Survey (SF-36): translation and validation study of the Iranian version. Qual Life Res. 2005;14(3):875-82. [PubMed: 16022079].

  • 17.

    Gubhaju L, Banks E, MacNiven R, McNamara BJ, Joshy G, Bauman A, et al. Physical Functional Limitations among Aboriginal and Non-Aboriginal Older Adults: Associations with Socio-Demographic Factors and Health. PLoS One. 2015;10(9). e0139364. doi: 10.1371/journal.pone.0139364. [PubMed: 26422239].

  • 18.

    Shamshirgaran SM, Jorm L, Lujic S. Health related factors among people with type 2 diabetes by country of birth: result from the 45 and Up Study. BMC Public Health.

  • 19.

    Smith KJ, Rabasa-Lhoret R, Strychar I, Karelis AD, Clyde M, Levasseur J, et al. Good vs. poor self-rated diabetes control: differences in cardiovascular risk and self-care activities. Exp Clin Endocrinol Diabetes. 2014;122(4):236-9. doi: 10.1055/s-0034-1367005. [PubMed: 24623501].

  • 20.

    Findley DF. Model Selection: Akaike's Information Criterion. Encyclopedia of Statistical Sciences. John Wiley & Sons, Inc; 2004.

  • 21.

    Kastor A, Mohanty SK. Associated Covariates of Functional Limitation Among Older Adults in India: an Exploration. Ageing Int. 2016;41(2):178-92. doi: 10.1007/s12126-016-9241-y.

  • 22.

    Salehi M, Vazirinasab H, Khoshgam M, Rafati N. Application of the generalized additive model in determination of the retinopathy risk factors relation types for Tehran diabetic patients. Razi J Med Sci. 2012;19(97):1-9.

Copyright © 2018, International Journal of Endocrinology and Metabolism. This is an open-access article distributed under the terms of the Creative Commons Attribution-NonCommercial 4.0 International License ( which permits copy and redistribute the material just in noncommercial usages, provided the original work is properly cited