Business PhD and DBA dissertations often combine repeated company records with financial, governance, or strategic measures. This workflow turns a synthetic unbalanced firm-year archive into an auditable analysis. The example relates a digital-capability index to return on assets (ROA), separating within-firm changes from persistent differences between firms.
You will audit panel keys and sample construction, compare pooled, fixed-effect, random-effect, and correlated-random-effect specifications, calculate firm-clustered uncertainty, build calendar-aware lags, examine influence, and write results in substantive units. Prerequisites are regression, basic R, and knowledge of the data source. These are associational models unless a separate research design justifies causal identification.
For your archive, switch use_synthetic to FALSE and
provide the dictionary’s columns. Save the original extract unchanged.
Document the vendor, download date, identifier mapping, fiscal-year
conventions, currency conversion, deflators, restatements, delistings,
and inclusion rules. Ratios require explicit denominator checks; do not
silently map undefined ratios to zero. No proprietary database or access
credentials are included.
| variable | missing | percent |
|---|---|---|
| firm | 0 | 0.000 |
| year | 0 | 0.000 |
| sector | 0 | 0.000 |
| digital | 0 | 0.000 |
| log_assets | 0 | 0.000 |
| leverage | 98 | 3.785 |
| roa | 0 | 0.000 |
| statistic | value |
|---|---|
| Observed firm-years | 2589 |
| Distinct firms | 240 |
| Calendar years | 12 |
| Firms with internal gaps | 65 |
| Firms not observed in final archive year | 43 |
A missing row may represent entry, exit, a delisting, a reporting gap, or a merge failure. These cannot be distinguished from row presence alone. This example has quality-related early exit, delayed entry, intermittent gaps, and modest missing leverage. In real data, consult the source’s status records. Restricting to balanced panels can introduce survivorship bias.
All primary models use the same complete-case sample and minimum-year rule. The rule is transparent, not a universal threshold. Missing-data assumptions still need justification. Multiple imputation must respect firm structure and substantive models; a generic single-level imputation is not implemented here.
| stage | rows | firms |
|---|---|---|
| Observed archive | 2589 | 240 |
| Complete required fields | 2491 | 240 |
| Minimum complete years per firm | 2491 | 240 |
| variable | overall_sd | between_sd | within_sd |
|---|---|---|---|
| roa | 4.322 | 3.711 | 2.377 |
| digital | 1.323 | 0.956 | 0.971 |
| log_assets | 0.706 | 0.623 | 0.363 |
| leverage | 0.128 | 0.076 | 0.108 |
The main analysis uses 2491 firm-years from 240 firms. Within-firm variation in the digital index is 0.97; between-firm SD is 0.96. These are different sources of information. Time-invariant sector effects cannot be separately estimated alongside firm fixed effects.
| Model | What it combines or controls | Key limitation |
|---|---|---|
| Pooled OLS + year + sector | Within and between contrasts | Persistent unobserved firm quality can confound slopes |
| Firm and year fixed effects | Within-firm changes net of common year effects | Does not remove time-varying confounding or reverse causality |
| Random intercept + year + sector | Within and between information under an orthogonality assumption | Firm effects must be uncorrelated with regressors |
| Mundlak correlated random effects | Adds firm means of time-varying regressors | Mean adjustment is a modeling assumption, especially with selection/unbalanced histories |
| model | term | estimate | std_error | p | lower | upper |
|---|---|---|---|---|---|---|
| Pooled OLS | digital | 1.845 | 0.049 | p < .001 | 1.748 | 1.942 |
| Firm + year FE | digital | 1.419 | 0.044 | p < .001 | 1.332 | 1.506 |
| Random effects | digital | 1.729 | 0.045 | p < .001 | 1.640 | 1.819 |
| Mundlak CRE | digital | 1.419 | 0.044 | p < .001 | 1.332 | 1.506 |
Results text: With firm and year fixed effects, a one-point increase in the digital-capability index within a firm was associated with a 1.42-percentage-point difference in ROA, 95% CI [1.33, 1.51], p < .001, conditional on log assets and leverage. This is not the effect of assigning a firm to adopt a technology.
| test | statistic | p |
|---|---|---|
| Panel BG serial-correlation test, order 1 | 149.493 | p < .001 |
| Pesaran cross-sectional-dependence test | -2.487 | p = .013 |
Diagnostics are prompts to investigate design and model adequacy. They are not pass/fail certificates or a reason to switch uncertainty procedures until significance appears. Firm clustering does not cover dependence between firms. Year fixed effects absorb common mean shocks, not all residual cross-firm correlation. With only 12 years, two-way clustering by firm and year or long-T corrections can have weak small-sample behavior. Industry shocks may require clustering at a broader assignment/exposure level with enough independent clusters.
Using the previous row as a lag is wrong when years are missing. The helper requires the same firm and exactly one calendar year between records. A lagged digital measure can clarify timing, but does not make the exposure exogenous. Do not add a lagged dependent variable to a short-panel fixed-effect model without addressing dynamic-panel bias.
| model | term | estimate | std_error | p | lower | upper |
|---|---|---|---|---|---|---|
| Current digital, lag-eligible sample | digital | 1.445 | 0.048 | p < .001 | 1.35 | 1.539 |
| Prior-year digital, lag-eligible sample | lag_value | -0.082 | 0.060 | p = .171 | -0.20 | 0.036 |
The lag comparison uses 2106 firm-years from 239 firms. Re-estimating the contemporaneous model on the same lag-eligible sample helps separate a timing change from a sample change. Covariate and outcome missingness may create additional lag gaps, so sample attrition must be reported.
Winsorization changes values and may hide valid extreme firms. Here it is a transparent sensitivity check, not the default analysis. Cutoffs are computed across the common sample, not within year; record that decision. The balanced-history comparison changes the sampled population and is not inherently less biased.
| model | term | estimate | std_error | p | lower | upper |
|---|---|---|---|---|---|---|
| Original common sample | digital | 1.419 | 0.044 | p < .001 | 1.332 | 1.506 |
| Winsorized sensitivity | digital | 1.418 | 0.046 | p < .001 | 1.328 | 1.508 |
| Complete full-history firms | digital | 1.511 | 0.086 | p < .001 | 1.338 | 1.684 |
| variable | lower | upper |
|---|---|---|
| roa | 7.731 | 28.012 |
| digital | 2.921 | 8.995 |
| log_assets | 6.534 | 9.764 |
| leverage | 0.107 | 0.657 |
There are 49 full-history firms in the complete-case sample. The full-history estimate is included above, with a different sample composition. Select an outlier policy using the measurement process and a preregistered analysis plan, not the desired p-value.
| omitted_firm | estimate | change |
|---|---|---|
| 63 | 1.427 | 0.008 |
| 201 | 1.426 | 0.007 |
| 227 | 1.412 | -0.007 |
| 10 | 1.413 | -0.007 |
| 105 | 1.426 | 0.006 |
| 113 | 1.413 | -0.006 |
| 27 | 1.413 | -0.006 |
| 216 | 1.413 | -0.006 |
The largest absolute slope change after removing one firm was 0.008 ROA percentage points per index point. Influential firms may be substantively important, erroneous, or differently measured. Document investigations rather than deleting them mechanically.
Dynamic panels, endogenous regressors, selection into listing or survival, changing industry classification, nonrandom missing outcomes, rare binary outcomes, counts, and staggered treatment rollouts need specialized extensions. Arellano–Bond/system GMM requires attention to instrument proliferation, serial-correlation restrictions, and weak instruments; it is not supplied as a one-click remedy. Two-way clustering with few years and Driscoll–Kraay inference with short T can be unreliable. Multilevel models answer related but different questions about variance and random slopes. Use the companion causal-inference product when the research question is a treatment effect.
All firm records are synthetic. Known simulation coefficients are teaching references, not benchmarks that real-data results must match. The export files contain model comparisons, sample flow, diagnostics, sensitivity estimates, and figures.