Data science enhances people’s decision making. Doctors and researchers are making critical decisions every day. Therefore, it is absolutely necessary for those people to have some basic knowledge of data science. This series aims to help people that are around medical field to enhance their data science skills. We will work with a health related […]

## Data science for Doctors: Variable importance Solutions

Below are the solutions to these exercises on principal component analysis. #################### # # # Exercise 1 # # # #################### cor(data$age,data$preg) ## [1] 0.5443412 #################### # # # Exercise 2 # # # #################### plot(data$age,data$preg) #OR ggplot(data,aes(x = age, y = preg))+ geom_count() # we use geom_count() to capture the frequency. #OR ggplot(data,aes(x = […]

## Data science for Doctors: Cluster Analysis Exercises

Data science enhances people’s decision making. Doctors and researchers are making critical decisions every day. Therefore, it is absolutely necessary for those people to have some basic knowledge of data science. This series aims to help people that are around medical field to enhance their data science skills. We will work with a health related […]

## Data science for Doctors: Cluster Analysis Exercises Solutions

Below are the solutions to these exercises on cluster analysis. In order to run the multiplot function , run this script first #################### # # # Exercise 1 # # # #################### p1 <- ggplot(data, aes(mass, age, color = class)) + geom_point()+ scale_colour_gradient(low="green", high="red") p1 #################### # # # Exercise 2 # # # #################### […]

## Data science for Doctors: Inferential Statistics Exercises(Part-5) Solutions

Below are the solutions to these exercises on inferential statistics. #################### # # # Exercise 1 # # # #################### hist(unlist(data["pres"])) #OR ggplot(data, aes(unlist(data["pres"]))) + geom_histogram() #################### # # # Exercise 2 # # # #################### qqnorm(unlist(data["pres"])) qqline(unlist(data["pres"])) #################### # # # Exercise 3 # # # #################### shapiro.test(unlist(data["pres"])) ## ## Shapiro-Wilk normality test ## […]

## Data science for Doctors: Inferential Statistics Exercises(Part-5)

Data science enhances people’s decision making. Doctors and researchers are making critical decisions every day. Therefore, it is absolutely necessary for those people to have some basic knowledge of data science. This series aims to help people that are around medical field to enhance their data science skills. We will work with a health related […]

## Data science for Doctors: Inferential Statistics Exercises(Part-4)

## Data science for Doctors: Inferential Statistics Solutions(Part-4)

Below are the solutions to these exercises on inferential statistics. #################### # # # Exercise 1 # # # #################### f_1 <- rnorm(28,29,3) f_2 <- rnorm(23,29,6) f <- sd(f_1)^2/sd(f_2)^2;f ## [1] 0.253262 #OR f <- var(f_1)/var(f_2); f ## [1] 0.253262 #################### # # # Exercise 2 # # # #################### df_num <- length(f_1)-1; df_num ## […]

## Data science for Doctors: Inferential Statistics Solutions (part-3)

Below are the solutions to these exercises on inferential statistics. #################### # # # Exercise 1 # # # #################### n <- 25 m <- 29 std <- 4 x <- rnorm(n, mean = m, sd = std) t <- sqrt(n)*(mean(x)-mean(data$mass))/sd(x); t ## [1] -3.992123 #################### # # # Exercise 2 # # # #################### […]