From 76f1b1774850eaa69eef4e6298b4a23e2fe68a41 Mon Sep 17 00:00:00 2001 From: PharmCat Date: Fri, 8 Nov 2019 03:24:37 +0300 Subject: [PATCH] remove old docs --- docs/build/api/index.html | 71 ---- docs/build/assets/arrow.svg | 63 ---- docs/build/assets/documenter.css | 605 ------------------------------- docs/build/assets/documenter.js | 132 ------- docs/build/assets/search.js | 250 ------------- docs/build/details/index.html | 2 - docs/build/examples/index.html | 58 --- docs/build/index.html | 2 - docs/build/search/index.html | 2 - docs/build/search_index.js | 3 - docs/build/struct/index.html | 2 - docs/build/syntax/index.html | 9 - docs/build/testval/index.html | 96 ----- docs/index.html | 1 - 14 files changed, 1296 deletions(-) delete mode 100644 docs/build/api/index.html delete mode 100644 docs/build/assets/arrow.svg delete mode 100644 docs/build/assets/documenter.css delete mode 100644 docs/build/assets/documenter.js delete mode 100644 docs/build/assets/search.js delete mode 100644 docs/build/details/index.html delete mode 100644 docs/build/examples/index.html delete mode 100644 docs/build/index.html delete mode 100644 docs/build/search/index.html delete mode 100644 docs/build/search_index.js delete mode 100644 docs/build/struct/index.html delete mode 100644 docs/build/syntax/index.html delete mode 100644 docs/build/testval/index.html delete mode 100644 docs/index.html diff --git a/docs/build/api/index.html b/docs/build/api/index.html deleted file mode 100644 index 0664be9..0000000 --- a/docs/build/api/index.html +++ /dev/null @@ -1,71 +0,0 @@ - -Api · ReplicateBE

Api

API

ReplicateBE.RBE

ReplicateBE.RBEType.
    struct RBE
-        model::ModelFrame               #Model frame
-        rmodel::ModelFrame              #Random effect model
-        design::Design                  #Design description
-        factors::Array{Symbol, 1}       #Factor list
-        θ0::Array{Float64, 1}           #Initial variance paramethers
-        θ::Tuple{Vararg{Float64}}       #Final variance paramethers
-        reml::Float64                   #-2REML
-        fixed::EffectTable              #Fixed Effect table
-        typeiii::ContrastTable          #Type III table
-        R::Array{Matrix{Float64},1}     #R matrices for each subject
-        V::Array{Matrix{Float64},1}     #V matrices for each subject
-        G::Matrix{Float64}              #G matrix
-        C::Matrix{Float64}              #C var(β) p×p variance-covariance matrix
-        A::Matrix{Float64}              #asymptotic variance-covariance matrix of b θ
-        H::Matrix{Float64}              #Hessian matrix
-        X::Matrix                       #Matrix for fixed effects
-        Z::Matrix                       #Matrix for random effects
-        Xv::Array{Matrix{Float64},1}    #X matrices for each subject
-        Zv::Array{Matrix{Float64},1}    #Z matrices for each subject
-        yv::Array{Array{Float64, 1},1}  #responce vectors for each subject
-        detH::Float64                   #Hessian determinant
-        preoptim::Union{Optim.MultivariateOptimizationResults, Nothing}         #Pre-optimization result object
-        optim::Optim.MultivariateOptimizationResults                            #Optimization result object
-    end

Replicate bioequivalence structure.

ReplicateBE.rbe

ReplicateBE.rbeFunction.
rbe(df; dvar::Symbol,
-    subject::Symbol,
-    formulation::Symbol,
-    period::Symbol,
-    sequence::Symbol,
-    g_tol::Float64 = 1e-8, x_tol::Float64 = 0.0, f_tol::Float64 = 0.0, iterations::Int = 100,
-    store_trace = false, extended_trace = false, show_trace = false,
-    memopt = true)

Mixed model fitting function for replicate bioequivalence without data preparation (apply categorical! for each factor and sort! to dataframe).

Mixed model in matrix form:

\[y = X\beta+Zu+\epsilon\]

math

with covariance matrix for each subject:

\[V_{i} = Z_{i}GZ_i'+R_{i}\]

ReplicateBE.rbe

ReplicateBE.rbe!Function.

This function apply following code for each factor before executing:

    categorical!(df, subject);
-    categorical!(df, formulation);
-    categorical!(df, period);
-    categorical!(df, sequence);
-    sort!(df, [subject, formulation, period])

It can takes more time, but can help to avoid some errors like: "ERROR: type ContinuousTerm has no field contrasts".

StatsBase.coef

StatsBase.coefFunction.
coef(rbe::RBE)

Return model coefficients.

\[\beta = {(\sum_{i=1}^n X_{i}'V_i^{-1}X_{i})}^{-1}(\sum_{i=1}^n X_{i}'V_i^{-1}y_{i})\]

StatsBase.confint

StatsBase.confintFunction.
confint(obj::RBE; level::Real=0.95, expci::Bool = false, inv::Bool = false, df = :sat)

Compute confidence intervals for coefficients, with confidence level level (by default 95%).

Arguments

expci = true: return exponented CI.

inv = true: return -estimate ± t*se

df = :sat: use Satterthwaite DF approximation.

df = :df3 or df = :cont: DF (contain) = N - rank(ZX).

\[CI = stimate ± t(alpha, df)*se\]

StatsBase.dof

StatsBase.dofFunction.
dof(rbe::RBE)

Return the number of degrees of freedom for the coefficients of the model.

StatsBase.stderror

StatsBase.stderrorFunction.
StatsBase.stderror(rbe::RBE)

Return the standard errors for the coefficients of the model.

\[se = \sqrt{LCL'}\]

ReplicateBE.coefnum

ReplicateBE.coefnumFunction.
coefnum(rbe::RBE)

Return number of coefficients (length β).

ReplicateBE.contrast

ReplicateBE.contrastFunction.
contrast(rbe::RBE, L::Matrix; numdf = 1, name = "Contrast", memopt = true)::ContrastTable

Return contrast table for L matrix.

\[F = \frac{\beta'L'(LCL')^{-1}L\beta}{rank(LCL')}\]

DF for one-dimetion case:

\[df = \frac{2(LCL')^{2}}{g'Ag}\]

where $A = 2H$

where $g = \triangledown _{\theta}(LC^{-1}L')$

DF for multi-dimention case:

ReplicateBE.design

ReplicateBE.designFunction.
design(rbe::RBE)::Design

Return design information object, where:

    struct Design
-        obs::Int          # Number of observations
-        subj::Int         # Number of statistica independent subjects
-        sqn::Int          # Number of sequences
-        pn::Int           # Number of periods
-        fn::Int           # Number of formulations
-        sbf::Vector{Int}  # Subjects in each formulation level
-        rankx::Int        # Rank of fixed effect matrix
-        rankxz::Int       # Rank of XZ (fixed+random) effect matrix
-        df2::Int          # subj - sqn         (Robust DF)
-        df3::Int          # obs  - rankxz      (Contain DF for sequence and period)
-        df4::Int          # obs  - rankxz + p
-    end

ReplicateBE.estimate

ReplicateBE.estimateFunction.
estimate(rbe::RBE, L::Matrix; df = :sat, name = "Estimate", memopt = true, alpha = 0.05)

Return estimate table for L 1xp matrix.

\[estimate = L\beta\]
\[se = \sqrt{LCL'}\]
\[t = estimate/se\]

For df = :sat:

\[df = \frac{2(LCL')^{2}}{g'Ag}\]

where $A = 2H$

where $g = \triangledown _{\theta}(LC^{-1}L')$

For df = :cont (contain):

\[df = N - rank(ZX)\]

CI estimate is:

\[CI = stimate ± t(alpha, df)*se \]

ReplicateBE.fixed

ReplicateBE.fixedFunction.
fixed(rbe::RBE)

Return fixed effect table (β).

ReplicateBE.randrbeds

ReplicateBE.randrbedsFunction.
    randrbeds(;n=24, sequence=[1,1],
-        design = ["T" "R" "T" "R"; "R" "T" "R" "T"],
-        inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2],
-        intercept = 0, seqcoef = [0.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [0.0, 0.0],
-        dropsubj = 0.0, dropobs::Int = 0, seed::Int = 0)

Random dataset generation for bioequivalence.

Parameters

* n: number of subjects
-* sequence: distribution in sequences [1,1] means 1:1, [1,3] - 1:4 etc.
-* design: desin matrix, each line is a sequence, each column - periods, cell - formulation id
-* inter: inter-subject variance vector for G matrix (length 3)
-* intra: intra-subject variance vector for R matrix (length 2)
-* intercept: intercept effect value
-* seqcoef: coefficients of sequences (length(sequence) == length(seqcoef) == size(design, 1))
-* periodcoef: coefficients of periods (length(periodcoef) == size(design, 2))
-* formcoef: coeficients of formulations
-* dropobs: number of randomly dropped subjects
-* seed: seed for random

Multivariate normal disribution:

\[f(\mathbf{x}; \boldsymbol{\mu}, \boldsymbol{V}) = \frac{1}{(2 \pi)^{d/2} |\boldsymbol{V}|^{1/2}} -\exp \left( - \frac{1}{2} (\mathbf{x} - \boldsymbol{\mu})^T V^{-1} (\mathbf{x} - \boldsymbol{\mu}) \right)\]

Where V:

\[V_{i} = Z_{i}GZ_i'+R_{i}\]
    randrbeds(n::Int, sequence::Vector,
-        design::Matrix,
-        θinter::Vector, θintra::Vector,
-        intercept::Real, seqcoef::Vector, periodcoef::Vector, formcoef::Vector,
-        dropsubj::Float64, dropobs::Int, seed::Int)

Simple interface.

ReplicateBE.reml2

ReplicateBE.reml2Function.
reml2(rbe::RBE, θ::Array{Float64, 1})

Returm -2REML for rbe model

reml2(rbe::RBE)

Returm -2logREML for rbe model

\[ -logREML(\theta,\beta) = -\frac{N-p}{2} - \frac{1}{2}\sum_{i=1}^nlog|V_{i}|- - --\frac{1}{2}log|\sum_{i=1}^nX_i'V_i^{-1}X_i|-\frac{1}{2}\sum_{i=1}^n(y_i - X_{i}\beta)'V_i^{-1}(y_i - X_{i}\beta)\]

ReplicateBE.typeiii

ReplicateBE.typeiiiFunction.
typeiii(rbe::RBE)

Return TYPE III table.

see contrast

diff --git a/docs/build/assets/arrow.svg b/docs/build/assets/arrow.svg deleted file mode 100644 index ee2798d..0000000 --- a/docs/build/assets/arrow.svg +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/docs/build/assets/documenter.css b/docs/build/assets/documenter.css deleted file mode 100644 index d1f8049..0000000 --- a/docs/build/assets/documenter.css +++ /dev/null @@ -1,605 +0,0 @@ -/* - * The default CSS style for Documenter.jl generated sites - * - * Heavily inspired by the Julia Sphinx theme - * https://github.com/JuliaLang/JuliaDoc - * which extends the sphinx_rtd_theme - * https://github.com/snide/sphinx_rtd_theme - * - * Part of Documenter.jl - * https://github.com/JuliaDocs/Documenter.jl - * - * License: MIT - */ - -/* fonts */ -body, input { - font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif; - font-size: 16px; - color: #222; - text-rendering: optimizeLegibility; -} - -pre, code, kbd { - font-family: 'Roboto Mono', Monaco, courier, monospace; - font-size: 0.90em; -} - -pre code { - font-size: 1em; -} - -a { - color: #2980b9; - text-decoration: none; -} - -a:hover { - color: #3091d1; -} - -a:visited { - color: #9b59b6; -} - -body { - line-height: 1.5; -} - -h1 { - font-size: 1.75em; -} - -/* Unless the

the is very first thing on the page (i.e. the second element - * in the
, * after the
, we add some additional styling to it - * to make it stand out a bit more. This way we get a reasonable fallback if CSS3 - * selectors are not supported in the browser. - */ -article > h1:not(:nth-child(2)) { - margin: 2.5em 0 0; - padding-bottom: 0.30em; - border-bottom: 1px solid #e5e5e5; -} -h2 { - font-size: 1.50em; - margin: 2.3em 0 0; - padding-bottom: 0.25em; - border-bottom: 1px solid #e5e5e5; -} -h3 { - font-size: 1.25em; - margin: 2.0em 0 0; -} -h4 { font-size: 1.15em; } -h5 { font-size: 1.10em; } -h6 { font-size: 1em; } - -h4, h5, h6 { - margin-top: 1.5em; - margin-bottom: 1em; -} - -img { - max-width: 100%; -} - -video { - max-width: 100%; -} - -table { - border-collapse: collapse; - margin: 1em 0; -} - -th, td { - border: 1px solid #e1e4e5; - padding: 0.5em 1em; -} - -th { - border-bottom-width: 2px; -} - -tr:nth-child(even) { - background-color: #f3f6f6; -} - -hr { - border: 0; - border-top: 1px solid #e5e5e5; -} - -/* Inline code and code blocks */ - -code { - padding: 0.1em; - background-color: rgba(0,0,0,.04); - border-radius: 3px; -} - -pre { - background-color: #f5f5f5; - border: 1px solid #dddddd; - border-radius: 3px; - padding: 0.5em; - overflow: auto; -} - -pre code { - padding: 0; - background-color: initial; -} - -kbd { - font-size: 0.70em; - display: inline-block; - padding: 0.1em 0.5em 0.4em 0.5em; - line-height: 1.0em; - color: #444d56; - vertical-align: middle; - background-color: #fafbfc; - border: solid 1px #c6cbd1; - border-bottom-color: #959da5; - border-radius: 3px; - box-shadow: inset 0 -1px 0 #959da5; -} - -/* Headers in admonitions and docstrings */ -.admonition h1, -article section.docstring h1 { - font-size: 1.25em; -} - -.admonition h2, -article section.docstring h2 { - font-size: 1.10em; -} - -.admonition h3, -.admonition h4, -.admonition h5, -.admonition h6, -article section.docstring h3, -article section.docstring h4, -article section.docstring h5, -article section.docstring h6 { - font-size: 1em; -} - -/* Navigation */ -nav.toc { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 20em; - display: flex; - flex-flow: column nowrap; - overflow-y: auto; - padding: 1em 0 0 0; - background-color: #fcfcfc; - box-shadow: inset -14px 0px 5px -12px rgb(210,210,210); -} - -nav.toc .logo { - margin: 0 auto; - display: block; - max-height: 6em; - max-width: 18em; -} - -nav.toc h1 { - text-align: center; - margin-top: .57em; - margin-bottom: 0; -} - -nav.toc select { - display: block; - height: 2em; - flex-shrink: 0; - padding: 0 1.6em 0 1em; - min-width: 7em; - max-width: 90%; - max-width: calc(100% - 5em); - margin: 0 auto; - font-size: .83em; - border: 1px solid #c9c9c9; - border-radius: 1em; - - /* TODO: doesn't seem to be centered on Safari */ - text-align: center; - text-align-last: center; - - appearance: none; - -moz-appearance: none; - -webkit-appearance: none; - - background: white url("arrow.svg"); - background-size: 1.155em; - background-repeat: no-repeat; - background-position: right; -} - -nav.toc select:hover { - border: 1px solid #a0a0a0; -} - -nav.toc select option { - text-align: center; -} - -nav.toc input { - display: block; - height: 2em; - width: 90%; - width: calc(100% - 5em); - margin: 1.2em auto; - padding: 0 1em; - border: 1px solid #c9c9c9; - border-radius: 1em; - font-size: .83em; -} - -nav.toc > ul * { - margin: 0; -} - -nav.toc > ul { - min-height: 2em; - overflow-y: auto; - margin: 0; -} - -nav.toc > ul > li:last-child { - padding-bottom: 1em; -} - -nav.toc ul { - color: #404040; - padding: 0; - list-style: none; -} - -nav.toc ul .toctext { - color: inherit; - display: block; -} - -nav.toc ul a:hover { - color: #fcfcfc; - background-color: #4e4a4a; -} - -nav.toc ul.internal a { - color: inherit; - display: block; -} - -nav.toc ul.internal a:hover { - background-color: #d6d6d6; -} - -nav.toc ul.internal { - background-color: #e3e3e3; - box-shadow: inset -14px 0px 5px -12px rgb(210,210,210); - list-style: none; -} - -nav.toc ul.internal li.toplevel { - border-top: 1px solid #909090; - font-weight: bold; -} - -nav.toc ul.internal li.toplevel:first-child { - border-top: none; -} - -nav.toc .toctext { - padding-top: 0.3em; - padding-bottom: 0.3em; - padding-right: 1em; -} - -nav.toc ul .toctext { - padding-left: 1em; -} - -nav.toc ul ul .toctext { - padding-left: 2em; -} - -nav.toc ul ul ul .toctext { - padding-left: 3em; -} - -nav.toc li.current > .toctext { - border-top: 1px solid #c9c9c9; - border-bottom: 1px solid #c9c9c9; - color: #404040; - font-weight: bold; - background-color: white; -} - -nav.toc ul::-webkit-scrollbar { - width: .4em; - background: none; -} - -nav.toc ul::-webkit-scrollbar-thumb { - border-radius: 5px; - background: #c9c9c9; -} - -nav.toc ul::-webkit-scrollbar-thumb:hover { - border-radius: 5px; - background: #aaaaaa; -} - -article { - margin-left: 20em; - min-width: 20em; - max-width: 48em; - padding: 2em; -} - -article > header {} - -article > header div#topbar { - display: none; -} - -article > header nav ul { - display: inline-block; - list-style: none; - margin: 0; - padding: 0; -} - -article > header nav li { - display: inline-block; - padding-right: 0.2em; -} - -article > header nav li:before { - content: "»"; - padding-right: 0.2em; -} - -article > header .edit-page { - float: right; -} - -article > footer {} - -article > footer a.prev { - float: left; -} -article > footer a.next { - float: right; -} - -article > footer a .direction:after { - content: ": "; -} - -article hr { - margin: 1em 0; -} - -article section.docstring { - border: 1px solid #ddd; - margin: 0.5em 0; - padding: 0.5em; - border-radius: 3px; -} - -article section.docstring .docstring-header { - margin-bottom: 1em; -} - -article section.docstring .docstring-binding { - color: #333; - font-weight: bold; -} - -article section.docstring .docstring-category { - font-style: italic; -} - -article section.docstring a.source-link { - display: block; - font-weight: bold; -} - -.nav-anchor, -.nav-anchor:hover, -.nav-anchor:visited { - color: #333; -} - -/* - * Admonitions - * - * Colors (title, body) - * warning: #f0b37e #ffedcc (orange) - * note: #6ab0de #e7f2fa (blue) - * tip: #1abc9c #dbfaf4 (green) -*/ -.admonition { - border-radius: 3px; - background-color: #eeeeee; - margin: 1em 0; -} - -.admonition-title { - border-radius: 3px 3px 0 0; - background-color: #9b9b9b; - padding: 0.15em 0.5em; -} - -.admonition-text { - padding: 0.5em; -} - -.admonition-text > :first-child { - margin-top: 0; -} - -.admonition-text > :last-child { - margin-bottom: 0; -} - -.admonition > .admonition-title:before { - font-family: "FontAwesome"; - margin-right: 5px; - content: "\f06a"; -} - -.admonition.warning > .admonition-title { - background-color: #f0b37e; -} - -.admonition.warning { - background-color: #ffedcc; -} - -.admonition.note > .admonition-title { - background-color: #6ab0de; -} - -.admonition.note { - background-color: #e7f2fa; -} - -.admonition.tip > .admonition-title { - background-color: #1abc9c; -} - -.admonition.tip { - background-color: #dbfaf4; -} - - -/* footnotes */ -.footnote { - padding-left: 0.8em; - border-left: 2px solid #ccc; -} - -/* Search page */ -#search-results .category { - font-size: smaller; -} - -/* Overriding the block style of highligh.js. - * We have to override the padding and the background-color, since we style this - * part ourselves. Specifically, we style the
 surrounding the , while
- * highlight.js applies the .hljs style directly to the  tag.
- */
-.hljs {
-    background-color: transparent;
-    padding: 0;
-}
-
-@media only screen and (max-width: 768px) {
-    nav.toc {
-        position: fixed;
-        width: 16em;
-        left: -16em;
-        -webkit-overflow-scrolling: touch;
-        -webkit-transition-property: left; /* Safari */
-        -webkit-transition-duration: 0.3s; /* Safari */
-        transition-property: left;
-        transition-duration: 0.3s;
-        -webkit-transition-timing-function: ease-out; /* Safari */
-        transition-timing-function: ease-out;
-        z-index: 2;
-        box-shadow: 5px 0px 5px 0px rgb(210,210,210);
-    }
-
-    nav.toc.show {
-        left: 0;
-    }
-
-    article {
-        margin-left: 0;
-        padding: 3em 0.9em 0 0.9em; /* top right bottom left */
-        overflow-wrap: break-word;
-    }
-
-    article > header {
-        position: fixed;
-        left: 0;
-        z-index: 1;
-    }
-
-    article > header nav, hr {
-        display: none;
-    }
-
-    article > header div#topbar {
-        display: block; /* is mobile */
-        position: fixed;
-        width: 100%;
-        height: 1.5em;
-        padding-top: 1em;
-        padding-bottom: 1em;
-        background-color: #fcfcfc;
-        box-shadow: 0 1px 3px rgba(0,0,0,.26);
-        top: 0;
-        -webkit-transition-property: top; /* Safari */
-        -webkit-transition-duration: 0.3s; /* Safari */
-        transition-property: top;
-        transition-duration: 0.3s;
-    }
-
-    article > header div#topbar.headroom--unpinned.headroom--not-top.headroom--not-bottom {
-        top: -4em;
-        -webkit-transition-property: top; /* Safari */
-        -webkit-transition-duration: 0.7s; /* Safari */
-        transition-property: top;
-        transition-duration: 0.7s;
-    }
-
-    article > header div#topbar span {
-        width: 80%;
-        height: 1.5em;
-        margin-top: -0.1em;
-        margin-left: 0.9em;
-        font-size: 1.2em;
-        overflow: hidden;
-    }
-
-    article > header div#topbar a.fa-bars {
-        float: right;
-        padding: 0.6em;
-        margin-top: -0.6em;
-        margin-right: 0.3em;
-        font-size: 1.5em;
-    }
-
-    article > header div#topbar a.fa-bars:visited {
-        color: #3091d1;
-    }
-
-    article table {
-        overflow-x: auto;
-        display: block;
-    }
-
-    article div.MathJax_Display {
-        overflow: scroll;
-    }
-
-    article span.MathJax {
-        overflow: hidden;
-    }
-}
-
-@media only screen and (max-width: 320px) {
-    body {
-        font-size: 15px;
-    }
-}
diff --git a/docs/build/assets/documenter.js b/docs/build/assets/documenter.js
deleted file mode 100644
index 761ae29..0000000
--- a/docs/build/assets/documenter.js
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Part of Documenter.jl
- *     https://github.com/JuliaDocs/Documenter.jl
- *
- * License: MIT
- */
-
-requirejs.config({
-    paths: {
-        'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min',
-        'jqueryui': 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/jquery-ui.min',
-        'headroom': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.3/headroom.min',
-        'mathjax': 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML',
-        'highlight': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min',
-        'highlight-julia': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/julia.min',
-        'highlight-julia-repl': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/julia-repl.min',
-    },
-    shim: {
-        'mathjax' : {
-            exports: "MathJax"
-        },
-        'highlight-julia': ['highlight'],
-        'highlight-julia-repl': ['highlight'],
-    }
-});
-
-// Load MathJax
-require(['mathjax'], function(MathJax) {
-    MathJax.Hub.Config({
-      "tex2jax": {
-        inlineMath: [['$','$'], ['\\(','\\)']],
-        processEscapes: true
-      }
-    });
-    MathJax.Hub.Config({
-      config: ["MMLorHTML.js"],
-      jax: [
-        "input/TeX",
-        "output/HTML-CSS",
-        "output/NativeMML"
-      ],
-      extensions: [
-        "MathMenu.js",
-        "MathZoom.js",
-        "TeX/AMSmath.js",
-        "TeX/AMSsymbols.js",
-        "TeX/autobold.js",
-        "TeX/autoload-all.js"
-      ]
-    });
-    MathJax.Hub.Config({
-      TeX: { equationNumbers: { autoNumber: "AMS" } }
-    });
-})
-
-require(['jquery', 'highlight', 'highlight-julia', 'highlight-julia-repl'], function($, hljs) {
-    $(document).ready(function() {
-        hljs.initHighlighting();
-    })
-
-})
-
-// update the version selector with info from the siteinfo.js and ../versions.js files
-require(['jquery'], function($) {
-    $(document).ready(function() {
-        var version_selector = $("#version-selector");
-
-        // add the current version to the selector based on siteinfo.js, but only if the selector is empty
-        if (typeof DOCUMENTER_CURRENT_VERSION !== 'undefined' && $('#version-selector > option').length == 0) {
-            var option = $("");
-            version_selector.append(option);
-        }
-
-        if (typeof DOC_VERSIONS !== 'undefined') {
-            var existing_versions = $('#version-selector > option');
-            var existing_versions_texts = existing_versions.map(function(i,x){return x.text});
-            DOC_VERSIONS.forEach(function(each) {
-                var version_url = documenterBaseURL + "/../" + each;
-                var existing_id = $.inArray(each, existing_versions_texts);
-                // if not already in the version selector, add it as a new option,
-                // otherwise update the old option with the URL and enable it
-                if (existing_id == -1) {
-                    var option = $("");
-                    version_selector.append(option);
-                } else {
-                    var option = existing_versions[existing_id];
-                    option.value = version_url;
-                    option.disabled = false;
-                }
-            });
-        }
-
-        // only show the version selector if the selector has been populated
-        if ($('#version-selector > option').length > 0) {
-            version_selector.css("visibility", "visible");
-        }
-
-        // Scroll the navigation bar to the currently selected menu item
-        $("nav.toc > ul").get(0).scrollTop = $(".current").get(0).offsetTop - $("nav.toc > ul").get(0).offsetTop;
-    })
-
-})
-
-// mobile
-require(['jquery', 'headroom'], function($, Headroom) {
-    $(document).ready(function() {
-        var navtoc = $("nav.toc");
-        $("nav.toc li.current a.toctext").click(function() {
-            navtoc.toggleClass('show');
-        });
-        $("article > header div#topbar a.fa-bars").click(function(ev) {
-            ev.preventDefault();
-            navtoc.toggleClass('show');
-            if (navtoc.hasClass('show')) {
-                var title = $("article > header div#topbar span").text();
-                $("nav.toc ul li a:contains('" + title + "')").focus();
-            }
-        });
-        $("article#docs").bind('click', function(ev) {
-            if ($(ev.target).is('div#topbar a.fa-bars')) {
-                return;
-            }
-            if (navtoc.hasClass('show')) {
-                navtoc.removeClass('show');
-            }
-        });
-        if ($("article > header div#topbar").css('display') == 'block') {
-            var headroom = new Headroom(document.querySelector("article > header div#topbar"), {"tolerance": {"up": 10, "down": 10}});
-            headroom.init();
-        }
-    })
-})
diff --git a/docs/build/assets/search.js b/docs/build/assets/search.js
deleted file mode 100644
index 5d32c3a..0000000
--- a/docs/build/assets/search.js
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Part of Documenter.jl
- *     https://github.com/JuliaDocs/Documenter.jl
- *
- * License: MIT
- */
-
-// parseUri 1.2.2
-// (c) Steven Levithan 
-// MIT License
-function parseUri (str) {
-	var	o   = parseUri.options,
-		m   = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
-		uri = {},
-		i   = 14;
-
-	while (i--) uri[o.key[i]] = m[i] || "";
-
-	uri[o.q.name] = {};
-	uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
-		if ($1) uri[o.q.name][$1] = $2;
-	});
-
-	return uri;
-};
-parseUri.options = {
-	strictMode: false,
-	key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
-	q:   {
-		name:   "queryKey",
-		parser: /(?:^|&)([^&=]*)=?([^&]*)/g
-	},
-	parser: {
-		strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
-		loose:  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
-	}
-};
-
-requirejs.config({
-    paths: {
-        'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min',
-        'lunr': 'https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.3.5/lunr.min',
-        'lodash': 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.min',
-    }
-});
-
-var currentScript = document.currentScript;
-
-require(["jquery", "lunr", "lodash"], function($, lunr, _) {
-    $("#search-form").submit(function(e) {
-        e.preventDefault()
-    })
-
-    // list below is the lunr 2.1.3 list minus the intersect with names(Base)
-    // (all, any, get, in, is, which) and (do, else, for, let, where, while, with)
-    // ideally we'd just filter the original list but it's not available as a variable
-    lunr.stopWordFilter = lunr.generateStopWordFilter([
-        'a',
-        'able',
-        'about',
-        'across',
-        'after',
-        'almost',
-        'also',
-        'am',
-        'among',
-        'an',
-        'and',
-        'are',
-        'as',
-        'at',
-        'be',
-        'because',
-        'been',
-        'but',
-        'by',
-        'can',
-        'cannot',
-        'could',
-        'dear',
-        'did',
-        'does',
-        'either',
-        'ever',
-        'every',
-        'from',
-        'got',
-        'had',
-        'has',
-        'have',
-        'he',
-        'her',
-        'hers',
-        'him',
-        'his',
-        'how',
-        'however',
-        'i',
-        'if',
-        'into',
-        'it',
-        'its',
-        'just',
-        'least',
-        'like',
-        'likely',
-        'may',
-        'me',
-        'might',
-        'most',
-        'must',
-        'my',
-        'neither',
-        'no',
-        'nor',
-        'not',
-        'of',
-        'off',
-        'often',
-        'on',
-        'only',
-        'or',
-        'other',
-        'our',
-        'own',
-        'rather',
-        'said',
-        'say',
-        'says',
-        'she',
-        'should',
-        'since',
-        'so',
-        'some',
-        'than',
-        'that',
-        'the',
-        'their',
-        'them',
-        'then',
-        'there',
-        'these',
-        'they',
-        'this',
-        'tis',
-        'to',
-        'too',
-        'twas',
-        'us',
-        'wants',
-        'was',
-        'we',
-        'were',
-        'what',
-        'when',
-        'who',
-        'whom',
-        'why',
-        'will',
-        'would',
-        'yet',
-        'you',
-        'your'
-        ])
-
-    // add . as a separator, because otherwise "title": "Documenter.Anchors.add!"
-    // would not find anything if searching for "add!", only for the entire qualification
-    lunr.tokenizer.separator = /[\s\-\.]+/
-
-    // custom trimmer that doesn't strip @ and !, which are used in julia macro and function names
-    lunr.trimmer = function (token) {
-        return token.update(function (s) {
-            return s.replace(/^[^a-zA-Z0-9@!]+/, '').replace(/[^a-zA-Z0-9@!]+$/, '')
-        })
-    }
-
-    lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'juliaStopWordFilter')
-    lunr.Pipeline.registerFunction(lunr.trimmer, 'juliaTrimmer')
-
-    var index = lunr(function () {
-        this.ref('location')
-        this.field('title')
-        this.field('text')
-        documenterSearchIndex['docs'].forEach(function(e) {
-            this.add(e)
-        }, this)
-    })
-    var store = {}
-
-    documenterSearchIndex['docs'].forEach(function(e) {
-        store[e.location] = {title: e.title, category: e.category}
-    })
-
-    $(function(){
-        function update_search(querystring) {
-            tokens = lunr.tokenizer(querystring)
-            results = index.query(function (q) {
-                tokens.forEach(function (t) {
-                    q.term(t.toString(), {
-                        fields: ["title"],
-                        boost: 100,
-                        usePipeline: false,
-                        editDistance: 0,
-                        wildcard: lunr.Query.wildcard.NONE
-                    })
-                    q.term(t.toString(), {
-                        fields: ["title"],
-                        boost: 10,
-                        usePipeline: false,
-                        editDistance: 2,
-                        wildcard: lunr.Query.wildcard.NONE
-                    })
-                    q.term(t.toString(), {
-                        fields: ["text"],
-                        boost: 1,
-                        usePipeline: true,
-                        editDistance: 0,
-                        wildcard: lunr.Query.wildcard.NONE
-                    })
-                })
-            })
-            $('#search-info').text("Number of results: " + results.length)
-            $('#search-results').empty()
-            results.forEach(function(result) {
-                data = store[result.ref]
-                link = $('')
-                link.text(data.title)
-                link.attr('href', documenterBaseURL+'/'+result.ref)
-                cat = $('('+data.category+')')
-                li = $('
  • ').append(link).append(" ").append(cat) - $('#search-results').append(li) - }) - } - - function update_search_box() { - querystring = $('#search-query').val() - update_search(querystring) - } - - $('#search-query').keyup(_.debounce(update_search_box, 250)) - $('#search-query').change(update_search_box) - - search_query_uri = parseUri(window.location).queryKey["q"] - if(search_query_uri !== undefined) { - search_query = decodeURIComponent(search_query_uri.replace(/\+/g, '%20')) - $("#search-query").val(search_query) - } - update_search_box(); - }) -}) diff --git a/docs/build/details/index.html b/docs/build/details/index.html deleted file mode 100644 index 0b0727b..0000000 --- a/docs/build/details/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Details · ReplicateBE diff --git a/docs/build/examples/index.html b/docs/build/examples/index.html deleted file mode 100644 index 7baf372..0000000 --- a/docs/build/examples/index.html +++ /dev/null @@ -1,58 +0,0 @@ - -Examples · ReplicateBE

    Examples

    Examples

    using CSV, DataFrames, ReplicateBE
    -
    -#Load Dataframe...
    -
    -df=CSV.read(IOBuffer("""subject,sequence,period,formulation,var
    -1,1,1,1,1.0
    -1,1,2,2,1.1
    -1,1,3,1,1.2
    -1,1,4,2,1.3
    -2,1,1,1,2.0
    -2,1,2,2,2.1
    -2,1,3,1,2.4
    -2,1,4,2,2.2
    -3,2,1,2,1.3
    -3,2,2,1,1.5
    -3,2,3,2,1.6
    -3,2,4,1,1.4
    -4,2,1,2,1.5
    -4,2,2,1,1.7
    -4,2,3,2,1.3
    -4,2,4,1,1.4
    -5,2,1,2,1.5
    -5,2,2,1,1.7
    -5,2,3,2,1.2
    -5,2,4,1,1.8""")) |> DataFrame
    -
    -#Execute BE
    -
    -be = ReplicateBE.rbe!(df, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
    -
    -#Get fixed effect object
    -
    -ReplicateBE.fixed(be)
    -
    -#Get Type III object
    -
    -ReplicateBE.typeiii(be)
    -
    -#Get model coefficients
    -
    -coef(be)
    -
    -#Get Standard Error for coefficients
    -
    -ReplicateBE.coefse(be)
    -
    -#Get confidence intervals
    -
    -ReplicateBE.confint(be, 0.1, expci = false, inv = false)
    -
    -#Get -2 REML for model
    -
    -ReplicateBE.reml2(be)
    -
    -#Design information
    -
    -ReplicateBE.design(be)
    diff --git a/docs/build/index.html b/docs/build/index.html deleted file mode 100644 index 6e3b496..0000000 --- a/docs/build/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Home · ReplicateBE diff --git a/docs/build/search/index.html b/docs/build/search/index.html deleted file mode 100644 index 708310d..0000000 --- a/docs/build/search/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Search · ReplicateBE

    Search

    Search

    Number of results: loading...

      diff --git a/docs/build/search_index.js b/docs/build/search_index.js deleted file mode 100644 index a1ac55e..0000000 --- a/docs/build/search_index.js +++ /dev/null @@ -1,3 +0,0 @@ -var documenterSearchIndex = {"docs": -[{"location":"struct/#Structures-1","page":"Structures","title":"Structures","text":"","category":"section"},{"location":"struct/#ReplicateBE.RBE-1","page":"Structures","title":"ReplicateBE.RBE","text":"","category":"section"},{"location":"struct/#","page":"Structures","title":"Structures","text":"ReplicateBE.RBE","category":"page"},{"location":"struct/#ReplicateBE.ContrastTable-1","page":"Structures","title":"ReplicateBE.ContrastTable","text":"","category":"section"},{"location":"struct/#","page":"Structures","title":"Structures","text":"ReplicateBE.ContrastTable","category":"page"},{"location":"struct/#ReplicateBE.Design-1","page":"Structures","title":"ReplicateBE.Design","text":"","category":"section"},{"location":"struct/#","page":"Structures","title":"Structures","text":"ReplicateBE.Design","category":"page"},{"location":"struct/#ReplicateBE.EffectTable-1","page":"Structures","title":"ReplicateBE.EffectTable","text":"","category":"section"},{"location":"struct/#","page":"Structures","title":"Structures","text":"ReplicateBE.EffectTable","category":"page"},{"location":"struct/#ReplicateBE.EstimateTable-1","page":"Structures","title":"ReplicateBE.EstimateTable","text":"","category":"section"},{"location":"struct/#","page":"Structures","title":"Structures","text":"ReplicateBE.EstimateTable","category":"page"},{"location":"api/#API-1","page":"Api","title":"API","text":"","category":"section"},{"location":"api/#ReplicateBE.RBE-1","page":"Api","title":"ReplicateBE.RBE","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"ReplicateBE.RBE","category":"page"},{"location":"api/#ReplicateBE.RBE","page":"Api","title":"ReplicateBE.RBE","text":" struct RBE\n model::ModelFrame #Model frame\n rmodel::ModelFrame #Random effect model\n design::Design #Design description\n factors::Array{Symbol, 1} #Factor list\n θ0::Array{Float64, 1} #Initial variance paramethers\n θ::Tuple{Vararg{Float64}} #Final variance paramethers\n reml::Float64 #-2REML\n fixed::EffectTable #Fixed Effect table\n typeiii::ContrastTable #Type III table\n R::Array{Matrix{Float64},1} #R matrices for each subject\n V::Array{Matrix{Float64},1} #V matrices for each subject\n G::Matrix{Float64} #G matrix\n C::Matrix{Float64} #C var(β) p×p variance-covariance matrix\n A::Matrix{Float64} #asymptotic variance-covariance matrix of b θ\n H::Matrix{Float64} #Hessian matrix\n X::Matrix #Matrix for fixed effects\n Z::Matrix #Matrix for random effects\n Xv::Array{Matrix{Float64},1} #X matrices for each subject\n Zv::Array{Matrix{Float64},1} #Z matrices for each subject\n yv::Array{Array{Float64, 1},1} #responce vectors for each subject\n detH::Float64 #Hessian determinant\n preoptim::Union{Optim.MultivariateOptimizationResults, Nothing} #Pre-optimization result object\n optim::Optim.MultivariateOptimizationResults #Optimization result object\n end\n\nReplicate bioequivalence structure.\n\n\n\n\n\n","category":"type"},{"location":"api/#ReplicateBE.rbe-1","page":"Api","title":"ReplicateBE.rbe","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"ReplicateBE.rbe","category":"page"},{"location":"api/#ReplicateBE.rbe","page":"Api","title":"ReplicateBE.rbe","text":"rbe(df; dvar::Symbol,\n subject::Symbol,\n formulation::Symbol,\n period::Symbol,\n sequence::Symbol,\n g_tol::Float64 = 1e-8, x_tol::Float64 = 0.0, f_tol::Float64 = 0.0, iterations::Int = 100,\n store_trace = false, extended_trace = false, show_trace = false,\n memopt = true)\n\nMixed model fitting function for replicate bioequivalence without data preparation (apply categorical! for each factor and sort! to dataframe).\n\nMixed model in matrix form:\n\ny = Xbeta+Zu+epsilon\n\nmath\n\nwith covariance matrix for each subject:\n\nV_i = Z_iGZ_i+R_i\n\n\n\n\n\n","category":"function"},{"location":"api/#ReplicateBE.rbe-2","page":"Api","title":"ReplicateBE.rbe","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"ReplicateBE.rbe!","category":"page"},{"location":"api/#ReplicateBE.rbe!","page":"Api","title":"ReplicateBE.rbe!","text":"This function apply following code for each factor before executing:\n\n categorical!(df, subject);\n categorical!(df, formulation);\n categorical!(df, period);\n categorical!(df, sequence);\n sort!(df, [subject, formulation, period])\n\nIt can takes more time, but can help to avoid some errors like: \"ERROR: type ContinuousTerm has no field contrasts\".\n\n\n\n\n\n","category":"function"},{"location":"api/#StatsBase.coef-1","page":"Api","title":"StatsBase.coef","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"coef","category":"page"},{"location":"api/#StatsBase.coef","page":"Api","title":"StatsBase.coef","text":"coef(rbe::RBE)\n\nReturn model coefficients.\n\nbeta = (sum_i=1^n X_iV_i^-1X_i)^-1(sum_i=1^n X_iV_i^-1y_i)\n\n\n\n\n\n","category":"function"},{"location":"api/#StatsBase.confint-1","page":"Api","title":"StatsBase.confint","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"confint","category":"page"},{"location":"api/#StatsBase.confint","page":"Api","title":"StatsBase.confint","text":"confint(obj::RBE; level::Real=0.95, expci::Bool = false, inv::Bool = false, df = :sat)\n\nCompute confidence intervals for coefficients, with confidence level level (by default 95%).\n\nArguments\n\nexpci = true: return exponented CI.\n\ninv = true: return -estimate ± t*se\n\ndf = :sat: use Satterthwaite DF approximation.\n\ndf = :df3 or df = :cont: DF (contain) = N - rank(ZX).\n\nCI = stimate t(alpha df)*se\n\n\n\n\n\n","category":"function"},{"location":"api/#StatsBase.dof-1","page":"Api","title":"StatsBase.dof","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"dof","category":"page"},{"location":"api/#StatsBase.dof","page":"Api","title":"StatsBase.dof","text":"dof(rbe::RBE)\n\nReturn the number of degrees of freedom for the coefficients of the model.\n\n\n\n\n\n","category":"function"},{"location":"api/#StatsBase.stderror-1","page":"Api","title":"StatsBase.stderror","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"stderror","category":"page"},{"location":"api/#StatsBase.stderror","page":"Api","title":"StatsBase.stderror","text":"StatsBase.stderror(rbe::RBE)\n\nReturn the standard errors for the coefficients of the model.\n\nse = sqrtLCL\n\n\n\n\n\n","category":"function"},{"location":"api/#ReplicateBE.coefnum-1","page":"Api","title":"ReplicateBE.coefnum","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"ReplicateBE.coefnum","category":"page"},{"location":"api/#ReplicateBE.coefnum","page":"Api","title":"ReplicateBE.coefnum","text":"coefnum(rbe::RBE)\n\nReturn number of coefficients (length β).\n\n\n\n\n\n","category":"function"},{"location":"api/#ReplicateBE.contrast-1","page":"Api","title":"ReplicateBE.contrast","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"ReplicateBE.contrast","category":"page"},{"location":"api/#ReplicateBE.contrast","page":"Api","title":"ReplicateBE.contrast","text":"contrast(rbe::RBE, L::Matrix; numdf = 1, name = \"Contrast\", memopt = true)::ContrastTable\n\nReturn contrast table for L matrix.\n\nF = fracbetaL(LCL)^-1Lbetarank(LCL)\n\nDF for one-dimetion case:\n\ndf = frac2(LCL)^2gAg\n\nwhere A = 2H\n\nwhere g = triangledown _theta(LC^-1L)\n\nDF for multi-dimention case:\n\n\n\n\n\n","category":"function"},{"location":"api/#ReplicateBE.design-1","page":"Api","title":"ReplicateBE.design","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"ReplicateBE.design","category":"page"},{"location":"api/#ReplicateBE.design","page":"Api","title":"ReplicateBE.design","text":"design(rbe::RBE)::Design\n\nReturn design information object, where:\n\n struct Design\n obs::Int # Number of observations\n subj::Int # Number of statistica independent subjects\n sqn::Int # Number of sequences\n pn::Int # Number of periods\n fn::Int # Number of formulations\n sbf::Vector{Int} # Subjects in each formulation level\n rankx::Int # Rank of fixed effect matrix\n rankxz::Int # Rank of XZ (fixed+random) effect matrix\n df2::Int # subj - sqn (Robust DF)\n df3::Int # obs - rankxz (Contain DF for sequence and period)\n df4::Int # obs - rankxz + p\n end\n\n\n\n\n\n","category":"function"},{"location":"api/#ReplicateBE.estimate-1","page":"Api","title":"ReplicateBE.estimate","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"ReplicateBE.estimate","category":"page"},{"location":"api/#ReplicateBE.estimate","page":"Api","title":"ReplicateBE.estimate","text":"estimate(rbe::RBE, L::Matrix; df = :sat, name = \"Estimate\", memopt = true, alpha = 0.05)\n\nReturn estimate table for L 1xp matrix.\n\nestimate = Lbeta\n\nse = sqrtLCL\n\nt = estimatese\n\nFor df = :sat:\n\ndf = frac2(LCL)^2gAg\n\nwhere A = 2H\n\nwhere g = triangledown _theta(LC^-1L)\n\nFor df = :cont (contain):\n\ndf = N - rank(ZX)\n\nCI estimate is:\n\nCI = stimate t(alpha df)*se \n\n\n\n\n\n","category":"function"},{"location":"api/#ReplicateBE.fixed-1","page":"Api","title":"ReplicateBE.fixed","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"ReplicateBE.fixed","category":"page"},{"location":"api/#ReplicateBE.fixed","page":"Api","title":"ReplicateBE.fixed","text":"fixed(rbe::RBE)\n\nReturn fixed effect table (β).\n\n\n\n\n\n","category":"function"},{"location":"api/#ReplicateBE.randrbeds-1","page":"Api","title":"ReplicateBE.randrbeds","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"ReplicateBE.randrbeds","category":"page"},{"location":"api/#ReplicateBE.randrbeds","page":"Api","title":"ReplicateBE.randrbeds","text":" randrbeds(;n=24, sequence=[1,1],\n design = [\"T\" \"R\" \"T\" \"R\"; \"R\" \"T\" \"R\" \"T\"],\n inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2],\n intercept = 0, seqcoef = [0.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [0.0, 0.0],\n dropsubj = 0.0, dropobs::Int = 0, seed::Int = 0)\n\nRandom dataset generation for bioequivalence.\n\nParameters\n\n* n: number of subjects\n* sequence: distribution in sequences [1,1] means 1:1, [1,3] - 1:4 etc.\n* design: desin matrix, each line is a sequence, each column - periods, cell - formulation id\n* inter: inter-subject variance vector for G matrix (length 3)\n* intra: intra-subject variance vector for R matrix (length 2)\n* intercept: intercept effect value\n* seqcoef: coefficients of sequences (length(sequence) == length(seqcoef) == size(design, 1))\n* periodcoef: coefficients of periods (length(periodcoef) == size(design, 2))\n* formcoef: coeficients of formulations\n* dropobs: number of randomly dropped subjects\n* seed: seed for random\n\nMultivariate normal disribution:\n\nf(mathbfx boldsymbolmu boldsymbolV) = frac1(2 pi)^d2 boldsymbolV^12\nexp left( - frac12 (mathbfx - boldsymbolmu)^T V^-1 (mathbfx - boldsymbolmu) right)\n\nWhere V:\n\nV_i = Z_iGZ_i+R_i\n\n\n\n\n\n randrbeds(n::Int, sequence::Vector,\n design::Matrix,\n θinter::Vector, θintra::Vector,\n intercept::Real, seqcoef::Vector, periodcoef::Vector, formcoef::Vector,\n dropsubj::Float64, dropobs::Int, seed::Int)\n\nSimple interface.\n\n\n\n\n\n","category":"function"},{"location":"api/#ReplicateBE.reml2-1","page":"Api","title":"ReplicateBE.reml2","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"ReplicateBE.reml2","category":"page"},{"location":"api/#ReplicateBE.reml2","page":"Api","title":"ReplicateBE.reml2","text":"reml2(rbe::RBE, θ::Array{Float64, 1})\n\nReturm -2REML for rbe model\n\n\n\n\n\nreml2(rbe::RBE)\n\nReturm -2logREML for rbe model\n\n\nlogREML(thetabeta) = -fracN-p2 - frac12sum_i=1^nlogV_i-\n\n-frac12logsum_i=1^nX_iV_i^-1X_i-frac12sum_i=1^n(y_i - X_ibeta)V_i^-1(y_i - X_ibeta)\n\n\n\n\n\n","category":"function"},{"location":"api/#ReplicateBE.typeiii-1","page":"Api","title":"ReplicateBE.typeiii","text":"","category":"section"},{"location":"api/#","page":"Api","title":"Api","text":"ReplicateBE.typeiii","category":"page"},{"location":"api/#ReplicateBE.typeiii","page":"Api","title":"ReplicateBE.typeiii","text":"typeiii(rbe::RBE)\n\nReturn TYPE III table.\n\nsee contrast\n\n\n\n\n\n","category":"function"},{"location":"details/#Details-1","page":"Details","title":"Details","text":"","category":"section"},{"location":"testval/#Validation-1","page":"Validation","title":"Validation","text":"","category":"section"},{"location":"testval/#","page":"Validation","title":"Validation","text":"Validation program include public datasets and generated datasets. All public datasets include in test/testdata.jl.","category":"page"},{"location":"testval/#","page":"Validation","title":"Validation","text":"Generated datasets made with randrbeds function with fixed seed (could be reproduced at any time) and include following disignes:","category":"page"},{"location":"testval/#subjects,-balanced-1","page":"Validation","title":"24 subjects, balanced","text":"","category":"section"},{"location":"testval/#","page":"Validation","title":"Validation","text":"1 TRTR/RTRT\n2 TRRT/RTTR\n3 TTRR/RRTT\n4 TRTR/RTRT/TRRT/RTTR\n5 TRRT/RTTR/TTRR/RRTT\n6 TRTR/RTRT/TTRR/RRTT\n7 TRT/RTR\n8 TRR/RTT\n9 TR/RT/TT/RR\n10 TRR/RTR/RRT\n11 TRR/RTR*","category":"page"},{"location":"testval/#subjects,-unbalanced,-20-dropped-observations-1","page":"Validation","title":"48 subjects, unbalanced, 20 dropped observations","text":"","category":"section"},{"location":"testval/#","page":"Validation","title":"Validation","text":"12 TRTR/RTRT\n13 TRRT/RTTR\n14 TTRR/RRTT\n15 TRTR/RTRT/TRRT/RTTR\n16 TRRT/RTTR/TTRR/RRTT\n17 TRTR/RTRT/TTRR/RRTT\n18 TRT/RTR\n19 TRR/RTT\n20 TR/RT/TT/RR\n21 TRR/RTR/RRT\n22 TRR/RTR","category":"page"},{"location":"testval/#Special-cases-1","page":"Validation","title":"Special cases","text":"","category":"section"},{"location":"testval/#","page":"Validation","title":"Validation","text":"* 101 SP1: TRTR/RTRT 1024 subjects, 2000 dropped observations\r\n* 102 SP2: TRT/RTR 4096 subjects, 2000 dropped observations (total 10288 observations)","category":"page"},{"location":"testval/#","page":"Validation","title":"Validation","text":"SP1 output:","category":"page"},{"location":"testval/#","page":"Validation","title":"Validation","text":"rds = ReplicateBE.randrbeds(;n=1024, sequence=[1,2], design = [\"T\" \"R\" \"T\" \"R\"; \"R\" \"T\" \"R\" \"T\"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [0.0, 0.1], dropobs = 2000, seed = 10101)\r\n@time be = ReplicateBE.rbe(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)\r\n 6.107196 seconds (14.51 M allocations: 981.933 MiB, 8.28% gc time)\r\nBioequivalence Linear Mixed Effect Model (status: converged)\r\n\r\n-2REML: 4032.92 REML: -2016.46\r\n\r\nFixed effect:\r\n─────────────────────────────────────────────────────────────────────────────────────────────\r\nEffect Value SE F DF t P|t|\r\n─────────────────────────────────────────────────────────────────────────────────────────────\r\n(Intercept) 1.17091 0.0342916 1165.94 1215.96 34.1458 9.58974e-180*\r\nsequence: TRTR -0.0230415 0.0497151 0.214805 976.825 -0.463471 0.64313\r\nperiod: 2 -0.0118358 0.0300503 0.15513 1397.78 -0.393865 0.69374\r\nperiod: 3 -0.00522645 0.0288399 0.0328418 1139.11 -0.181223 0.856225\r\nperiod: 4 -0.0271755 0.0300382 0.81848 1398.08 -0.904699 0.365781\r\nformulation: T -0.102651 0.0231198 19.7131 1445.78 -4.43995 9.68179e-6*\r\n─────────────────────────────────────────────────────────────────────────────────────────────\r\nIntra-individual variation:\r\nformulation: R 0.202459\r\nformulation: T 0.105328\r\n\r\nInter-individual variation:\r\nformulation: R 0.396337\r\nformulation: T 0.52727\r\nρ: 0.933991 Cov: 0.426964\r\n\r\nConfidence intervals(90%):\r\nformulation: R / formulation: T\r\n86.8747 - 93.7445 (%)\r\nformulation: T / formulation: R\r\n106.673 - 115.1083 (%)","category":"page"},{"location":"testval/#","page":"Validation","title":"Validation","text":"SP1 output: ","category":"page"},{"location":"testval/#","page":"Validation","title":"Validation","text":"rds = ReplicateBE.randrbeds(;n=4096, sequence=[1,4], design = [\"T\" \"R\" \"T\"; \"R\" \"T\" \"R\"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.9], intercept = 1.0, seqcoef = [10.0, 0.0], periodcoef = [0.0, 0.0, 0.0], formcoef = [0.0, 1.0], dropobs = 2000, seed = 10102)\r\nbe = ReplicateBE.rbe(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)\r\n312.655087 seconds (269.38 M allocations: 14.273 GiB, 1.47% gc time)\r\nBioequivalence Linear Mixed Effect Model (status: converged)\r\n\r\n-2REML: 26633.2 REML: -13316.6\r\n\r\nFixed effect:\r\n───────────────────────────────────────────────────────────────────────────────────────\r\nEffect Value SE F DF t P|t|\r\n───────────────────────────────────────────────────────────────────────────────────────\r\n(Intercept) 1.99206 0.0184652 11638.4 4779.03 107.882 0.0*\r\nsequence: TRT 10.0134 0.0322104 96643.1 5028.62 310.875 0.0*\r\nperiod: 2 0.0193164 0.0223827 0.744777 6811.0 0.863005 0.388165\r\nperiod: 3 -0.00501682 0.0152331 0.108463 1577.27 -0.329338 0.741944\r\nformulation: T -0.995365 0.0210042 2245.71 6298.6 -47.3889 0.0*\r\nIntra-individual variation:\r\nformulation: R 0.885914\r\nformulation: T 0.106905\r\n\r\nInter-individual variation:\r\nformulation: R 0.380248\r\nformulation: T 0.491359\r\nρ: 0.902941 Cov: 0.390294\r\n\r\nConfidence intervals(90%):\r\nformulation: R / formulation: T\r\n35.7036 - 38.2583 (%)\r\nformulation: T / formulation: R\r\n261.3815 - 280.0838 (%)","category":"page"},{"location":"testval/#","page":"Validation","title":"Validation","text":"SAS procedures for generated datasets can be found in validation/sas/ folder.","category":"page"},{"location":"testval/#","page":"Validation","title":"Validation","text":"All validation datasets (except special - SPX) include in package test procedure.","category":"page"},{"location":"testval/#","page":"Validation","title":"Validation","text":"SAS WARNING: Stopped because of infinite likelihood.","category":"page"},{"location":"testval/#Simulation-study-1","page":"Validation","title":"Simulation study","text":"","category":"section"},{"location":"testval/#","page":"Validation","title":"Validation","text":"Following simulation was performed for version v0.1.4:","category":"page"},{"location":"testval/#","page":"Validation","title":"Validation","text":" using Distributions, ReplicateBE\r\n function simulation(num)\r\n n = 0\r\n err = 0\r\n cnt = 0\r\n b = l = log(0.8)\r\n u = log(1.25)\r\n println(\"Start...\")\r\n for i = 1:num\r\n try\r\n rds = ReplicateBE.randrbeds(;n=24, sequence=[1,1], design = [\"T\" \"R\" \"T\" \"R\"; \"R\" \"T\" \"R\" \"T\"], inter=[0.2, 0.2, 0.5], intra=[0.05, 0.05], intercept = 1.0, seqcoef = [0.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [b, 0.0])\r\n be = ReplicateBE.rbe(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence, memopt = false)\r\n q = quantile(TDist(be.fixed.df[6]), 0.95)\r\n ll = be.fixed.est[6] - q*be.fixed.se[6]\r\n ul = be.fixed.est[6] + q*be.fixed.se[6]\r\n if ll > l && ul < u cnt += 1 end\r\n if n > 1000\r\n println(\"Iteration: $i\")\r\n println(\"Mem: $(Sys.free_memory()/2^20)\")\r\n println(\"Pow: $(cnt/i)\")\r\n println(\"-------------------------------\")\r\n n = 0\r\n end\r\n n += 1\r\n catch\r\n err += 1\r\n println(\"Error $(err)!\")\r\n end\r\n end\r\n return cnt/num\r\nend\r\n\r\nsimulation(100000)","category":"page"},{"location":"testval/#","page":"Validation","title":"Validation","text":"Rusults:","category":"page"},{"location":"testval/#","page":"Validation","title":"Validation","text":" 7104.944474 seconds (9.51 G allocations: 2.230 TiB, 44.90% gc time)\r\n0.04939","category":"page"},{"location":"testval/#","page":"Validation","title":"Validation","text":"Cofinence interval (95%) for power: 0.048047 - 0.050733. No statistically significant difference found.","category":"page"},{"location":"examples/#Examples-1","page":"Examples","title":"Examples","text":"","category":"section"},{"location":"examples/#","page":"Examples","title":"Examples","text":"using CSV, DataFrames, ReplicateBE\r\n\r\n#Load Dataframe...\r\n\r\ndf=CSV.read(IOBuffer(\"\"\"subject,sequence,period,formulation,var\r\n1,1,1,1,1.0\r\n1,1,2,2,1.1\r\n1,1,3,1,1.2\r\n1,1,4,2,1.3\r\n2,1,1,1,2.0\r\n2,1,2,2,2.1\r\n2,1,3,1,2.4\r\n2,1,4,2,2.2\r\n3,2,1,2,1.3\r\n3,2,2,1,1.5\r\n3,2,3,2,1.6\r\n3,2,4,1,1.4\r\n4,2,1,2,1.5\r\n4,2,2,1,1.7\r\n4,2,3,2,1.3\r\n4,2,4,1,1.4\r\n5,2,1,2,1.5\r\n5,2,2,1,1.7\r\n5,2,3,2,1.2\r\n5,2,4,1,1.8\"\"\")) |> DataFrame\r\n\r\n#Execute BE\r\n\r\nbe = ReplicateBE.rbe!(df, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)\r\n\r\n#Get fixed effect object\r\n\r\nReplicateBE.fixed(be)\r\n\r\n#Get Type III object\r\n\r\nReplicateBE.typeiii(be)\r\n\r\n#Get model coefficients\r\n\r\ncoef(be)\r\n\r\n#Get Standard Error for coefficients\r\n\r\nReplicateBE.coefse(be)\r\n\r\n#Get confidence intervals\r\n\r\nReplicateBE.confint(be, 0.1, expci = false, inv = false)\r\n\r\n#Get -2 REML for model\r\n\r\nReplicateBE.reml2(be)\r\n\r\n#Design information\r\n\r\nReplicateBE.design(be)","category":"page"},{"location":"#ReplicateBE.jl-Documentation-1","page":"Home","title":"ReplicateBE.jl Documentation","text":"","category":"section"},{"location":"#","page":"Home","title":"Home","text":"CurrentModule = ReplicateBE","category":"page"},{"location":"#","page":"Home","title":"Home","text":"ReplicateBE.jl is a Julia package providing mixed model solution for replicate designed bioequivalence study. This can be used to obtained results with methods C (random effects with interaction), given by the EMA in Annex I. Statistical model formed with accordance FDA Guidance for Industry: Statistical Approaches to Establishing Bioequivalence, APPENDIX F.","category":"page"},{"location":"#","page":"Home","title":"Home","text":"Pages = [\r\n \"examples.md\",\r\n \"syntax.md\",\r\n \"details.md\",\r\n \"testval.md\",\r\n \"struct.md\",\r\n \"api.md\"]\r\nDepth = 2","category":"page"},{"location":"syntax/#Syntax-1","page":"Syntax","title":"Syntax","text":"","category":"section"},{"location":"syntax/#","page":"Syntax","title":"Syntax","text":"rbe!(df; dvar::Symbol,\r\n subject::Symbol,\r\n formulation::Symbol,\r\n period::Symbol,\r\n sequence::Symbol,\r\n g_tol::Float64 = 1e-8, x_tol::Float64 = 0.0, f_tol::Float64 = 0.0, iterations::Int = 100,\r\n store_trace = false, extended_trace = false, show_trace = false,\r\n memopt = true)","category":"page"},{"location":"syntax/#","page":"Syntax","title":"Syntax","text":"df::DataFrame - DataFrame with data\ndvar::Symbol - variable\nsubject::Symbol - Subject column\nformulation::Symbol - Formulation clumn\nperiod::Symbol - Period column\nsequence::Symbol - Sequence column\ng_tol\nx_tol\nf_tol\niterations:: - Maximum iterations\nstore_trace\nextended_trace\nshow_trace\nmemopt::Bool - memory optimization, can increase performance ","category":"page"}] -} diff --git a/docs/build/struct/index.html b/docs/build/struct/index.html deleted file mode 100644 index 46e1c22..0000000 --- a/docs/build/struct/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Structures · ReplicateBE

      Structures

      Structures

      ReplicateBE.RBE

      Missing docstring.

      Missing docstring for ReplicateBE.RBE. Check Documenter's build log for details.

      ReplicateBE.ContrastTable

      Missing docstring.

      Missing docstring for ReplicateBE.ContrastTable. Check Documenter's build log for details.

      ReplicateBE.Design

      Missing docstring.

      Missing docstring for ReplicateBE.Design. Check Documenter's build log for details.

      ReplicateBE.EffectTable

      Missing docstring.

      Missing docstring for ReplicateBE.EffectTable. Check Documenter's build log for details.

      ReplicateBE.EstimateTable

      Missing docstring.

      Missing docstring for ReplicateBE.EstimateTable. Check Documenter's build log for details.

      diff --git a/docs/build/syntax/index.html b/docs/build/syntax/index.html deleted file mode 100644 index 82929e2..0000000 --- a/docs/build/syntax/index.html +++ /dev/null @@ -1,9 +0,0 @@ - -Syntax · ReplicateBE

      Syntax

      Syntax

      rbe!(df; dvar::Symbol,
      -    subject::Symbol,
      -    formulation::Symbol,
      -    period::Symbol,
      -    sequence::Symbol,
      -    g_tol::Float64 = 1e-8, x_tol::Float64 = 0.0, f_tol::Float64 = 0.0, iterations::Int = 100,
      -    store_trace = false, extended_trace = false, show_trace = false,
      -    memopt = true)
      • df::DataFrame - DataFrame with data
      • dvar::Symbol - variable
      • subject::Symbol - Subject column
      • formulation::Symbol - Formulation clumn
      • period::Symbol - Period column
      • sequence::Symbol - Sequence column
      • g_tol
      • x_tol
      • f_tol
      • iterations:: - Maximum iterations
      • store_trace
      • extended_trace
      • show_trace
      • memopt::Bool - memory optimization, can increase performance
      diff --git a/docs/build/testval/index.html b/docs/build/testval/index.html deleted file mode 100644 index 41199eb..0000000 --- a/docs/build/testval/index.html +++ /dev/null @@ -1,96 +0,0 @@ - -Validation · ReplicateBE

      Validation

      Validation

      Validation program include public datasets and generated datasets. All public datasets include in test/testdata.jl.

      Generated datasets made with randrbeds function with fixed seed (could be reproduced at any time) and include following disignes:

      24 subjects, balanced

      • 1 TRTR/RTRT
      • 2 TRRT/RTTR
      • 3 TTRR/RRTT
      • 4 TRTR/RTRT/TRRT/RTTR
      • 5 TRRT/RTTR/TTRR/RRTT
      • 6 TRTR/RTRT/TTRR/RRTT
      • 7 TRT/RTR
      • 8 TRR/RTT
      • 9 TR/RT/TT/RR
      • 10 TRR/RTR/RRT
      • 11 TRR/RTR*

      48 subjects, unbalanced, 20 dropped observations

      • 12 TRTR/RTRT
      • 13 TRRT/RTTR
      • 14 TTRR/RRTT
      • 15 TRTR/RTRT/TRRT/RTTR
      • 16 TRRT/RTTR/TTRR/RRTT
      • 17 TRTR/RTRT/TTRR/RRTT
      • 18 TRT/RTR
      • 19 TRR/RTT
      • 20 TR/RT/TT/RR
      • 21 TRR/RTR/RRT
      • 22 TRR/RTR

      Special cases

      * 101 SP1: TRTR/RTRT 1024 subjects, 2000 dropped observations
      -* 102 SP2: TRT/RTR 4096 subjects, 2000 dropped observations (total 10288 observations)

      SP1 output:

      rds = ReplicateBE.randrbeds(;n=1024, sequence=[1,2], design = ["T" "R" "T" "R"; "R" "T" "R" "T"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.2], intercept = 1.0, seqcoef = [0.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [0.0, 0.1], dropobs = 2000, seed = 10101)
      -@time be = ReplicateBE.rbe(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
      -  6.107196 seconds (14.51 M allocations: 981.933 MiB, 8.28% gc time)
      -Bioequivalence Linear Mixed Effect Model (status: converged)
      -
      --2REML: 4032.92    REML: -2016.46
      -
      -Fixed effect:
      -─────────────────────────────────────────────────────────────────────────────────────────────
      -Effect           Value         SE          F           DF        t           P|t|
      -─────────────────────────────────────────────────────────────────────────────────────────────
      -(Intercept)      1.17091       0.0342916   1165.94     1215.96   34.1458     9.58974e-180*
      -sequence: TRTR   -0.0230415    0.0497151   0.214805    976.825   -0.463471   0.64313
      -period: 2        -0.0118358    0.0300503   0.15513     1397.78   -0.393865   0.69374
      -period: 3        -0.00522645   0.0288399   0.0328418   1139.11   -0.181223   0.856225
      -period: 4        -0.0271755    0.0300382   0.81848     1398.08   -0.904699   0.365781
      -formulation: T   -0.102651     0.0231198   19.7131     1445.78   -4.43995    9.68179e-6*
      -─────────────────────────────────────────────────────────────────────────────────────────────
      -Intra-individual variation:
      -formulation: R   0.202459
      -formulation: T   0.105328
      -
      -Inter-individual variation:
      -formulation: R   0.396337
      -formulation: T   0.52727
      -ρ:               0.933991   Cov: 0.426964
      -
      -Confidence intervals(90%):
      -formulation: R / formulation: T
      -86.8747 - 93.7445 (%)
      -formulation: T / formulation: R
      -106.673 - 115.1083 (%)

      SP1 output:

      rds = ReplicateBE.randrbeds(;n=4096, sequence=[1,4], design = ["T" "R" "T"; "R" "T" "R"], inter=[0.5, 0.4, 0.9], intra=[0.1, 0.9], intercept = 1.0, seqcoef = [10.0, 0.0], periodcoef = [0.0, 0.0, 0.0], formcoef = [0.0, 1.0], dropobs = 2000, seed = 10102)
      -be = ReplicateBE.rbe(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence)
      -312.655087 seconds (269.38 M allocations: 14.273 GiB, 1.47% gc time)
      -Bioequivalence Linear Mixed Effect Model (status: converged)
      -
      --2REML: 26633.2    REML: -13316.6
      -
      -Fixed effect:
      -───────────────────────────────────────────────────────────────────────────────────────
      -Effect           Value         SE          F          DF        t           P|t|
      -───────────────────────────────────────────────────────────────────────────────────────
      -(Intercept)      1.99206       0.0184652   11638.4    4779.03   107.882     0.0*
      -sequence: TRT    10.0134       0.0322104   96643.1    5028.62   310.875     0.0*
      -period: 2        0.0193164     0.0223827   0.744777   6811.0    0.863005    0.388165
      -period: 3        -0.00501682   0.0152331   0.108463   1577.27   -0.329338   0.741944
      -formulation: T   -0.995365     0.0210042   2245.71    6298.6    -47.3889    0.0*
      -Intra-individual variation:
      -formulation: R   0.885914
      -formulation: T   0.106905
      -
      -Inter-individual variation:
      -formulation: R   0.380248
      -formulation: T   0.491359
      -ρ:               0.902941   Cov: 0.390294
      -
      -Confidence intervals(90%):
      -formulation: R / formulation: T
      -35.7036 - 38.2583 (%)
      -formulation: T / formulation: R
      -261.3815 - 280.0838 (%)

      SAS procedures for generated datasets can be found in validation/sas/ folder.

      All validation datasets (except special - SPX) include in package test procedure.

      SAS WARNING: Stopped because of infinite likelihood.

      Simulation study

      Following simulation was performed for version v0.1.4:

        using Distributions, ReplicateBE
      -  function simulation(num)
      -    n   = 0
      -    err = 0
      -    cnt = 0
      -    b = l = log(0.8)
      -    u = log(1.25)
      -    println("Start...")
      -    for i = 1:num
      -        try
      -            rds   = ReplicateBE.randrbeds(;n=24, sequence=[1,1], design = ["T" "R" "T" "R"; "R" "T" "R" "T"], inter=[0.2, 0.2, 0.5], intra=[0.05, 0.05], intercept = 1.0, seqcoef = [0.0, 0.0], periodcoef = [0.0, 0.0, 0.0, 0.0], formcoef = [b, 0.0])
      -            be    = ReplicateBE.rbe(rds, dvar = :var, subject = :subject, formulation = :formulation, period = :period, sequence = :sequence, memopt = false)
      -            q     = quantile(TDist(be.fixed.df[6]), 0.95)
      -            ll    = be.fixed.est[6] - q*be.fixed.se[6]
      -            ul    = be.fixed.est[6] + q*be.fixed.se[6]
      -            if ll > l && ul < u cnt += 1 end
      -            if n > 1000
      -                println("Iteration: $i")
      -                println("Mem: $(Sys.free_memory()/2^20)")
      -                println("Pow: $(cnt/i)")
      -                println("-------------------------------")
      -                n = 0
      -            end
      -            n += 1
      -        catch
      -            err += 1
      -            println("Error $(err)!")
      -        end
      -    end
      -    return cnt/num
      -end
      -
      -simulation(100000)

      Rusults:

       7104.944474 seconds (9.51 G allocations: 2.230 TiB, 44.90% gc time)
      -0.04939

      Cofinence interval (95%) for power: 0.048047 - 0.050733. No statistically significant difference found.

      diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index f62ca28..0000000 --- a/docs/index.html +++ /dev/null @@ -1 +0,0 @@ -