主要内容

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”“线型”“没有”);t.plottitle =“州与时间”

图中包含64个轴对象。标题ID为1的Axes对象1包含一个类型为line的对象。标题ID为9的Axes对象2包含一个类型为line的对象。标题ID为17的Axes对象3包含一个类型为line的对象。标题ID为25的Axes对象4包含一个类型为line的对象。标题ID为33的Axes对象5包含一个类型为line的对象。标题ID为41的Axes对象6包含一个类型为line的对象。标题ID为49的Axes对象7包含一个line类型的对象。标题ID为57的Axes对象8包含一个line类型的对象。标题ID为2的Axes对象9包含一个类型为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.

创建一个单室PK模型与丸给药和线性间隙建模这些数据。

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

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

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

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

covM = CovariateModel;covM。Expression = {'中心= exp(theta1+theta2*WEIGHT+eta1)'};

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

=表(1.4,0.05,“VariableNames”, {“θ₁”“θ”});Eta1 = table(0.2,“VariableNames”, {“eta1”});

将组标签ID更改为groupsbiosampleparameters函数。

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

基于数据集中所有婴儿的协变量模型,生成中央室室中央体积的参数值。

phi = sbiosampleparameters(covM.Expression,theta,eta1,ds);

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

首先,使用createSimFunction方法构造一个SimFunction对象,将体积(Central)指定为参数,将分隔室中的药物浓度(Drug_Central)指定为SimFunction对象的输出,并指定给药种类。

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

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

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

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

t = sbiotrellis(f(phi,200,dose . gettable),[],“时间”“Drug_Central”);调整图形的大小。t.hFig.Position(:) = [100 100 1280 800];

图中包含64个轴对象。运行1包含一个类型为line的对象。axis对象2(标题为Run 9)包含一个类型为line的对象。axis对象3(标题为Run 17)包含一个类型为line的对象。标题为Run 25的Axes对象4包含一个类型为line的对象。axis对象5(标题为Run 33)包含一个类型为line的对象。axis对象6,标题为Run 41,包含一个类型为line的对象。axis对象7,标题为Run 49,包含一个类型为line的对象。标题为Run 57的Axes对象8包含一个类型为line的对象。axis对象9的标题Run 2包含一个类型为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对象了解更多关于协变量表达式的信息。

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

  • 如果θ是一张桌子,thetas.Properties.VariableNames必须与固定效果的名称相匹配。

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

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

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

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

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

    排序({“thetaOne”“θ”“1”})
    ans = 1×3 cell array {'theta2'} {'theta3'} {'thetaOne'}

    然后指定每个值θ顺序是一样的。

    Thetas = [0.2 0.3 0.1];

随机效应的协方差矩阵,用表格表示,groupedData、数据集或矩阵。随机效应参数名称必须以“埃塔”

  • 如果ω是一张桌子,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];= table(et1, et2, et3,“VariableNames”, {“eta1”“eta2”“eta3”})
    Omega = 3×3 table 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'}

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

ds必须为协变量模型中使用的每个协变量都有一列。列名必须与协变量表达式中使用的对应协变量的名称匹配。

中的行数φ,指定为标量。

输出参数

全部折叠

采样参数值,作为大小为S-by-P的矩阵返回,其中年代组的数量是否在ds或由n而且P参数的数量是否等于元素的数量covexpr

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

参考文献

Grasela Jr, t.h., Donn, S.M.(1985)从常规临床数据得出苯巴比妥的新生儿人群药代动力学。中国药理学杂志8(6),374-83。

版本历史

在R2014a中介绍

全部展开