Background Story: One day, my boss asked me to check if the data has a certain number of events to perform an efficacy analysis. I was curious how did he come up with the number, later I know he must have done the Sample Size Calculation. Today we will go over the basics and R applications for sample size calculation.

# Category: R

## Randomization Method

Background Stroy: Last time we emphasized the importance of Randomization because it will provide a balanced measurement for treated and placebo groups, so the treatment is exchangeable. Today we will introduce 3 common randomization methods for different clinical trial purposes and the R code for implementing them: Simple Randomization, Block Randomization, and Stratified Randomization.

## One-tailed vs Two-tailed Test for P value

R day 3 In clinical trial studies, P-value is critical for measuring drug efficacy. Typically, the statistical analysis Plan will describe statistical significance as: P-value <0.05 for two-tailed Log Rank Test. Recently, I came across a study with the statistical significance as P-value <0.025 for one-tailed Log Rank test in the analysis plan. Question: Does two-tailed P-value= 0.05 means the…

## Median vs Mean

R day 2: I was working on a dataset of Airbnb in New York City from Kaggle, when i run the summary function for the price variable in R, i noticed there’s a strong difference between Mean and Median of the variable. summary(ab$price) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0 69.0 106.0 152.7 175.0 …

## Fractal Art

R day 1: Fractal Background I am reading Godel, Escher, Bach, and recursion is one of the main topics the book discussed. Recursion is a pattern and never ends, or goes to infinite. ( EX. Bach’s Fugue, Escher’s stairs, Godel incompleteness theorem).

## Logistic Regression

DATA SCIENCE DAY 18:

Thanks very much to Dr. Shadegian!

## Crime Data visualization

This is a simple crime data visualization from A512, Harrisburg University.