Publications by Binh Thang

Modelling Waning Immunity (w4 SIR)

26.05.2020

1 Etivity In the last 2 etivities, you gained a better understanding of how susceptibility in a population can change independently of the epidemic - first through population turnover, then through vaccination. So far we have only modelled immunising infections where recovered or vaccinated individuals are permamently immune to (re)infection. How...

24561 sym R (7681 sym/4 pcs) 3 img

Mô hình Bayes cho sự khác biệt giữa 2 tỉ lệ

17.06.2020

#Bai viet mo phong lai code va video cua GS Nguyen Van Tuan - ## link video: https://www.youtube.com/watch?v=Yz-evMBOUsI #data x1=652; n1=10343 x2=1473; n2=20173 #prior alpha1=1; beta1=1 alpha2=1; beta2=1 #posterior p1=rbeta(100000, x1+alpha1, n1-x1+beta1) p2=rbeta(100000, x2+alpha2, n2-x2+beta2) head(p1) ## [1] 0.06843026 0.06198538 0.06...

1259 sym R (533 sym/10 pcs) 1 img

Creating table 1 - Blog GS Nguyen Van Tuan

23.06.2020

This post was taken from video of Professor Nguyen Van Tuan, you can refer to his video on youtube via link below #https://www.youtube.com/watch?v=hDQ0T6-i1rk&fbclid=IwAR0m8mqvGFza6xktND9CLujD5VzryzuLOcMcQ4ocZdZ1hO4YWkkU7vYiOQA my post is to use for study purpose library(ggplot2) data(diamonds) head(diamonds) ## # A tibble: 6 x 10 ## carat c...

2202 sym R (4516 sym/22 pcs) 2 tbl

NC1: Stress

24.06.2020

library(foreign) data=read.dta('C:/Users/NCC/Dropbox/PhD/Data/Tu/Academic stress/data0.dta', convert.factors = TRUE, missing.type = FALSE, warn.missing.labels = TRUE) Academic stress ##view data names(data) ## [1] "lop" "msp" "a1" "a2" "a3" ## [6] "a3x4" "a4" "a5" "a5x5"...

6248 sym R (24438 sym/63 pcs) 2 img

NC 1: Academic stress - network analysis

25.06.2020

0.0.1 phan tich thu network library("qgraph") ## Warning: package 'qgraph' was built under R version 4.0.2 ## Registered S3 methods overwritten by 'huge': ## method from ## plot.sim BDgraph ## print.sim BDgraph ##read data library(foreign) data1=read.dta('C:/Users/NCC/Dropbox/PhD/Data/Tu/Academic stress/data1.dta', missing.type ...

1848 sym R (713 sym/11 pcs) 2 img

mediation analysis in R

19.10.2020

library(mediation) ## Warning: package 'mediation' was built under R version 4.0.3 ## Loading required package: MASS ## Loading required package: Matrix ## Loading required package: mvtnorm ## Warning: package 'mvtnorm' was built under R version 4.0.3 ## Loading required package: sandwich ## Warning: package 'sandwich' was built under R version 4...

2087 sym R (4307 sym/27 pcs)

propensity score matching: example

23.10.2020

https://datascienceplus.com/how-to-use-r-for-matching-samples-propensity-score/ PSA pacman::p_load(knitr, wakefield, MatchIt, tableone, captioner) 0.0.0.1 library(wakefield) 0.1 create sample data and popuation data 0.1.1 sample data set.seed(1234) df.patients <- r_data_frame(n = 250, age(x = 30:78, name = 'Age'), sex(x = c("Male", "Fem...

5421 sym R (2556 sym/16 pcs) 2 img

PSA matching - Tobacco

23.10.2020

library(foreign) data=read.dta("C:/Users/binht/Dropbox/Hue/paper writing/Intention to quit/BAO/dataforR1.dta") mydata=subset(data, select=c("year", "age","job", "educ1" )) https://datascienceplus.com/how-to-use-r-for-matching-samples-propensity-score/ PSA pacman::p_load(knitr, wakefield, MatchIt, tableone, captioner) 0.0.0.1 library(wakefiel...

4842 sym R (2820 sym/31 pcs) 2 img

Task 2 _Dec 2020

01.12.2020

0.0.0.1 Prepare: packages, data library("foreign") library("survival") require("moonBook") ## Loading required package: moonBook ## Warning: package 'moonBook' was built under R version 4.0.3 require("ztable") ## Loading required package: ztable ## Warning: package 'ztable' was built under R version 4.0.3 ## Welcome to package ztable ver 0.2.2...

12460 sym R (48933 sym/125 pcs) 2 img

Table 1- quick make

16.03.2021

0.1 Loading data load(url("http://www.ms.ut.ee/mart/andmeteadus/births.Rdata")) data=births ### Available variables names(births) ## [1] "id" "bweight" "lowbw" "gestwks" "preterm" "matage" "hyp" ## [8] "sex" ### dataset looks like (6 first rows) head(births) ## id bweight lowbw gestwks preterm matage hyp sex ## 1 1 2974 ...

3459 sym R (3641 sym/28 pcs) 1 img 1 tbl