课程: Descriptive Healthcare Analytics in R
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Solution: Make a categorical variable from a continuous one - R教程
课程: Descriptive Healthcare Analytics in R
Solution: Make a categorical variable from a continuous one
(upbeat music) - [Instructor] Okay, how did you do on the challenge? Were you able to make the variable BPGrp? I'll show you what I did for the solution. So above the big comment, we have the code we talked about earlier. Actually, let's run that code now so we are up to date. Let me close this histogram so we can see our code. As I said, next we have this big comment just to remind you of the empirical cut points from the AHA, which were the parameters for this challenge. Below that, we get to the code I made to create the categorical variable BPGrp in the data frame BP_A. See these five lines of code? In the first line, I create the variable BPGrp, in the data frame, BP_A and I code the entire variable as nine, meaning don't know in my mind. Next, in the next line, I update that value. As you can see in the brackets, the criteria for our updating the variables value is if BPXOSY1, meaning the systolic blood pressure measurement is less than 120. Remember how that is classified as…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
(已锁定)
Generating the age variables4 分钟 18 秒
-
(已锁定)
Generating the smoking variables4 分钟 36 秒
-
(已锁定)
Finalizing the analytic data set5 分钟 46 秒
-
(已锁定)
What is Table 1?4 分钟 26 秒
-
Reviewing categorical variable distribution6 分钟 15 秒
-
(已锁定)
Reviewing continuous variable distribution6 分钟 29 秒
-
(已锁定)
Challenge: Make a categorical variable from a continuous one5 分钟 40 秒
-
(已锁定)
Solution: Make a categorical variable from a continuous one4 分钟 45 秒
-
(已锁定)
-
-
-