主要内容

sbiosampleparameters

通过采样协变量模型生成参数(需要统计和机器学习工具箱软件)

描述

例子

φ= sbiosampleparameters (covexprθωds产生一个矩阵φ使用使用协变态表达式指定的协变量模型包含采样参数值covexpr,固定效果θ,协方差矩阵ω,和协变量数据ds

例子

φ= sbiosampleparameters (covexprθωn使用一个标量n它指定的行数φ当参数不依赖于任何协变量时。

例子

φcovmodel] = sbiosampleparameters (_)返回一个矩阵φ和一个协变量模型对象covmodel使用先前语法的任何输入参数。

例子

全部折叠

本例使用了59名早产儿在出生后的前16天服用苯巴比妥的数据。每名婴儿接受一次初始剂量,随后进行一次或多次静脉滴注维持剂量。对每名婴儿进行了总共1至6次浓度测量,而不是在剂量时间,共进行了155次测量。研究人员还记录了婴儿体重和新生儿健康指数(APGAR)。数据在[1]中进行了描述,该研究由NIH/NIBIB资助P41-EB01975。

加载数据。

负载pheno.matds

可视化数据。

t = sbiotrellis(DS,“ID”“时间”“浓缩的”“标记”“o”“markerfacecolor”,(。7 7 7),'markeredgecolor'“r”'linestyle'“没有”);t.plottitle =“州与时间”

图中包含64个轴对象。轴对象1具有标题ID 1包含类型线的对象。此对象表示粗。具有标题ID 9的轴对象2包含类型线的对象。轴对象3具有标题ID 17包含类型线的对象。轴对象4具有标题ID 25包含类型线的对象。具有标题ID 33的轴对象5包含类型线的对象。轴对象6标题ID 41包含类型线的对象。具有标题ID 49的轴对象7包含类型线的对象。轴对象8标题ID 57包含类型线的对象。 Axes object 9 with title ID 2 contains an object of type line. Axes object 10 with title ID 10 contains an object of type line. Axes object 11 with title ID 18 contains an object of type line. Axes object 12 with title ID 26 contains an object of type line. Axes object 13 with title ID 34 contains an object of type line. Axes object 14 with title ID 42 contains an object of type line. Axes object 15 with title ID 50 contains an object of type line. Axes object 16 with title ID 58 contains an object of type line. Axes object 17 with title ID 3 contains an object of type line. Axes object 18 with title ID 11 contains an object of type line. Axes object 19 with title ID 19 contains an object of type line. Axes object 20 with title ID 27 contains an object of type line. Axes object 21 with title ID 35 contains an object of type line. Axes object 22 with title ID 43 contains an object of type line. Axes object 23 with title ID 51 contains an object of type line. Axes object 24 with title ID 59 contains an object of type line. Axes object 25 with title ID 4 contains an object of type line. Axes object 26 with title ID 12 contains an object of type line. Axes object 27 with title ID 20 contains an object of type line. Axes object 28 with title ID 28 contains an object of type line. Axes object 29 with title ID 36 contains an object of type line. Axes object 30 with title ID 44 contains an object of type line. Axes object 31 with title ID 52 contains an object of type line. Axes object 32 is empty. Axes object 33 with title ID 5 contains an object of type line. Axes object 34 with title ID 13 contains an object of type line. Axes object 35 with title ID 21 contains an object of type line. Axes object 36 with title ID 29 contains an object of type line. Axes object 37 with title ID 37 contains an object of type line. Axes object 38 with title ID 45 contains an object of type line. Axes object 39 with title ID 53 contains an object of type line. Axes object 40 is empty. Axes object 41 with title ID 6 contains an object of type line. Axes object 42 with title ID 14 contains an object of type line. Axes object 43 with title ID 22 contains an object of type line. Axes object 44 with title ID 30 contains an object of type line. Axes object 45 with title ID 38 contains an object of type line. Axes object 46 with title ID 46 contains an object of type line. Axes object 47 with title ID 54 contains an object of type line. Axes object 48 is empty. Axes object 49 with title ID 7 contains an object of type line. Axes object 50 with title ID 15 contains an object of type line. Axes object 51 with title ID 23 contains an object of type line. Axes object 52 with title ID 31 contains an object of type line. Axes object 53 with title ID 39 contains an object of type line. Axes object 54 with title ID 47 contains an object of type line. Axes object 55 with title ID 55 contains an object of type line. Axes object 56 is empty. Axes object 57 with title ID 8 contains an object of type line. Axes object 58 with title ID 16 contains an object of type line. Axes object 59 with title ID 24 contains an object of type line. Axes object 60 with title ID 32 contains an object of type line. Axes object 61 with title ID 40 contains an object of type line. Axes object 62 with title ID 48 contains an object of type line. Axes object 63 with title ID 56 contains an object of type line. Axes object 64 is empty.

建立单室药代动力学模型,采用大剂量给药,线性清除率对数据进行建模。

pkmd = PKModelDesign;pkmd.addCompartment ('中央''dentytype'“丸”“EliminationType”“linear-clearance”...“HasResponseVariable”,真的,“HasLag”、假);onecomp = pkmd.construct;

假设中央腔室的体积(中央)和婴儿的体重。您可以使用一个协变量模型来定义这个参数-协变量关系,该协变量模型可以描述为

日志 V θ V + θ V W E G H T * W E G H T + η V

在哪里,每个第i个婴儿,Vθs (theta)是固定效应,η (eta)是随机效应,和重量是协变量。

covM = CovariateModel;covM。Expression = {'Central = Exp(Theta1 + Theta2 *重量+ eta1)'};

定义固定和随机效果。每个表的列名必须分别有固定效应和随机效应的名称。

θ=表(1.4,0.05,“VariableNames”,{'theta1'“θ”});eta1 =表(0.2,“VariableNames”,{“eta1”});

控件的要求将组标签ID更改为groupsbiosampleparameters函数。

ds.Properties.VariableNames {“ID”} =“集团”

基于数据集中所有婴儿的协变量模型生成中央隔室中央中心卷的参数值。

θ,φ= sbiosampleparameters (covM.Expression eta1, ds);

然后,您可以使用采样的参数值模拟模型。为方便起见,使用SIMFUNCTION对象提供的函数类似的接口。

首先,使用CreateImfunction方法构造SimFunction对象,将体积(中央)指定为参数,以及隔室中的药物浓度(药物_Central)作为SimFunction对象的输出和给药物种。

f = createSimFunction (onecomp covM。ParameterNames,“Drug_Central”“Drug_Central”);

数据集ds包含每个婴儿的剂量信息,而groupedData对象提供了一种方便的方法来提取这种剂量信息。将ds转换为groupedData对象并提取剂量信息。

grpData = groupedData (ds);剂量= createDoses (grpData,“剂量”);

利用从phi中采样的参数值和提取的每个婴儿的剂量信息模拟模型,并绘制结果。第i次运行使用phi中的第i个参数值和第i个婴儿的剂量信息。

t = sbiotrellis (f(φ200 doses.getTable), [],“时间”“Drug_Central”);%调整数字大小。t.hFig.Position(:) = [100 100 1280 800];

图中包含64个轴对象。标题为Run 1的轴对象1包含一个类型为line的对象。该对象表示Drug_Central。标题为Run 9的axis对象2包含一个类型为line的对象。标题为Run 17的axis对象3包含一个类型为line的对象。标题为Run 25的axis对象4包含一个类型为line的对象。标题为Run 33的axis对象5包含一个类型为line的对象。标题为Run 41的Axes对象6包含一个类型为line的对象。标题为Run 49的axis对象7包含一个类型为line的对象。标题为Run 57的axis对象8包含一个类型为line的对象。 Axes object 9 with title Run 2 contains an object of type line. Axes object 10 with title Run 10 contains an object of type line. Axes object 11 with title Run 18 contains an object of type line. Axes object 12 with title Run 26 contains an object of type line. Axes object 13 with title Run 34 contains an object of type line. Axes object 14 with title Run 42 contains an object of type line. Axes object 15 with title Run 50 contains an object of type line. Axes object 16 with title Run 58 contains an object of type line. Axes object 17 with title Run 3 contains an object of type line. Axes object 18 with title Run 11 contains an object of type line. Axes object 19 with title Run 19 contains an object of type line. Axes object 20 with title Run 27 contains an object of type line. Axes object 21 with title Run 35 contains an object of type line. Axes object 22 with title Run 43 contains an object of type line. Axes object 23 with title Run 51 contains an object of type line. Axes object 24 with title Run 59 contains an object of type line. Axes object 25 with title Run 4 contains an object of type line. Axes object 26 with title Run 12 contains an object of type line. Axes object 27 with title Run 20 contains an object of type line. Axes object 28 with title Run 28 contains an object of type line. Axes object 29 with title Run 36 contains an object of type line. Axes object 30 with title Run 44 contains an object of type line. Axes object 31 with title Run 52 contains an object of type line. Axes object 32 is empty. Axes object 33 with title Run 5 contains an object of type line. Axes object 34 with title Run 13 contains an object of type line. Axes object 35 with title Run 21 contains an object of type line. Axes object 36 with title Run 29 contains an object of type line. Axes object 37 with title Run 37 contains an object of type line. Axes object 38 with title Run 45 contains an object of type line. Axes object 39 with title Run 53 contains an object of type line. Axes object 40 is empty. Axes object 41 with title Run 6 contains an object of type line. Axes object 42 with title Run 14 contains an object of type line. Axes object 43 with title Run 22 contains an object of type line. Axes object 44 with title Run 30 contains an object of type line. Axes object 45 with title Run 38 contains an object of type line. Axes object 46 with title Run 46 contains an object of type line. Axes object 47 with title Run 54 contains an object of type line. Axes object 48 is empty. Axes object 49 with title Run 7 contains an object of type line. Axes object 50 with title Run 15 contains an object of type line. Axes object 51 with title Run 23 contains an object of type line. Axes object 52 with title Run 31 contains an object of type line. Axes object 53 with title Run 39 contains an object of type line. Axes object 54 with title Run 47 contains an object of type line. Axes object 55 with title Run 55 contains an object of type line. Axes object 56 is empty. Axes object 57 with title Run 8 contains an object of type line. Axes object 58 with title Run 16 contains an object of type line. Axes object 59 with title Run 24 contains an object of type line. Axes object 60 with title Run 32 contains an object of type line. Axes object 61 with title Run 40 contains an object of type line. Axes object 62 with title Run 48 contains an object of type line. Axes object 63 with title Run 56 contains an object of type line. Axes object 64 is empty.

输入参数

全部折叠

协变量表达式,指定为定义参数协变量关系的字符向量或字符串向量的单元格数组。

如果模型组件名称或协变量名称不是有效的MATLAB®变量名,在表达式中引用时用方括号括起来。例如,如果一个物种的名称是DNA聚合酶+, 写(DNA聚合酶+).如果协变量名称本身包含方括号,则不能在表达式中使用它。

看到CovariateModel对象了解有关协变态表达的更多信息。

固定效果,指定为包含在协变量表达式中定义的固定效果参数值的表、数据集或数字向量covexpr.固定效果参数名称必须以“θ”

  • 如果θ是一个表,thetas.Properties.VariableNames必须与固定效果的名称匹配。

    例如,假设你有三个θthetaOne= 0.1Theta2.= 0.2,Theta3.= 0.3.您可以创建相应的表。

    θ=表(0.1,0.2,0.3);thetas.Properties.VariableNames = {'thetaone'“θ”'theta3'
    θ= 1×3表thetaOneθ1  ________ ______ ______ 0.1 0.2 0.3

  • 如果θ是一个数据集,thetas.Properties.VarNames必须与固定效果的名称匹配。

  • 如果θ是一个数字向量,向量中值的顺序必须与固定效果名称的升序ASCII字典顺序相同。

    使用种类函数对字符向量的单元格数组进行排序,以查看顺序。

    种类({'thetaone'“θ”'theta3'})
    ans = 1×3 cell array {'theta2'} {'theta3'} {'thetaOne'}

    然后指定每个值θ以相同的顺序。

    Thetas = [0.2 0.3 0.1];

随机效应的协方差矩阵,指定为表,数据集或矩阵。随机效果参数名称必须从“埃塔”

  • 如果ω是一个表,omega.properties.variablenames.必须与随机效果的名称匹配。指定行名(RowNames)是可选的,但如果你这样做,它们也必须匹配随机效果的名称。

    假设您想定义一个带有三个随机效应参数的对角协方差矩阵eta1eta2,eta3的值0.10.2,0.3,分别。

    C o v η 1 η 1 C o v η 1 η 2 C o v η 1 η 3. C o v η 2 η 1 C o v η 2 η 2 C o v η 2 η 3. C o v η 3. η 1 C o v η 3. η 2 C o v η 3. η 3. e t 一个 1 0 0 0 e t 一个 2 0 0 0 e t 一个 3.

    您可以构建相应的表。

    eta1 = (0.1, 0, 0);eta2 =(0、0.2、0);eta3 = (0, 0, 0.3);ω=表(eta1 eta2 eta3,“VariableNames”,{“eta1”“eta2”“eta3”})
    Omega = 3×3表ETA1 ETA2 ETA3 ____ ____ ____ 0.1 0 0 0 0.2 0 0 0 0.3

  • 如果ω是一个数据集,omega.Properties.VarNames必须与随机效果的名称匹配。指定行名(ObsNames)是可选的,但如果你这样做,它们也必须匹配随机效果的名称。

  • 如果ω是一个矩阵,行和列必须具有与随机效应名称相同的升序ASCII字典顺序。

    使用种类函数对字符向量的单元格数组进行排序,以查看顺序。

    种类({“eta1”“eta2”“eta3”})
    Ans = 1×3 cell array {'eta1'} {'eta2'} {'eta3'}

协调数据,指定为包含所有组的协变量数据的数据集或表。

ds必须有一个列命名'团体'或者“集团”指定组标签以及每个协议模型中使用的所有协变量的列。列名称必须与协变量表达式中使用的相应协变量的名称匹配。

行数φ,指定为标量。

输出参数

全部折叠

采样的参数值,返回大小为S-by-P的矩阵,其中年代是指定的组数ds或指定的nP是等于元素数量的参数数covexpr

协变量模型,返回为CovariateModel对象哪个表示定义的模型covexpr

兼容性考虑因素

全部展开

警告从R2018b开始

参考文献

[1] Grasela Jr,T.H.,Donn,S.M.(1985)苯巴罗布尔布毒素的新生儿群体药代动力学衍生自常规临床数据。Dev Pharmacol Ther。8(6),374-83。

在R2014A介绍