Here is the design of a clinical trial:

Official Title: STudy to Evaluate the Efficacy and Safety of Endoscopic Sleeve Gastroplasty (ESG) Versus LAparoscopic Sleeve Gastrectomy (LSG) in Obese Subjects With Non-Alcoholic SteatoHepatitis (NASH)

Included conditions:
- Non-alcoholic Steatohepatitis (NASH)

Study Armgroups:
- {'label': 'ESG Stitch® system + Lifestyle modifications', 'type': 'EXPERIMENTAL', 'description': 'Endoscopic technique defined as a gastric restriction by means of continuous sutures of the entire gastric wall of the antrum and body, transmurally, in order to simulate a gastric sleeve, in the same way as sleeve gastrectomy surgery. Gastroplasty is performed using an endoscopic suture system (OverStitch, Apollo Endosurgery Inc., Austin, Texas, USA) inserted into a dual-channel endoscope (GIF-2T160, Olympus Medical Systems Corp., Tokyo, Japan).', 'interventionNames': ['Procedure: Endoscopic Sleeve Gastroplasty (ESG) with OverStitch® system + Lifestyle modifications']}
- {'label': 'LSG + Lifestyle modifications', 'type': 'ACTIVE_COMPARATOR', 'description': 'Minimally invasive surgical technique defined as a gastric restriction by means of an excision approximately 80% of the stomach along the greater curvature.', 'interventionNames': ['Procedure: Laparoscopic Sleeve Gastrectomy (LSG) + Lifestyle modifications']}

Interventions:
- {'type': 'PROCEDURE', 'name': 'Endoscopic Sleeve Gastroplasty (ESG) with OverStitch® system + Lifestyle modifications', 'description': 'Endoscopic technique defined as a gastric restriction by means of continuous sutures of the entire gastric wall of the antrum and body, transmurally, in order to simulate a gastric sleeve, in the same way as sleeve gastrectomy surgery. Gastroplasty is performed using an endoscopic suture system (OverStitch, Apollo Endosurgery Inc., Austin, Texas, USA) inserted into a dual-channel endoscope (GIF-2T160, Olympus Medical Systems Corp., Tokyo, Japan).', 'armGroupLabels': ['ESG Stitch® system + Lifestyle modifications']}
- {'type': 'PROCEDURE', 'name': 'Laparoscopic Sleeve Gastrectomy (LSG) + Lifestyle modifications', 'description': 'Minimally invasive surgical technique defined as a gastric restriction by means of an excision approximately 80% of the stomach along the greater curvature.', 'armGroupLabels': ['LSG + Lifestyle modifications']}

Primary Outcomes:
- {'measure': 'Proportion of subjects undergoing ESG relative to LSG achieving resolution of NASH without worsening of fibrosis', 'description': 'To evaluate the effect of ESG compared to LSG on liver histology in obese subjects with NASH with or without fibrosis by assessing the following endpoint: The proportion of subjects undergoing ESG relative to LSG achieving NASH resolution without worsening of fibrosis. NASH resolution is defined as the disappearance of ballooning and the disappearance or persistence of minimal lobular inflammation (grade 0 or 1) The worsening of fibrosis is defined as the progression of at least one stage.', 'timeFrame': 'Measurement at 96 weeks'}
- {'measure': 'Proportion of subjects undergoing ESG relative to LSG with cardiovascular and liver-related death events', 'description': 'To evaluate the effect of ESG compared to LSG on liver histology in obese subjects with NASH with fibrosis by assessing the following endpoint: The proportion of subjects undergoing ESG relative to LSG achieving improvement of liver fibrosis of at least one stage.', 'timeFrame': 'Measurement at 96 weeks'}

Please estimate the sample size based on the assumption: 
Confidence level of 99%, statistical power of 90%, and an assumption of 7% loss.
Sample size {14}
            Previous studies have shown a resolution of NASH in the 85% of patients undergoing a bariatric surgery (69.6% in gastric tubing surgery) and a resolution of 25% in patients with a lifestyle intervention. A bilateral ratio comparison test was used for sample size calculation with a confidence level of 99%, a statistical power of 90%, and an assumption of 7% loss. Obtained sample to observe differences is n=30 (15 per treatment arm).