Skip to content

Commit

Permalink
Merge pull request #20 from PharmCat/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
PharmCat authored Jul 7, 2019
2 parents d98587f + 61d8540 commit e07cdd9
Show file tree
Hide file tree
Showing 12 changed files with 492 additions and 187 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
authors = ["Vladimir Arnautov (mail@pharmcat.net)"]
name = "ClinicalTrialUtilities"
uuid = "535c2557-d7d0-564d-8ff9-4ae146c18cfe"
version = "0.1.11"
version = "0.1.12"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
56 changes: 35 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ The package is designed to perform calculations related to the planning and anal

- [Installation](#Installation)
- [Basic functions](#Basic)
- [Submodules](#Submodules)
- [Usage](#Usage)
- [descriptives](#descriptives)
- [ctSampleN](#ctSampleN)
Expand All @@ -27,6 +26,21 @@ The package is designed to perform calculations related to the planning and anal
- [bePower](#bePower)
- [ci2cv](#ci2cv)
- [pooledCV](#pooledCV)
- [Submodules](#Submodules)
- [CI](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/CI.md)
- [oneProp](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/CI.md#oneProp)
- [oneMean](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/CI.md#oneMean)
- [twoProp](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/CI.md#twoProp)
- [twoMeans](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/CI.md#twoMeans)
- [cmh](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/CI.md#cmh)
- [PK](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/PK.md)
- [nca](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/PK.md#nca)
- [SIM](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/SIM.md)
- [bePower](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/SIM.md#bePower)
- [ctPropPower](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/SIM.md#ctPropPower)
- [ctPropSampleN](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/SIM.md#ctPropSampleN)
- [ctMeansPower](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/SIM.md#ctMeansPower)
- [ctMeansPowerFS](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/SIM.md#ctMeansPowerFS)
- [Types](#Types)
- [Examples](#Examples)
- [Other](#Other)
Expand Down Expand Up @@ -64,26 +78,6 @@ Pkg.test("ClinicalTrialUtilities");

- [Pooled CV from multiple sources](#pooledCV)

### <a name="Submodules">Submodules</a>

* Confidence interval calculation - [Doc](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/CI.md)
* oneProp
* oneMeans
* twoProp
* twoMeans
* cmh

* Pharmacokinetics calculation - [Doc](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/mater/doc/PK.md)
* nca

* Simulations - [Doc](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/SIM.md)
* bePower
* bePowerSIM
* ctPropPower
* ctPropSampleN
* ctMeansPower
* ctMeansPowerFS

### <a name="Usage">Usage</a>

**NB! Hypothesis types:**
Expand Down Expand Up @@ -341,6 +335,26 @@ pooledCV(data::DataFrame; cv=:cv, df=:df, alpha=0.05, returncv=true)::ConfInt
- true - return cv
- false - return var

### <a name="Submodules">Submodules</a>

* Confidence interval calculation - [Doc](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/CI.md)
* oneProp
* oneMeans
* twoProp
* twoMeans
* cmh

* Pharmacokinetics calculation - [Doc](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/mater/doc/PK.md)
* nca

* Simulations - [Doc](https://github.com/PharmCat/ClinicalTrialUtilities.jl/blob/master/doc/SIM.md)
* bePower
* bePowerSIM
* ctPropPower
* ctPropSampleN
* ctMeansPower
* ctMeansPowerFS

### <a name="Types">Types</a>

Confidence intervals
Expand Down
13 changes: 11 additions & 2 deletions cange.log
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
v0.1.12
- nca hotfix
- add test
- add MOVER OR CI
- add MN RR CI
- MN OR - change algo, for old algo use :mn2
- MN Diff - code optimization
- Mee|FM Diff- code optimization
- Code cleaning and cosmetics
- add tests and testdata
- HTML Export function

v0.1.11

- nca hotfix
- add test

- descriptives()
- html export - initial, not final
- StatsBase, Statistics in deps
Expand Down
34 changes: 12 additions & 22 deletions doc/CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,19 @@ CI submodule needs for clinical trial simulations with binomial outcomes, but ca

## Functions

One proportion
- [oneProp](#oneProp) - One proportion

oneProp(x, n; alpha, method)
- [oneMean](#oneMean) - One mean

One mean
- [twoProp](#twoProp) - Two proportions

oneMean(m, s, n, alpha; method)
- [twoMeans](#twoMeans) - Two means

Two proportions
- [cmh](#cmh) - Cochran–Mantel–Haenszel confidence intervals.

twoProp(x1, n1, x2, n2; alpha, type, method)
- [Examples](#Examples)

Two means

twoMeans(m1, s1, n1, m2, s2, n2; alpha, type, method)

Cochran–Mantel–Haenszel confidence intervals.

cmh(data::DataFrame; a = :a, b = :b, c = :c, d = :d, type = :diff, alpha = 0.05, method)

Return result as ConfInt(lower::Float64, upper::Float64, estimate::Float64)

### oneProp
### <a name="oneProp">oneProp</a>

Confidence interval calculation for one proportion.

Expand All @@ -50,7 +40,7 @@ CI.oneProp(x::Int, n::Int; alpha=0.05, method=:wilson)
- arcsine - Arcsine CI;
- wald - Wald CI without CC;

### twoProp
### <a name="twoProp">twoProp</a>

Confidence interval calculation for two proportion.

Expand Down Expand Up @@ -97,7 +87,7 @@ Odd ratio
- woolf - Woolf logit CI
- awoolf - Adjusted Woolf interval (Gart adjusted logit)

### oneMean
### <a name="oneMean">oneMean</a>

Confidence interval for one mean.

Expand All @@ -118,7 +108,7 @@ CI.oneMean(m::Real, s::Real, n::Int, alpha::Real; method=:norm)::ConfInt
- :norm - Normal distribution (default);
- :tdist - T Distribution.

### twoMeans
### <a name="twoMeans">twoMeans</a>

Confidence interval for mean difference.

Expand All @@ -145,7 +135,7 @@ CI.twoMeans(m1::Real, s1::Real, n1::Real, m2::Real, s2::Real, n2::Real; alpha::R
- :ev - equal variance (default);
- :uv - unequal variance with Welch-Satterthwaite df correction.

### cmh
### <a name="cmh">cmh</a>

Cochran–Mantel–Haenszel confidence intervals.

Expand Down Expand Up @@ -205,7 +195,7 @@ For risk difference use:
ci = ClinicalTrialUtilities.CI.cmh(data, alpha = 0.1)
```

## Examples:
## <a name="Examples">Examples</a>

```
ClinicalTrialUtilities.CI.oneProp(81, 263, alpha=0.05, method=:wilson)
Expand Down
6 changes: 6 additions & 0 deletions doc/PK.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Pharmacokinetics module.

## Functions

- [nca](#nca) - Non-noncompartment analysis.

### <a name="nca">nca</a>

Non-noncompartment analysis.

```
nca(data; conc=:Concentration, time=:Time, sort = NaN, calcm = :lint)
```
Expand Down
10 changes: 5 additions & 5 deletions doc/SIM.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@ Proportion simulation sample size

ctPropSampleN(p1, p2, ref; alpha, beta, type, citype, method, simnum, seed)

### bePower
### <a name="bePower">bePower</a>

```
bePower(;alpha=0.05, logscale=true, theta1=0.8, theta2=1.25, theta0=0.95, cv=0.0, n=0, simnum=5, seed=0)
```

### ctPropPower
### <a name="ctPropPower">ctPropPower</a>

```
ctPropPower(p1, n1, p2, n2, diff; alpha=0.05, type=:or, method=:mn, seed=0, simnum=5)
```

### ctPropSampleN
### <a name="ctPropSampleN">ctPropSampleN</a>

```
ctPropSampleN(p1, p2, ref; alpha=0.05, beta=0.2, type=:notdef, citype =:notdef, method=:notdef, simnum=5, seed=0)
```

### ctMeansPower
### <a name="ctMeansPower">ctMeansPower</a>

```
ctMeansPower(m1, s1, n1, m2, s2, n2, ref; alpha=0.05, method=:notdef, simnum=5, seed=0)
```

### tMeansPowerFS
### <a name="ctMeansPowerFS">ctMeansPowerFS</a>

```
ctMeansPowerFS(m1, s1, n1, m2, s2, n2, ref;alpha=0.05, method=:notdef, simnum::Real=5, seed=0)
Expand Down
Loading

3 comments on commit e07cdd9

@PharmCat
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

v0.1.12

  • add MOVER OR CI
  • add MN RR CI
  • MN OR - change algorithm, for old algorithm use :mn2
  • MN Diff - code optimization
  • Mee|FM Diff- code optimization
  • Code cleaning and cosmetics
  • add tests and testdata
  • HTML Export function
  • Frequency initial commit - alpha

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/1858

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.12 -m "<description of version>" e07cdd90cb6f777989fa776819ca961e023a8a06
git push origin v0.1.12

@PharmCat
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TagBot tag

Please sign in to comment.