My topic name is corelation or balance with plantar pressure and plantar sensation in community dwelling elderly individuals this is my master chart and please give Data collected will be compiled on to a MS Office excel worksheet & will be subjected to statistical analysis using an appropriate package like SPSS software. Normality of numerical data will be checked using Shapiro – Wilk test or Kolmogorov-Smirnov test. Depending on the normality of data, statistical tests will be determined. Descriptive statistics like frequency (n) & percentage (%) of categorical data, mean & Standard deviation of numerical data will be depicted. Bivariate correlation will be checked using Pearson correlation coefficient. Keeping alpha error at 5% and Beta error at 20%, power at 80%, p<0.05 will be considered statistically significant.

Reading File
Running Command

cd /tmp/workspace/attachments/334d67e1-8c1d-444d-9eb6-7bbe3c5c794e/ && python3 -c " import openpyxl import pandas as pd wb = openpyxl.load_workbook('BALANCE CORRELATION WITH PP ANDPS og.xlsx') print('Sheets:', wb.sheetnames) for sheet in wb.sheetnames: ws = wb[sheet] print(f'\n--- Sheet: {sheet} ---') print(f'Dimensions: {ws.dimensions}') print(f'Max row: {ws.max_row}, Max col: {ws.max_column}') # Print first 5 rows for i, row in enumerate(ws.iter_rows(values_only=True)): if i < 5: print(f'Row {i+1}: {row}') else: break "

Running Command

python3 -c " import pandas as pd import numpy as np df = pd.read_excel('/tmp/workspace/attachments/334d67e1-8c1d-444d-9eb6-7bbe3c5c794e/BALANCE CORRELATION WITH PP ANDPS og.xlsx') print('Shape:', df.shape) print('Columns:', list(df.columns)) print() print(df.head(10).to_string()) print() print('Dtypes:') print(df.dtypes) print() print('Missing values:') print(df.isnull().sum()) "

Running Command

python3 << 'PYEOF' import pandas as pd import numpy as np from scipy import stats import warnings warnings.filterwarnings('ignore') df = pd.read_excel('/tmp/workspace/attachments/334d67e1-8c1d-444d-9eb6-7bbe3c5c794e/BALANCE CORRELATION WITH PP ANDPS og.xlsx') # ── Gender encoding ────────────────────────────────────────────────────────── df['GENDER'] = df.apply(lambda r: 'Male' if r['MALE'] == 'M' else 'Female', axis=1) n_male = (df['GENDER'] == 'Male').sum() n_female = (df['GENDER'] == 'Female').sum() n_total = len(df) print("=== SAMPLE SIZE ===") print(f"Total N = {n_total}") print(f"Male = {n_male} ({n_male/n_total*100:.1f}%)") print(f"Female = {n_female} ({n_female/n_total*100:.1f}%)") # ── Numerical variables ─────────────────────────────────────────────────────── num_vars = [ 'AGE', 'SENSATION ON 1St METATARSAL','SENSATION ON HEEL','TOTAL SENSITIVITY', 'PLANTAR PRESSURE OF RIGHT FOREFOOT','PLANTAR PRESSURE OF LEFT FOREFOOT', 'PLANTAR PRESSURE OF RIGHT HINDFOOT','PLANTAR PRESSURE OF LEFT HINDFOOT', 'MAXIMUM PLANTAR PRESSURE ON RIGHT FOOT','MAXIMUM PLANTAR PRESSURE ON LEFTFOOT', 'MINIBESTEST SCORE','ANTICIPATORY','REACTIVE POSTURAL CONTROL', 'SENSORY ORIENTATION','DYNAMIC GAIT' ] print("\n=== DESCRIPTIVE STATISTICS ===") desc = df[num_vars].agg(['mean','std','min','max','median']) print(desc.round(3).to_string()) print("\n=== NORMALITY TEST (Shapiro-Wilk) ===") normality = {} for v in num_vars: stat, p = stats.shapiro(df[v].dropna()) normality[v] = {'W': round(stat,4), 'p': round(p,4), 'Normal': 'Yes' if p > 0.05 else 'No'} print(f"{v:50s} W={stat:.4f} p={p:.4f} {'Normal' if p>0.05 else 'NOT Normal'}") # ── Correlation variables ──────────────────────────────────────────────────── # Balance = MiniBESTest total + subscores # Plantar Pressure vars # Plantar Sensation vars balance_vars = ['MINIBESTEST SCORE','ANTICIPATORY','REACTIVE POSTURAL CONTROL', 'SENSORY ORIENTATION','DYNAMIC GAIT'] pp_vars = ['PLANTAR PRESSURE OF RIGHT FOREFOOT','PLANTAR PRESSURE OF LEFT FOREFOOT', 'PLANTAR PRESSURE OF RIGHT HINDFOOT','PLANTAR PRESSURE OF LEFT HINDFOOT', 'MAXIMUM PLANTAR PRESSURE ON RIGHT FOOT','MAXIMUM PLANTAR PRESSURE ON LEFTFOOT'] sensation_vars = ['SENSATION ON 1St METATARSAL','SENSATION ON HEEL','TOTAL SENSITIVITY'] print("\n=== PEARSON CORRELATION: BALANCE vs PLANTAR PRESSURE ===") print(f"{'Plantar Pressure Var':<42} {'Balance Var':<28} r p-value Sig") print("-"*115) pp_balance_results = [] for bv in balance_vars: for pv in pp_vars: r, p = stats.pearsonr(df[pv], df[bv]) sig = '**' if p < 0.01 else ('*' if p < 0.05 else 'ns') pp_balance_results.append({'Plantar Pressure': pv, 'Balance': bv, 'r': round(r,4), 'p': round(p,4), 'Sig': sig}) print(f"{pv:<42} {bv:<28} {r:+.4f} {p:.4f} {sig}") print("\n=== PEARSON CORRELATION: BALANCE vs PLANTAR SENSATION ===") print(f"{'Plantar Sensation Var':<32} {'Balance Var':<28} r p-value Sig") print("-"*100) ps_balance_results = [] for bv in balance_vars: for sv in sensation_vars: r, p = stats.pearsonr(df[sv], df[bv]) sig = '**' if p < 0.01 else ('*' if p < 0.05 else 'ns') ps_balance_results.append({'Plantar Sensation': sv, 'Balance': bv, 'r': round(r,4), 'p': round(p,4), 'Sig': sig}) print(f"{sv:<32} {bv:<28} {r:+.4f} {p:.4f} {sig}") print("\n=== PEARSON CORRELATION: PLANTAR PRESSURE vs PLANTAR SENSATION ===") print(f"{'Plantar Pressure Var':<42} {'Sensation Var':<32} r p-value Sig") print("-"*115) pp_ps_results = [] for sv in sensation_vars: for pv in pp_vars: r, p = stats.pearsonr(df[pv], df[sv]) sig = '**' if p < 0.01 else ('*' if p < 0.05 else 'ns') pp_ps_results.append({'Plantar Pressure': pv, 'Plantar Sensation': sv, 'r': round(r,4), 'p': round(p,4), 'Sig': sig}) print(f"{pv:<42} {sv:<32} {r:+.4f} {p:.4f} {sig}") PYEOF

Running Command

mkdir -p /tmp/workspace/balance_correlation_study && python3 << 'PYEOF' import pandas as pd import numpy as np from scipy import stats import openpyxl from openpyxl.styles import (Font, PatternFill, Alignment, Border, Side, GradientFill) from openpyxl.utils import get_column_letter from openpyxl.styles.numbers import FORMAT_NUMBER_00 import warnings warnings.filterwarnings('ignore') # ──────────────────────────────────────────────────────────────────────────── # 1. LOAD DATA # ──────────────────────────────────────────────────────────────────────────── df = pd.read_excel('/tmp/workspace/attachments/334d67e1-8c1d-444d-9eb6-7bbe3c5c794e/BALANCE CORRELATION WITH PP ANDPS og.xlsx') df['GENDER'] = df.apply(lambda r: 'Male' if r['MALE'] == 'M' else 'Female', axis=1) n_total = len(df) n_male = (df['GENDER'] == 'Male').sum() n_female = (df['GENDER'] == 'Female').sum() num_vars = [ 'AGE', 'SENSATION ON 1St METATARSAL','SENSATION ON HEEL','TOTAL SENSITIVITY', 'PLANTAR PRESSURE OF RIGHT FOREFOOT','PLANTAR PRESSURE OF LEFT FOREFOOT', 'PLANTAR PRESSURE OF RIGHT HINDFOOT','PLANTAR PRESSURE OF LEFT HINDFOOT', 'MAXIMUM PLANTAR PRESSURE ON RIGHT FOOT','MAXIMUM PLANTAR PRESSURE ON LEFTFOOT', 'MINIBESTEST SCORE','ANTICIPATORY','REACTIVE POSTURAL CONTROL', 'SENSORY ORIENTATION','DYNAMIC GAIT' ] balance_vars = ['MINIBESTEST SCORE','ANTICIPATORY','REACTIVE POSTURAL CONTROL', 'SENSORY ORIENTATION','DYNAMIC GAIT'] pp_vars = ['PLANTAR PRESSURE OF RIGHT FOREFOOT','PLANTAR PRESSURE OF LEFT FOREFOOT', 'PLANTAR PRESSURE OF RIGHT HINDFOOT','PLANTAR PRESSURE OF LEFT HINDFOOT', 'MAXIMUM PLANTAR PRESSURE ON RIGHT FOOT','MAXIMUM PLANTAR PRESSURE ON LEFTFOOT'] sensation_vars = ['SENSATION ON 1St METATARSAL','SENSATION ON HEEL','TOTAL SENSITIVITY'] # ──────────────────────────────────────────────────────────────────────────── # 2. COMPUTE STATISTICS # ──────────────────────────────────────────────────────────────────────────── # Descriptive desc = {} for v in num_vars: s = df[v].dropna() desc[v] = {'Mean': round(s.mean(),2), 'SD': round(s.std(),2), 'Min': round(s.min(),2), 'Max': round(s.max(),2), 'Median': round(s.median(),2)} # Shapiro-Wilk normality = {} for v in num_vars: W, p = stats.shapiro(df[v].dropna()) normality[v] = {'W': round(W,4), 'p': round(p,4), 'Normal': 'Yes (p>0.05)' if p > 0.05 else 'No (p<0.05)'} # Correlation helper def pearson(a, b): r, p = stats.pearsonr(df[a], df[b]) sig = '** (p<0.01)' if p < 0.01 else ('* (p<0.05)' if p < 0.05 else 'ns') return round(r,4), round(p,4), sig # ──────────────────────────────────────────────────────────────────────────── # 3. STYLE HELPERS # ──────────────────────────────────────────────────────────────────────────── TITLE_FILL = PatternFill('solid', fgColor='1F3864') # dark navy HEADER_FILL = PatternFill('solid', fgColor='2E75B6') # blue SUBHEAD_FILL = PatternFill('solid', fgColor='D6E4F0') # light blue SIG_FILL = PatternFill('solid', fgColor='E2EFDA') # green tint NS_FILL = PatternFill('solid', fgColor='FFFFFF') ALT_FILL = PatternFill('solid', fgColor='F2F7FB') RED_FILL = PatternFill('solid', fgColor='FCE4D6') # slight red for NOT normal def title_font(sz=14, bold=True): return Font(name='Arial', size=sz, bold=bold, color='FFFFFF') def header_font(sz=11, bold=True): return Font(name='Arial', size=sz, bold=bold, color='FFFFFF') def body_font(sz=10, bold=False, color='000000'): return Font(name='Arial', size=sz, bold=bold, color=color) def thin_border(): s = Side(style='thin', color='B8CCE4') return Border(left=s, right=s, top=s, bottom=s) def center(): return Alignment(horizontal='center', vertical='center', wrap_text=True) def left(): return Alignment(horizontal='left', vertical='center', wrap_text=True) def style_title(ws, row, col, value, colspan=1): cell = ws.cell(row=row, column=col, value=value) cell.font = title_font() cell.fill = TITLE_FILL cell.alignment = center() cell.border = thin_border() if colspan > 1: ws.merge_cells(start_row=row, start_column=col, end_row=row, end_column=col+colspan-1) return cell def style_header(ws, row, col, value, colspan=1): cell = ws.cell(row=row, column=col, value=value) cell.font = header_font() cell.fill = HEADER_FILL cell.alignment = center() cell.border = thin_border() if colspan > 1: ws.merge_cells(start_row=row, start_column=col, end_row=row, end_column=col+colspan-1) return cell def style_subhead(ws, row, col, value): cell = ws.cell(row=row, column=col, value=value) cell.font = Font(name='Arial', size=10, bold=True, color='1F3864') cell.fill = SUBHEAD_FILL cell.alignment = center() cell.border = thin_border() return cell def write_cell(ws, row, col, value, bold=False, fill=None, align='center', color='000000'): cell = ws.cell(row=row, column=col, value=value) cell.font = body_font(bold=bold, color=color) cell.fill = fill if fill else NS_FILL cell.alignment = center() if align == 'center' else left() cell.border = thin_border() return cell # ════════════════════════════════════════════════════════════════════════════ # 4. CREATE WORKBOOK # ════════════════════════════════════════════════════════════════════════════ wb = openpyxl.Workbook() # ────────────────────────────────────────────────────────────────────────── # SHEET 1 – COVER / SUMMARY # ────────────────────────────────────────────────────────────────────────── ws1 = wb.active ws1.title = 'Study Overview' ws1.sheet_view.showGridLines = False ws1.column_dimensions['A'].width = 5 ws1.column_dimensions['B'].width = 38 ws1.column_dimensions['C'].width = 22 style_title(ws1, 1, 2, 'CORRELATION / BALANCE WITH PLANTAR PRESSURE & PLANTAR SENSATION', colspan=2) ws1.row_dimensions[1].height = 36 style_title(ws1, 2, 2, 'In Community-Dwelling Elderly Individuals', colspan=2) ws1.row_dimensions[2].height = 22 ws1.cell(row=3, column=2).value = '' row = 4 style_header(ws1, row, 2, 'STUDY DETAILS', colspan=2); row+=1 details = [ ('Study Design', 'Cross-sectional Observational Study'), ('Population', 'Community-Dwelling Elderly Individuals'), ('Total Sample Size (N)', str(n_total)), ('Males', f'{n_male} ({n_male/n_total*100:.1f}%)'), ('Females', f'{n_female} ({n_female/n_total*100:.1f}%)'), ('Outcome 1 – Balance', 'MiniBESTest (Total + 4 Subscores)'), ('Outcome 2 – Plantar Pressure', '6 variables (Forefoot/Hindfoot, R/L, Max)'), ('Outcome 3 – Plantar Sensation', 'Sensation @ 1st Metatarsal, Heel, Total'), ('Statistical Software', 'Python SciPy (SPSS-equivalent outputs)'), ('Normality Test', 'Shapiro-Wilk Test'), ('Correlation Test', 'Pearson Correlation Coefficient (r)'), ('Significance Level', 'α = 0.05 | ** p<0.01 | * p<0.05 | ns = not significant'), ] for k, v in details: alt = ALT_FILL if row % 2 == 0 else NS_FILL write_cell(ws1, row, 2, k, bold=True, fill=SUBHEAD_FILL, align='left') write_cell(ws1, row, 3, v, fill=alt, align='left') row += 1 ws1.row_dimensions[row].height = 14 row += 1 style_header(ws1, row, 2, 'SHEETS IN THIS WORKBOOK', colspan=2); row+=1 sheets = [ ('Study Overview', 'This sheet – study details and legend'), ('1. Descriptive Stats', 'Mean, SD, Min, Max, Median for all variables'), ('2. Normality Test', 'Shapiro-Wilk W and p-value for all numerical vars'), ('3. Gender Frequency', 'Frequency and % of categorical variable (Gender)'), ('4. Corr PP vs Balance','Pearson r – Plantar Pressure vs Balance (MiniBESTest)'), ('5. Corr PS vs Balance','Pearson r – Plantar Sensation vs Balance'), ('6. Corr PP vs PS', 'Pearson r – Plantar Pressure vs Plantar Sensation'), ('7. Corr Matrix', 'Full correlation matrix (heatmap-style)'), ] for nm, desc_s in sheets: alt = ALT_FILL if row % 2 == 0 else NS_FILL write_cell(ws1, row, 2, nm, bold=True, fill=SUBHEAD_FILL, align='left') write_cell(ws1, row, 3, desc_s, fill=alt, align='left') row += 1 # ────────────────────────────────────────────────────────────────────────── # SHEET 2 – DESCRIPTIVE STATISTICS # ────────────────────────────────────────────────────────────────────────── ws2 = wb.create_sheet('1. Descriptive Stats') ws2.sheet_view.showGridLines = False col_widths2 = [5, 42, 12, 12, 12, 12, 12, 20] for i, w in enumerate(col_widths2, 1): ws2.column_dimensions[get_column_letter(i)].width = w style_title(ws2, 1, 2, 'TABLE 1 – DESCRIPTIVE STATISTICS', colspan=7) ws2.row_dimensions[1].height = 30 style_header(ws2, 2, 2, 'Variable'); style_header(ws2, 2, 3, 'Mean') style_header(ws2, 2, 4, 'SD'); style_header(ws2, 2, 5, 'Median') style_header(ws2, 2, 6, 'Min'); style_header(ws2, 2, 7, 'Max') style_header(ws2, 2, 8, 'Normality (S-W)') sections = [ ('DEMOGRAPHIC', ['AGE']), ('PLANTAR SENSATION', sensation_vars), ('PLANTAR PRESSURE', pp_vars), ('BALANCE (MiniBESTest)', balance_vars), ] r = 3 for sec_name, vars_list in sections: ws2.merge_cells(start_row=r, start_column=2, end_row=r, end_column=8) c = ws2.cell(row=r, column=2, value=sec_name) c.font = Font(name='Arial', size=10, bold=True, color='1F3864') c.fill = SUBHEAD_FILL c.alignment = left(); c.border = thin_border() r += 1 for v in vars_list: d = desc[v] nm = normality[v] alt = ALT_FILL if r % 2 == 0 else NS_FILL norm_fill = NS_FILL if 'Yes' in nm['Normal'] else RED_FILL write_cell(ws2, r, 2, v, align='left', fill=alt) write_cell(ws2, r, 3, d['Mean'], fill=alt) write_cell(ws2, r, 4, d['SD'], fill=alt) write_cell(ws2, r, 5, d['Median'], fill=alt) write_cell(ws2, r, 6, d['Min'], fill=alt) write_cell(ws2, r, 7, d['Max'], fill=alt) write_cell(ws2, r, 8, nm['Normal'], fill=norm_fill) r += 1 r += 1 ws2.cell(row=r, column=2, value='Note: Normality assessed by Shapiro-Wilk test. Red = non-normal distribution (p<0.05).').font = Font(name='Arial', size=9, italic=True, color='595959') # ────────────────────────────────────────────────────────────────────────── # SHEET 3 – NORMALITY TEST # ────────────────────────────────────────────────────────────────────────── ws3 = wb.create_sheet('2. Normality Test') ws3.sheet_view.showGridLines = False for i, w in enumerate([5, 42, 12, 12, 22], 1): ws3.column_dimensions[get_column_letter(i)].width = w style_title(ws3, 1, 2, 'TABLE 2 – NORMALITY TEST (SHAPIRO-WILK)', colspan=4) ws3.row_dimensions[1].height = 30 style_header(ws3, 2, 2, 'Variable') style_header(ws3, 2, 3, 'W Statistic') style_header(ws3, 2, 4, 'p-value') style_header(ws3, 2, 5, 'Normal Distribution?') r = 3 for v in num_vars: nm = normality[v] alt = ALT_FILL if r % 2 == 0 else NS_FILL norm_fill = NS_FILL if 'Yes' in nm['Normal'] else RED_FILL write_cell(ws3, r, 2, v, align='left', fill=alt) write_cell(ws3, r, 3, nm['W'], fill=alt) write_cell(ws3, r, 4, nm['p'], fill=alt) write_cell(ws3, r, 5, nm['Normal'], fill=norm_fill) r += 1 r += 1 n = ws3.cell(row=r, column=2, value='Note: p > 0.05 = data is normally distributed. p < 0.05 = non-normal (Pearson r still reported as commonly used in clinical research).') n.font = Font(name='Arial', size=9, italic=True, color='595959') # ────────────────────────────────────────────────────────────────────────── # SHEET 4 – GENDER FREQUENCY # ────────────────────────────────────────────────────────────────────────── ws4 = wb.create_sheet('3. Gender Frequency') ws4.sheet_view.showGridLines = False for i, w in enumerate([5, 22, 14, 14], 1): ws4.column_dimensions[get_column_letter(i)].width = w style_title(ws4, 1, 2, 'TABLE 3 – GENDER FREQUENCY', colspan=3) ws4.row_dimensions[1].height = 28 style_header(ws4, 2, 2, 'Gender') style_header(ws4, 2, 3, 'Frequency (n)') style_header(ws4, 2, 4, 'Percentage (%)') rows_g = [('Male', n_male, f'{n_male/n_total*100:.1f}'), ('Female', n_female, f'{n_female/n_total*100:.1f}'), ('Total', n_total, '100.0')] for i, (g, n_g, pct) in enumerate(rows_g, 3): alt = ALT_FILL if i % 2 == 0 else NS_FILL write_cell(ws4, i, 2, g, bold=(g=='Total'), align='left', fill=alt) write_cell(ws4, i, 3, n_g, bold=(g=='Total'), fill=alt) write_cell(ws4, i, 4, pct, bold=(g=='Total'), fill=alt) # ────────────────────────────────────────────────────────────────────────── # HELPER: write a correlation table # ────────────────────────────────────────────────────────────────────────── def write_corr_sheet(ws, title, row_vars, col_vars, row_label, col_label): ws.sheet_view.showGridLines = False base_w = 30 ws.column_dimensions['A'].width = 4 ws.column_dimensions['B'].width = 38 for ci, cv in enumerate(col_vars, 3): ws.column_dimensions[get_column_letter(ci)].width = 20 style_title(ws, 1, 2, title, colspan=2 + len(col_vars) - 1) ws.row_dimensions[1].height = 30 # Column headers style_subhead(ws, 2, 2, row_label + ' \\ ' + col_label) for ci, cv in enumerate(col_vars, 3): style_header(ws, 2, ci, cv) r = 3 for rv in row_vars: alt = ALT_FILL if r % 2 == 0 else NS_FILL write_cell(ws, r, 2, rv, bold=True, align='left', fill=SUBHEAD_FILL) for ci, cv in enumerate(col_vars, 3): rval, pval, sig = pearson(rv, cv) label = f'r = {rval}\np = {pval}\n{sig}' if '**' in sig: fill = PatternFill('solid', fgColor='C6EFCE') elif '*' in sig: fill = PatternFill('solid', fgColor='FFEB9C') else: fill = alt cell = ws.cell(row=r, column=ci, value=label) cell.font = body_font(sz=9, bold=('**' in sig or ('*' in sig and '**' not in sig))) cell.fill = fill cell.alignment = center() cell.border = thin_border() r += 1 r += 1 ws.cell(row=r, column=2, value='** p<0.01 (green) * p<0.05 (yellow) ns = not significant').font = Font(name='Arial', size=9, italic=True, color='595959') ws.row_dimensions[r].height = 14 # ────────────────────────────────────────────────────────────────────────── # SHEET 5 – PP vs BALANCE # ────────────────────────────────────────────────────────────────────────── ws5 = wb.create_sheet('4. Corr PP vs Balance') write_corr_sheet(ws5, 'TABLE 4 – PEARSON CORRELATION: PLANTAR PRESSURE vs BALANCE (MiniBESTest)', pp_vars, balance_vars, 'Plantar Pressure', 'Balance Score') # ────────────────────────────────────────────────────────────────────────── # SHEET 6 – SENSATION vs BALANCE # ────────────────────────────────────────────────────────────────────────── ws6 = wb.create_sheet('5. Corr PS vs Balance') write_corr_sheet(ws6, 'TABLE 5 – PEARSON CORRELATION: PLANTAR SENSATION vs BALANCE', sensation_vars, balance_vars, 'Plantar Sensation', 'Balance Score') # ────────────────────────────────────────────────────────────────────────── # SHEET 7 – PP vs SENSATION # ────────────────────────────────────────────────────────────────────────── ws7 = wb.create_sheet('6. Corr PP vs PS') write_corr_sheet(ws7, 'TABLE 6 – PEARSON CORRELATION: PLANTAR PRESSURE vs PLANTAR SENSATION', pp_vars, sensation_vars, 'Plantar Pressure', 'Plantar Sensation') # ────────────────────────────────────────────────────────────────────────── # SHEET 8 – FULL CORRELATION MATRIX # ────────────────────────────────────────────────────────────────────────── ws8 = wb.create_sheet('7. Corr Matrix') ws8.sheet_view.showGridLines = False all_corr_vars = sensation_vars + pp_vars + balance_vars style_title(ws8, 1, 2, 'TABLE 7 – FULL PEARSON CORRELATION MATRIX', colspan=len(all_corr_vars)+1) ws8.row_dimensions[1].height = 28 ws8.column_dimensions['A'].width = 3 ws8.column_dimensions['B'].width = 38 for ci in range(3, 3+len(all_corr_vars)): ws8.column_dimensions[get_column_letter(ci)].width = 16 # Headers style_subhead(ws8, 2, 2, 'Variable') for ci, v in enumerate(all_corr_vars, 3): style_header(ws8, 2, ci, v) for ri, rv in enumerate(all_corr_vars, 3): alt = ALT_FILL if ri % 2 == 0 else NS_FILL write_cell(ws8, ri, 2, rv, bold=True, align='left', fill=SUBHEAD_FILL) for ci, cv in enumerate(all_corr_vars, 3): if rv == cv: cell = ws8.cell(row=ri, column=ci, value='1.000') cell.font = Font(name='Arial', size=9, bold=True) cell.fill = PatternFill('solid', fgColor='D9D9D9') cell.alignment = center() cell.border = thin_border() else: rval, pval, sig = pearson(rv, cv) if '**' in sig: fill = PatternFill('solid', fgColor='C6EFCE') elif '*' in sig: fill = PatternFill('solid', fgColor='FFEB9C') else: fill = alt label = f'r={rval}\np={pval}\n{sig}' cell = ws8.cell(row=ri, column=ci, value=label) cell.font = Font(name='Arial', size=8, bold=('**' in sig)) cell.fill = fill cell.alignment = center() cell.border = thin_border() ws8.row_dimensions[ri].height = 40 r_note = 3 + len(all_corr_vars) + 1 ws8.cell(row=r_note, column=2, value='Green = ** p<0.01 | Yellow = * p<0.05 | White/Alt = ns | Grey = self-correlation').font = Font(name='Arial', size=9, italic=True, color='595959') # ────────────────────────────────────────────────────────────────────────── # SAVE # ────────────────────────────────────────────────────────────────────────── out_path = '/tmp/workspace/balance_correlation_study/Statistical_Analysis_Results.xlsx' wb.save(out_path) print(f'Saved to: {out_path}') PYEOF

Here is your complete statistical analysis output file and a full summary of findings:

Statistical Analysis Results

Study: Correlation of Balance with Plantar Pressure and Plantar Sensation in Community-Dwelling Elderly Individuals Download your Excel file here:

Statistical Analysis Results

Spreadsheet · XLSX


What is Inside the Excel File (7 Sheets)

SheetContents
Study OverviewStudy details, legend, and sheet guide
1. Descriptive StatsMean, SD, Median, Min, Max + Normality flag for all variables
2. Normality TestShapiro-Wilk W and p-value for every numerical variable
3. Gender FrequencyFrequency (n) and percentage (%)
4. Corr PP vs BalancePearson r - Plantar Pressure vs MiniBESTest (total + subscores)
5. Corr PS vs BalancePearson r - Plantar Sensation vs Balance
6. Corr PP vs PSPearson r - Plantar Pressure vs Plantar Sensation
7. Corr MatrixFull correlation matrix (color-coded: green=**, yellow=*)

Key Findings Summary

Sample (N = 85)

  • Males: 50 (58.8%) | Females: 35 (41.2%)
  • Mean Age: 69.1 ± 3.9 years (range 65-86)

TABLE 1 - Descriptive Statistics (Mean ± SD)

VariableMeanSDMinMax
Age69.13.96586
Sensation - 1st Metatarsal2.250.7713
Sensation - Heel1.330.4712
Total Sensitivity3.580.9925
PP Right Forefoot314.937.1179469
PP Left Forefoot327.038.2194401
PP Right Hindfoot228.672.559350
PP Left Hindfoot238.570.275376
Max PP Right Foot318.034.3236469
Max PP Left Foot331.934.1194401
MiniBESTest Score22.62.81230
Anticipatory5.270.7036
Reactive Postural Control4.481.1916
Sensory Orientation5.320.8126
Dynamic Gait7.411.29510

TABLE 2 - Normality (Shapiro-Wilk)

  • Only Plantar Pressure of Right Hindfoot (W = 0.976, p = 0.110) passed normality.
  • All other 14 variables showed non-normal distribution (p < 0.05).
  • Pearson r is still reported, as it is standard practice in clinical research with this sample size (n = 85).

TABLE 4 - Significant Correlations: Plantar Pressure vs Balance

Plantar PressureBalance Variablerp-valueSignificance
Maximum PP Right FootAnticipatory+0.26990.0125*
All other PP vs Balance correlations were not significant (ns).

TABLE 5 - Significant Correlations: Plantar Sensation vs Balance

Plantar SensationBalance Variablerp-valueSignificance
Sensation - 1st MetatarsalSensory Orientation-0.26260.0152*
Total SensitivitySensory Orientation-0.26170.0155*
  • The negative r here reflects the sensation scale scoring - higher numbers on the sensation scale indicate reduced sensitivity (i.e., worse sensation associates with poorer sensory orientation in balance).
  • All other PS vs Balance correlations were not significant.

TABLE 6 - Plantar Pressure vs Plantar Sensation

  • No significant correlation was found between any plantar pressure variable and any plantar sensation variable (all p > 0.05).

Interpretation for Your Thesis

  1. Balance and Plantar Pressure: A weak positive significant correlation was found between Maximum Plantar Pressure on the Right Foot and the Anticipatory postural control subscore of MiniBESTest (r = +0.270, p = 0.013). No significant correlation was found with the total MiniBESTest score or other subscores.
  2. Balance and Plantar Sensation: Plantar sensation (1st metatarsal and total sensitivity) showed a weak but significant negative correlation with the Sensory Orientation subscore of MiniBESTest (r = -0.263, p = 0.015), indicating that reduced plantar sensitivity is associated with poorer sensory balance control.
  3. Plantar Pressure and Plantar Sensation: No significant correlation was found between these two variables, suggesting they are independent measures in this population.
  4. Overall: The correlations, while statistically significant, are weak (|r| < 0.30), suggesting that plantar pressure and plantar sensation each explain only a small portion of balance variability in community-dwelling elderly individuals.
Note on non-normality: Because most variables violate normality (Shapiro-Wilk p < 0.05), you may wish to also report Spearman's rho as a non-parametric alternative. If you need that added to the Excel file, just ask.

Give me excel worksheet of this results

Running Command

ls -lh /tmp/workspace/balance_correlation_study/

Your Excel file is ready. Download it here:

Statistical Analysis Results

Spreadsheet · XLSX


The file contains 7 formatted sheets:
SheetContents
Study OverviewStudy details, legend, sheet guide
1. Descriptive StatsMean, SD, Median, Min, Max for all 15 variables + normality flag
2. Normality TestShapiro-Wilk W statistic and p-value for every variable
3. Gender FrequencyFrequency (n) and percentage (%) - Male vs Female
4. Corr PP vs BalancePearson r - Plantar Pressure vs MiniBESTest (total + 4 subscores)
5. Corr PS vs BalancePearson r - Plantar Sensation vs Balance scores
6. Corr PP vs PSPearson r - Plantar Pressure vs Plantar Sensation
7. Corr MatrixFull color-coded correlation matrix
Color coding in correlation tables:
  • 🟢 Green = ** p < 0.01 (highly significant)
  • 🟡 Yellow = * p < 0.05 (significant)
  • White = ns (not significant)
This is a shared conversation. Sign in to Orris to start your own chat.