ImportanceCommunication and adoption of modern study design and analytical techniques is of high importance for the improvement of clinical research from observational data.ObjectiveTo compare a modern method for statistical inference, including a target trial emulation framework and doubly robust estimation, with approaches common in the clinical literature, such as Cox proportional hazards models.Design, Setting, and ParticipantsThis retrospective cohort study used longitudinal electronic health record data for outcomes at 28-days from time of hospitalization within a multicenter New York, New York, hospital system. Participants included adult patients hospitalized between March 1 and May 15, 2020, with COVID-19 and not receiving corticosteroids for chronic use. Data were analyzed from October 2021 to March 2022.ExposuresCorticosteroid exposure was defined as more than 0.5 mg/kg methylprednisolone equivalent in a 24-hour period. For target trial emulation, exposures were corticosteroids for 6 days if and when a patient met criteria for severe hypoxia vs no corticosteroids. For approaches common in clinical literature, treatment definitions used for variables in Cox regression models varied by study design (no time frame, 1 day, and 5 days from time of severe hypoxia).Main Outcomes and MeasuresThe main outcome was 28-day mortality from time of hospitalization. The association of corticosteroids with mortality for patients with moderate to severe COVID-19 was assessed using the World Health Organization (WHO) meta-analysis of corticosteroid randomized clinical trials as a benchmark.ResultsA total of 3298 patients (median [IQR] age, 65 [53-77] years; 1970 [60%] men) were assessed, including 423 patients who received corticosteroids at any point during hospitalization and 699 patients who died within 28 days of hospitalization. Target trial emulation analysis found corticosteroids were associated with a reduced 28-day mortality rate, from 32.2%; (95% CI, 30.9%-33.5%) to 25.7% (95% CI, 24.5%-26.9%). This estimate is qualitatively identical to the WHO meta-analysis odds ratio of 0.66 (95% CI, 0.53-0.82). Hazard ratios using methods comparable with current corticosteroid research range in size and direction, from 0.50 (95% CI, 0.41-0.62) to 1.08 (95% CI, 0.80-1.47).Conclusions and RelevanceThese findings suggest that clinical research based on observational data can be used to estimate findings similar to those from randomized clinical trials; however, the correctness of these estimates requires designing the study and analyzing the data based on principles that are different from the current standard in clinical research.