-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
94 lines (69 loc) · 2.31 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
title: "R pacakge: ncarbe"
author: "Sungpil Han"
date: "`r Sys.Date()`"
output:
github_document: default
html_document:
toc: true
df_print: kable
keep_md: true
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
<img src="https://shanmdphd.github.io/hex/ncarbe.png" height="200" alt="ncarbe R package" align="right" />
`NonCompart` 패키지를 사용해서 2x2 생동성시험의 분산분석 등을 손쉽게 해주는 패키지입니다.
지원하는 계산은 다음과 같습니다.
|parameters | statistics|
|---|--------------------------------------------------------------------------------------|
| `AUClast` | Analysis of variance, between and within subject variability, least square means, confidence interval, and sample size |
| `Cmax` | Analysis of variance, between and within subject variability, least square means, confidence interval, and sample size |
| `Tmax` | Wilcoxon Signed-Rank Test and Hodges-Lehmann Estimate |
# 설치
```{r installation, eval = FALSE}
install.packages('devtools')
devtools::install_github('asancpt/ncarbe')
```
# 실행
## 예제 데이타 (시뮬레이션 데이타)
2x2 생동성시험 디자인으로 36명의 데이타를 생성하여 시뮬레이션 한 것입니다. (배균섭 교수님 `pk1coma.R` 사용)
```{r}
file <- system.file('example', 'beConc.csv', package = 'ncarbe')
concData <- read.csv(file, as.is = TRUE)
head(concData)
```
## 자료 탐색
그림을 그려보면 다음과 같습니다.
```{r conctimeplot, message = FALSE, fig.width=8, fig.height = 12}
library(ggplot2)
library(dplyr)
concData %>%
ggplot(aes(x = TIME, y = CONC, group = TRT, color = TRT)) +
geom_line(size = 0.5, alpha = 0.8) +
geom_point(size = 1, alpha = 0.5) +
xlab('Time (hr)') +
ylab('Concentrationg (ng/mL)') +
facet_wrap( ~ SUBJ, ncol = 4)
```
## 생동성 분석
`beNCA()` 함수를 사용하여 분석한 결과입니다.
### method = 'kbe'
```{r }
library(ncarbe)
beNCA(concData) # method = 'kbe'
```
### method = 'nlme'
```{r }
beNCA(concData, method = 'nlme')
```
# Reference
- `r format(citation('NonCompart'), style = 'html')`
- `r format(citation('ncarbe'), style = 'html')`
- `r format(citation('nlme'), style = 'html')`
# devtools::session_info()
```{r}
devtools::session_info()
```