Myeongchan-Kim / Mobile_Doctor

For Mobile Doctor's summer project
1 stars 3 forks source link

저체온증 케이스 분석 #21

Open GY-jung opened 7 years ago

GY-jung commented 7 years ago

저체온증을 겪은 해열제 복용 케이스와 그 6시간안에 측정된 체온 약 만개로 저체온증의 특성을 분석해 보았습니다. 기본적으로 체온이 감소하는 기울기가 매우 낮았고 나이와는 상관없이 발생하며 체중에 비해여 과복용한 경우 발생했습니다. 약의 성분으로 분석했을때는 아세트 아미노펜의 경우 저체온증의 부작용을 일으키는 비율이 전체 통계에 비하여 낮았습니다. p-value도 함께 꼐산 헀습니다 저제온증 케이스 분석.xlsx

GY-jung commented 7 years ago
mg.1 <- mg %>%
  mutate(e_date = paste(d1,d2), f_date = paste(ed1,ed2)) %>%
  select(-d1,-d2,-ed1,-ed2)

mg.t <- merge(mg.1, baby.f, by = c("Aid", "baby_id"),allow.cartesian=TRUE )
mg.t <- mg.t %>%
  mutate(vpw = as.numeric(volume) / as.numeric(weight)) %>%
  filter(!is.na(vpw)) %>%
  filter(vpw <= 100)
mg.t1 <- mg.t %>%
  summarise(mean(vpw))

####저체온증
mg.l <- mg.1 %>%
  group_by(Aid, baby_id, e_date) %>%
  mutate(minf = min(fever))

mg.l1 <- mg.l %>%
  filter(minf <= 35.5)

mg.l1r <- mg.l1 %>%
  group_by(kind) %>%
  summarise(sof = n())

plot(c(1,2), c(3,4),xlim=c(0,21600), ylim = c(-3,1.5), cex = 0.01)
lines(lowess(mg.l1$time_pass, mg.l1$fever_drop), col="red")
lines(lowess(mg$time_pass, mg$fever_drop), col="darkblue")
 which_med_sum(mg.l1)

 mg.l2 <- mg.l1 %>%
   filter(time_pass >= 600)
 mg.2 <- mg %>%
   filter(time_pass >= 600)

 ### ttest for slope
 st <- t.test((mg.l2$fever_drop / mg.l2$time_pass), alternative = "less", mu = mean((mg.2$fever_drop / mg.2$time_pass)), conf.level = 0.95 )

 mg.b <- merge(mg.l1, baby.f, by = c("Aid", "baby_id"),allow.cartesian=TRUE )

 mg.b <- mg.b %>%
   mutate(vpw = as.numeric(volume) / as.numeric(weight)) %>%
   filter(!is.na(vpw)) %>%
   filter(vpw <= 100)
 mg.b1 <- mg.b %>%
   summarise(mean(vpw))

 #validation
 tt <- t.test(mg.b$vpw, alternative = "greater", mu = mean(mg.t$vpw), conf.level = 0.95 )

 #age
 mg.b.1 <- mg.b %>%
   filter(born_to_day >0, born_to_day <= 180)
 mg.b.2 <- mg.b %>%
   filter(born_to_day >180, born_to_day <= 365)
 mg.b.3 <- mg.b %>%
   filter(born_to_day >365, born_to_day <= 365*2)
 mg.b.4 <- mg.b %>%
   filter(born_to_day >365*2, born_to_day <= 365*3)
 mg.b.5 <- mg.b %>%
   filter(born_to_day >365*3, born_to_day <= 365*4)
 mg.b.6 <- mg.b %>%
   filter(born_to_day >365*4, born_to_day <= 365*5)
 mg.b.7 <- mg.b %>%
   filter(born_to_day >365*5)

 mg.t.1 <- mg.t %>%
   filter(born_to_day >0, born_to_day <= 180)
 mg.t.2 <- mg.t %>%
   filter(born_to_day >180, born_to_day <= 365)
 mg.t.3 <- mg.t %>%
   filter(born_to_day >365, born_to_day <= 365*2)
 mg.t.4 <- mg.t %>%
   filter(born_to_day >365*2, born_to_day <= 365*3)
 mg.t.5 <- mg.t %>%
   filter(born_to_day >365*3, born_to_day <= 365*4)
 mg.t.6 <- mg.t %>%
   filter(born_to_day >365*4, born_to_day <= 365*5)
 mg.t.7 <- mg.t %>%
   filter(born_to_day >365*5)

#########
ChanhoPark93 commented 7 years ago

분석해 주셔서 감사합니다. 복용후 10분~1시간/1시간~2시간/2~3시간 을 가지고 기울기를 가지고 분석한 결과가 매우 좋아서 추후 서비스 제공에도 좋을 것 같으며, 논문으로 작성할 만한 가치도 있는 것 같습니다.

Myeongchan-Kim commented 7 years ago

저체온증의 기준을 35.5로 잡았는데, 체온이 적게 나오는 경우, 잘못된 값이 입력되었을 가능성이 매우 큽니다. Outlayer에 대한 처리에 더욱 신경써야 합니다.  지금 케이스 숫자가 전체 케이스의 1%정도가 되는데 이정도면 outlayer에 엄청 많이 흔들리게 되어있어요. 예를들어 35.0도 이하가 나온 경우는 빼는 게 말이 되겠죠? 체온이 34도대가 나왔는데 한가하게 앱에다가 체온 입력하고 있는 부모는 많지 않을것 같아요.

어떤식으로 데이터를 걸러야 할지 좀 더 생각해 볼 필요가 있을것 같습니다.