-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ef2da0c
Showing
74 changed files
with
8,937 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
^LICENSE.md$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Package: MBAOD | ||
Type: Package | ||
Title: Model Based Adaptive Optimal Design | ||
Version: 0.0.1 | ||
Date: 2014-03-25 | ||
Author: Andrew Hooker <[email protected]>, Coen Van Hasselt | ||
Maintainer: Andrew Hooker <[email protected]> | ||
Description: Adaptive optimal design using nonlinear mixed effect models | ||
License: LGPL (>= 3) | ||
Copyright: 2014 Andrew C. Hooker | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
GNU LESSER GENERAL PUBLIC LICENSE | ||
Version 3, 29 June 2007 | ||
|
||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> | ||
Everyone is permitted to copy and distribute verbatim copies | ||
of this license document, but changing it is not allowed. | ||
|
||
|
||
This version of the GNU Lesser General Public License incorporates | ||
the terms and conditions of version 3 of the GNU General Public | ||
License, supplemented by the additional permissions listed below. | ||
|
||
0. Additional Definitions. | ||
|
||
As used herein, "this License" refers to version 3 of the GNU Lesser | ||
General Public License, and the "GNU GPL" refers to version 3 of the GNU | ||
General Public License. | ||
|
||
"The Library" refers to a covered work governed by this License, | ||
other than an Application or a Combined Work as defined below. | ||
|
||
An "Application" is any work that makes use of an interface provided | ||
by the Library, but which is not otherwise based on the Library. | ||
Defining a subclass of a class defined by the Library is deemed a mode | ||
of using an interface provided by the Library. | ||
|
||
A "Combined Work" is a work produced by combining or linking an | ||
Application with the Library. The particular version of the Library | ||
with which the Combined Work was made is also called the "Linked | ||
Version". | ||
|
||
The "Minimal Corresponding Source" for a Combined Work means the | ||
Corresponding Source for the Combined Work, excluding any source code | ||
for portions of the Combined Work that, considered in isolation, are | ||
based on the Application, and not on the Linked Version. | ||
|
||
The "Corresponding Application Code" for a Combined Work means the | ||
object code and/or source code for the Application, including any data | ||
and utility programs needed for reproducing the Combined Work from the | ||
Application, but excluding the System Libraries of the Combined Work. | ||
|
||
1. Exception to Section 3 of the GNU GPL. | ||
|
||
You may convey a covered work under sections 3 and 4 of this License | ||
without being bound by section 3 of the GNU GPL. | ||
|
||
2. Conveying Modified Versions. | ||
|
||
If you modify a copy of the Library, and, in your modifications, a | ||
facility refers to a function or data to be supplied by an Application | ||
that uses the facility (other than as an argument passed when the | ||
facility is invoked), then you may convey a copy of the modified | ||
version: | ||
|
||
a) under this License, provided that you make a good faith effort to | ||
ensure that, in the event an Application does not supply the | ||
function or data, the facility still operates, and performs | ||
whatever part of its purpose remains meaningful, or | ||
|
||
b) under the GNU GPL, with none of the additional permissions of | ||
this License applicable to that copy. | ||
|
||
3. Object Code Incorporating Material from Library Header Files. | ||
|
||
The object code form of an Application may incorporate material from | ||
a header file that is part of the Library. You may convey such object | ||
code under terms of your choice, provided that, if the incorporated | ||
material is not limited to numerical parameters, data structure | ||
layouts and accessors, or small macros, inline functions and templates | ||
(ten or fewer lines in length), you do both of the following: | ||
|
||
a) Give prominent notice with each copy of the object code that the | ||
Library is used in it and that the Library and its use are | ||
covered by this License. | ||
|
||
b) Accompany the object code with a copy of the GNU GPL and this license | ||
document. | ||
|
||
4. Combined Works. | ||
|
||
You may convey a Combined Work under terms of your choice that, | ||
taken together, effectively do not restrict modification of the | ||
portions of the Library contained in the Combined Work and reverse | ||
engineering for debugging such modifications, if you also do each of | ||
the following: | ||
|
||
a) Give prominent notice with each copy of the Combined Work that | ||
the Library is used in it and that the Library and its use are | ||
covered by this License. | ||
|
||
b) Accompany the Combined Work with a copy of the GNU GPL and this license | ||
document. | ||
|
||
c) For a Combined Work that displays copyright notices during | ||
execution, include the copyright notice for the Library among | ||
these notices, as well as a reference directing the user to the | ||
copies of the GNU GPL and this license document. | ||
|
||
d) Do one of the following: | ||
|
||
0) Convey the Minimal Corresponding Source under the terms of this | ||
License, and the Corresponding Application Code in a form | ||
suitable for, and under terms that permit, the user to | ||
recombine or relink the Application with a modified version of | ||
the Linked Version to produce a modified Combined Work, in the | ||
manner specified by section 6 of the GNU GPL for conveying | ||
Corresponding Source. | ||
|
||
1) Use a suitable shared library mechanism for linking with the | ||
Library. A suitable mechanism is one that (a) uses at run time | ||
a copy of the Library already present on the user's computer | ||
system, and (b) will operate properly with a modified version | ||
of the Library that is interface-compatible with the Linked | ||
Version. | ||
|
||
e) Provide Installation Information, but only if you would otherwise | ||
be required to provide such information under section 6 of the | ||
GNU GPL, and only to the extent that such information is | ||
necessary to install and execute a modified version of the | ||
Combined Work produced by recombining or relinking the | ||
Application with a modified version of the Linked Version. (If | ||
you use option 4d0, the Installation Information must accompany | ||
the Minimal Corresponding Source and Corresponding Application | ||
Code. If you use option 4d1, you must provide the Installation | ||
Information in the manner specified by section 6 of the GNU GPL | ||
for conveying Corresponding Source.) | ||
|
||
5. Combined Libraries. | ||
|
||
You may place library facilities that are a work based on the | ||
Library side by side in a single library together with other library | ||
facilities that are not Applications and are not covered by this | ||
License, and convey such a combined library under terms of your | ||
choice, if you do both of the following: | ||
|
||
a) Accompany the combined library with a copy of the same work based | ||
on the Library, uncombined with any other library facilities, | ||
conveyed under the terms of this License. | ||
|
||
b) Give prominent notice with the combined library that part of it | ||
is a work based on the Library, and explaining where to find the | ||
accompanying uncombined form of the same work. | ||
|
||
6. Revised Versions of the GNU Lesser General Public License. | ||
|
||
The Free Software Foundation may publish revised and/or new versions | ||
of the GNU Lesser General Public License from time to time. Such new | ||
versions will be similar in spirit to the present version, but may | ||
differ in detail to address new problems or concerns. | ||
|
||
Each version is given a distinguishing version number. If the | ||
Library as you received it specifies that a certain numbered version | ||
of the GNU Lesser General Public License "or any later version" | ||
applies to it, you have the option of following the terms and | ||
conditions either of that published version or of any later version | ||
published by the Free Software Foundation. If the Library as you | ||
received it does not specify a version number of the GNU Lesser | ||
General Public License, you may choose any version of the GNU Lesser | ||
General Public License ever published by the Free Software Foundation. | ||
|
||
If the Library as you received it specifies that a proxy can decide | ||
whether future versions of the GNU Lesser General Public License shall | ||
apply, that proxy's public statement of acceptance of any version is | ||
permanent authorization for you to choose that version for the | ||
Library. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
function [y,globalStructure] = feps(model_switch,xt,g,epsi,globalStructure) | ||
% -- Auto generated error model file for model One compartment IV bolus dose -- | ||
% -- Created: 04-Apr-2012 19:13:30 | ||
[y,globalStructure]=feval(globalStructure.ff_pointer,model_switch,xt,g,globalStructure); | ||
%y = y.*(1+epsi(:,1)); | ||
y = y.*(1+epsi(:,1))+epsi(:,2); | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
function [y,globalStructure]=ff(model_switch,xt,g,globalStructure) | ||
|
||
y=xt; | ||
|
||
%g = {CL,V,Dose} | ||
|
||
tvcl=g(1); | ||
tvv=g(2); | ||
|
||
emax=g(3); | ||
ec50=g(4); | ||
h=g(5); | ||
|
||
wt=g(6); % covariate a(1) | ||
|
||
|
||
cl=tvcl+((emax*wt^h)/(ec50^h+wt^h)); | ||
v=g(2)*(wt/70); | ||
dose=1000*(wt/70); | ||
|
||
y=((dose/v).*(exp(-cl/v.*xt))); | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
popedInput.strPopEDVersion='2.12'; | ||
popedInput.nx=0; | ||
popedInput.ndocc=0; | ||
popedInput.NumOcc=0; % -- Number of occassions -- | ||
popedInput.iFOCENumInd=1000; % -- Num indivduals in each conditional step -- | ||
popedInput.bUseRandomSearch=1; % -- Use random search (1=true, 0=false) -- | ||
popedInput.bUseStochasticGradient=0; % -- Use Stochastic Gradient search (1=true, 0=false) -- | ||
popedInput.bUseLineSearch=0; % -- Use Line search (1=true, 0=false) -- | ||
popedInput.bUseExchangeAlgorithm=0; % -- Use Exchange algorithm (1=true, 0=false) -- | ||
popedInput.bUseBFGSMinimizer=0; % -- Use BFGS Minimizer (1=true, 0=false) -- | ||
popedInput.line_optx=zeros(1,0)'; % -- Vector for line search on discrete design variables (1=true,0=false) -- | ||
popedInput.dSeed=-1; % -- The seed number used for optimization and sampling -- | ||
popedInput.design.discrete_x=cell(0,1)'; % -- Cell defining the discrete variables -- | ||
popedInput.bUseGrouped_x=0; % -- Use grouped discrete design variables (1=true, 0=false) -- | ||
popedInput.ff_file='ff.m'; % -- Filname and path of the model file -- | ||
popedInput.fg_file='sfg.m'; % -- Filname and path of the g parameter file -- | ||
popedInput.fError_file='feps.m'; % -- Filname and path of the error model file -- | ||
popedInput.strUserDistributionFile='';% -- Filname and path for the user defined distributions -- | ||
popedInput.strEDPenaltyFile='';% -- Filname and path for the ED penalty function, empty string means no penalty -- | ||
popedInput.strAutoCorrelationFile='';% -- Filname and path for the Autocorrelation function, empty string means no autocorrelation -- | ||
popedInput.modtit='One compartment IV bolus dose';% -- The model title -- | ||
popedInput.bShowGraphs=0;% -- Use graph output during search -- | ||
popedInput.use_logfile=0;% -- If a log file should be used (0=false, 1=true) -- | ||
popedInput.output_file=''; | ||
popedInput.output_function_file=''; | ||
popedInput.strIterationFileName='';% -- Filename and path for storage of current optimal design -- | ||
popedInput.m1_switch=0;% -- Method used to calculate M1 (0=Complex difference, 1=Central difference, 20=Analytic derivative, 30=Automatic differentiation) -- | ||
popedInput.m2_switch=0;% -- Method used to calculate M2 (0=Central difference, 1=Central difference, 20=Analytic derivative, 30=Automatic differentiation) -- | ||
popedInput.hle_switch=0;% -- Method used to calculate linearization of residual error (0=Complex difference, 1=Central difference, 30=Automatic differentiation) -- | ||
popedInput.gradff_switch=0;% -- Method used to calculate the gradient of the model (0=Complex difference, 1=Central difference, 20=Analytic derivative, 30=Automatic differentiation) -- | ||
popedInput.gradfg_switch=0;% -- Method used to calculate the gradient of the parameter vector g (0=Complex difference, 1=Central difference, 20=Analytic derivative, 30=Automatic differentiation) -- | ||
popedInput.bLHS=0;% -- Use normal random sampling or Latin Hypercube sampling, 0=Random Sampling, 1=LatinHyperCube -- | ||
popedInput.ourzero=1e-05;% -- Value to interpret as zero in design -- | ||
popedInput.rsit_output=5;% -- Number of iterations in random search between screen output -- | ||
popedInput.sgit_output=1;% -- Number of iterations in stochastic gradient search between screen output -- | ||
popedInput.hm1=0.0001;% -- Step length of derivative of linearized model w.r.t. typical values -- | ||
popedInput.hlf=0.0001;% -- Step length of derivative of model w.r.t. g -- | ||
popedInput.hlg=0.0001;% -- Step length of derivative of g w.r.t. b -- | ||
popedInput.hm2=0.0001;% -- Step length of derivative of variance w.r.t. typical values -- | ||
popedInput.hgd=0.0001;% -- Step length of derivative of OFV w.r.t. time -- | ||
popedInput.hle=0.0001;% -- Step length of derivative of model w.r.t. sigma -- | ||
popedInput.AbsTol=1e-10;% -- The absolute tolerance for the diff equation solver -- | ||
popedInput.RelTol=1e-10;% -- The relative tolerance for the diff equation solver -- | ||
popedInput.iDiffSolverMethod=0;% -- The diff equation solver method, 0=ode45, 1=ode15s -- | ||
popedInput.bUseMemorySolver=0;% -- If the differential equation results should be stored in memory or not -- | ||
popedInput.iFIMCalculationType=0;% -- Fisher Information Matrix type (0=Full FIM, 1=Reduced FIM) -- | ||
popedInput.rsit=25;% -- Number of Random search iterations -- | ||
popedInput.sgit=5;% -- Number of Stochastic gradient search iterations -- | ||
popedInput.intrsit=100;% -- Number of Random search iterations when discrete optimization -- | ||
popedInput.intsgit=50;% -- Number of Stochastic Gradient search iterations when discrete optimization -- | ||
popedInput.maxrsnullit=50;% -- Iterations until adaptive narrowing in random search -- | ||
popedInput.convergence_eps=1e-60;% -- Stoachstic Gradient convergence value, (difference in OFV for D-optimal, difference in gradient for ED-optimal) -- | ||
popedInput.rslxt=4;% -- Random search locality factor for sample times -- | ||
popedInput.rsla=4;% -- Random search locality factor for covariates -- | ||
popedInput.cfaxt=0.001;% -- Stochastic Gradient search first step factor for sample times -- | ||
popedInput.cfaa=0.001;% -- Stochastic Gradient search first step factor for covariates -- | ||
popedInput.bGreedyGroupOpt=0;% -- Use greedy algorithm for group assignment optimization -- | ||
popedInput.EACriteria=1;% -- Exchange Algorithm Criteria, 1 = Modified, 2 = Fedorov -- | ||
popedInput.EAStepSize=0.01;% -- Exchange Algorithm StepSize -- | ||
popedInput.EANumPoints=0;% -- Exchange Algorithm NumPoints -- | ||
popedInput.EAConvergenceCriteria=1e-20;% -- Exchange Algorithm Convergence Limit/Criteria -- | ||
popedInput.bEANoReplicates=0;% -- Avoid replicate samples when using Exchange Algorithm -- | ||
popedInput.BFGSConvergenceCriteriaMinStep=1e-08;% -- BFGS Minimizer Convergence Criteria Minimum Step -- | ||
popedInput.BFGSProjectedGradientTol=0.0001;% -- BFGS Minimizer Convergence Criteria Normalized Projected Gradient Tolerance -- | ||
popedInput.BFGSTolerancef=0.001;% -- BFGS Minimizer Line Search Tolerance f -- | ||
popedInput.BFGSToleranceg=0.9;% -- BFGS Minimizer Line Search Tolerance g -- | ||
popedInput.BFGSTolerancex=0.1;% -- BFGS Minimizer Line Search Tolerance x -- | ||
popedInput.ED_samp_size=45;% -- Sample size for ED-optimal design distribution -- | ||
popedInput.ED_diff_it=30;% -- Number of iterations in ED-optimal design to calculate convergence criteria -- | ||
popedInput.ED_diff_percent=10;% -- ED-optimal design convergence criteria in percent -- | ||
popedInput.line_search_it=50;% -- Number of grid points in the line search -- | ||
popedInput.iNumSearchIterationsIfNotLineSearch=10;% -- Number of iterations of full Random search and full Stochastic Gradient if line search is not used -- | ||
|
||
popedInput.parallelSettings.iCompileOption=-1;% -- Compile option for PopED (-1 = No compilation, 0 or 3 = Full compilation, 1 or 4 = Only using MCC (shared lib), 2 or 5 = Only MPI, Option 0,1,2 runs PopED and option 3,4,5 ends after compilation -- | ||
popedInput.parallelSettings.iUseParallelMethod=1;% -- Parallel method to use (0 = Matlab PCT, 1 = MPI) -- | ||
popedInput.parallelSettings.strAdditionalMCCCompilerDependencies='';% -- Additional dependencies used in MCC compilation (mat-files), if several; space separated -- | ||
popedInput.parallelSettings.strExecuteName='calc_fim.exe';% -- Compilation output executable name -- | ||
popedInput.parallelSettings.iNumProcesses=2;% -- Number of processes to use when running in parallel (E.g. 3 = 2 workers, 1 job manager) -- | ||
popedInput.parallelSettings.iNumChunkDesignEvals=-1;% -- Number of design evaluations that should be evaluated in each process before getting new work from job manager -- | ||
popedInput.parallelSettings.strMatFileInputPrefix='parallel_input';% -- The prefix of the input mat file to communicate with the excutable -- | ||
popedInput.parallelSettings.strMatFileOutputPrefix='parallel_output';% -- The prefix of the output mat file to communicate with the excutable -- | ||
popedInput.parallelSettings.strExtraRunOptions='';% -- Extra options send to e.g. the MPI exectuable or a batch script, see execute_parallel.m for more information and options -- | ||
popedInput.parallelSettings.dPollResultTime=1.000000e-01;% -- Polling time to check if the parallel execution is finished -- | ||
popedInput.parallelSettings.strFunctionInputName='function_input';% -- The file containing the popedInput structure that should be used to evaluate the designs -- | ||
popedInput.parallelSettings.bParallelRS=0;% -- If the random search is going to be executed in parallel -- | ||
popedInput.parallelSettings.bParallelSG=0;% -- If the stochastic gradient search is going to be executed in parallel -- | ||
popedInput.parallelSettings.bParallelLS=0;% -- If the line search is going to be executed in parallel -- | ||
popedInput.parallelSettings.bParallelMFEA=0;% -- If the modified exchange algorithm is going to be executed in parallel -- | ||
popedInput.user_data={};% -- User defined data structure that e.g. could be used to send in data to the model -- | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
function pop_params = sfg(x,a,bpop,b,bocc) | ||
|
||
% -- Auto generated parameter definition file -- | ||
% -- Created: 04-Apr-2012 19:13:30 | ||
% -- {CL,V,Wt} -- | ||
|
||
|
||
pop_params=[ bpop(1)*exp(b(1)) %g(1)=CL | ||
bpop(2)*exp(b(2)) %g(2)=V | ||
bpop(3) % emax | ||
bpop(4) % ec50 | ||
bpop(5) % hill | ||
a(1)]; % Wt | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Version: 1.0 | ||
|
||
RestoreWorkspace: Default | ||
SaveWorkspace: Default | ||
AlwaysSaveHistory: Default | ||
|
||
EnableCodeIndexing: Yes | ||
UseSpacesForTab: Yes | ||
NumSpacesForTab: 2 | ||
Encoding: UTF-8 | ||
|
||
RnwWeave: Sweave | ||
LaTeX: pdfLaTeX | ||
|
||
BuildType: Package | ||
PackageInstallArgs: --no-multiarch --with-keep.source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
exportPattern("^[[:alpha:]]+") |
Oops, something went wrong.