Publications by fangya
Randomization Methods
1 1. Simple Radomization Flip a Coin Pro: Easy to use Con: Could lead to unbalanced groups over short time period Tool: runif t<-sample(0:1,100,replace=TRUE) table(t) ## t ## 0 1 ## 57 43 trial<- data.frame( id=c(1:100), r= runif(100,0,1) ) trial$treat<-ifelse(trial$r>0.5, "treatment", "placebo") w=table(trial$treat) w ## ## placebo ...
681 sym R (793 sym/11 pcs) 1 img
Sample Size Calculation
1 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. 2 Five components of Sampl...
1446 sym R (748 sym/5 pcs)
H_catalyst basic statistics M1
1 M1: Study design 1.1 A study is only as good as the study design You are the best statistician you know - Brian Healy Study Design Experimental question- Define outcome, sources, analysis plan What are we trying to learn? PFS/ OS/ Relapse How to prove this Sample Population- Sample size, types of sample Who are we going to study Potentia...
2364 sym 1 tbl
Machine Learning Algorithm to Predict the Survival Outcome for Heart Failure
Machine Learning to Predict Survival Outcomes for Heart Failure Attack 1 Introduction Cardiovascular disease are the number 1 cause of death globally, taking an estimated 17.9 million lives each year, which accounts for 31% of all deaths worldwide. Luckily, most cardiovascular disease can be prevented by addressing behavioral risk factors to pop...
10400 sym R (19308 sym/52 pcs) 32 img 1 tbl
PCA
1 PCA: Principal Component Analysis Brief Review PCA is used in exploratory data analysis and make predictive models. It is commonly used for dimensoinaly reduction while minimizing information lost. Principal compentents are a collection of vectors, where vector \(i\) is orthogonal to the first \(i-1\) vectors. In PCA, we do not need to break up...
2076 sym R (2009 sym/19 pcs) 2 img
SVM
0.1 SVM for two classes set.seed(1) x=matrix(rnorm(20*2), ncol=2) y=c(rep(-1,10),rep(1,10)) x[y==1,]=x[y==1,]+1 plot(x,col=(3-y)) 0.1.1 SVM The class is not linearly seperable, so we use SVM regression. dat= data.frame(x=x, y=as.factor(y)) svmfit=svm(y~. ,data= dat, kernel="linear", cost=10, scale=FALSE) plot(svmfit, dat) svmfit$index ## [1] 1...
473 sym R (7569 sym/58 pcs) 11 img
frailty model
1 Survival Analysis with Frailty model. Why Frailty model: When Cox fails (extension of the Cox proportional Hazard model) and for recurrent events . * Model variation : shared, nested ,joint, additve 1.1 Parametric Frailty Model : Kidney dataset head(kidney) ## id time status age sex disease frail ## 1 1 8 1 28 1 Other 2.3 ## ...
580 sym R (13983 sym/33 pcs) 2 img
heart_v1
Male vs Female ggplot(heart, aes(x=sexc))+geom_bar(fill="indianred3") Smoking Status ggplot(heart, aes(x=smoke))+geom_bar(fill="indianred2") Diabetes ggplot(heart, aes(x=dia))+geom_bar(fill="lightblue") Age distribution Survival Plot Smoking fit<-survfit(Surv(time,DEATH_EVENT)~smoke, data=heart) ggsurvplot(fit,data=heart) hbp fit<-survfit(S...
124 sym R (400 sym/6 pcs) 6 img
MANOVA & ANOVA example with Mtcars dataset
knitr::opts_chunk$set(echo = TRUE) data(mtcars) summary(mtcars) ## mpg cyl disp hp ## Min. :10.40 Min. :4.000 Min. : 71.1 Min. : 52.0 ## 1st Qu.:15.43 1st Qu.:4.000 1st Qu.:120.8 1st Qu.: 96.5 ## Median :19.20 Median :6.000 Median :196.3 Median :123.0 ## Mean :...
318 sym R (12909 sym/27 pcs) 5 img
G crypto
1 Introduction basic Asset train distrubtion Arima model 2 Basic Asset Candice: Maybe explain the basic property of each Asset a little? sort by weight gc<- arrange(gc, desc(gc$Weight)) head(gc, 14)%>% DT::datatable() id<- subset(gc, select=-c(Weight)) 3 Data Visualization mp1<- ggplot(data=gc, aes(x=reorder(Asset_Name, Weight), y=Weight))+ge...
238 sym R (501 sym/4 pcs) 1 img