主要内容

estimatedInfo

对象,其中包含有关估计模型数量的信息

描述

estimatedInfo对象包含有关估计模型数量(种类、参数或隔室)的信息。使用该对象指定SimBiology中的数量®模型的估计,使用的参数转换,以及可选的,使用时这些数量的初始估计sbiofitsbiofitmixed

创建

描述

estimInfo= estimatedInfo创建一个空的estimatedInfo对象。

例子

estimInfoArray= estimatedInfo (transformedNames创建一个向量estimatedInfo中指定数量的对象transformedNames.这些数量的初始值是在运行时从SimBiology模型获得的sbiofitsbiofitmixed

例子

estimInfoArray= estimatedInfo (___名称,值使用一个或多个名称-值参数指定其他选项。例如,您可以定义模型数量的初始值或初始转换值,参数估计的下界和上界或转换后的下界和上界,以及具有单独估计参数的组。

输入参数

全部展开

估计模型数量的名称,指定为字符向量、字符串、字符串向量或字符向量的单元数组。要明确地命名一个物种,请使用限定名,其中包括该物种所在隔间的名称。要命名反应作用域的参数,请使用反应名称来限定参数。每个字符向量(或字符串)必须是以下格式之一:

  • 模型数量的名称或限定名称,如“氯”“Reaction1.k”“c[1]。[r 1]”

  • 支持的参数转换的名称万博1manbetx(日志分对数,或probit),然后在括号中加上数量名称,例如日志(Cl)的分对数(Reaction1.k)”probit (c[1]。[r 1])”

有关详情,请参阅参数转换

名称-值参数

指定可选的参数对为Name1 = Value1,…,以=家,在那里名字是参数名和吗价值是对应的值。名称-值参数必须出现在其他参数之后,但对的顺序无关紧要。

在R2021a之前,使用逗号分隔每个名称和值,并将其括起来名字在报价。

例子:estimated = estimatedInfo('log(Central)','InitialValue', 1,'Bounds',[0 10])

模型数量的初始转换值,指定为矢量或单元数组。它的长度必须等于transformedNames.如果是单元格数组,则单元格的每个元素必须是标量或空矩阵[]

参数同时指定此名称-值参数“InitialValue”名称-值参数。

模型数量的初始值,指定为矢量或单元数组。它的长度必须等于transformedNames.如果是单元格数组,则单元格的每个元素必须是标量或空矩阵[]

参数同时指定此名称-值参数“InitialTransformedValue”名称-值参数。

估计参数(boundValues),指定为矩阵或单元数组。如果boundValues是矩阵,它是anN-2的数字矩阵,其中N是1还是的长度transformedNames.如果是单元格数组,则每个元素必须是大小为1 × 2或为空的向量[]

每一行boundValues的每个元素(如参数)的下界(第一个数字)和上界(第二个数字)estimInfo.下界必须小于上界。如果指定单行,则这些边界将应用于的所有元素estimInfoArray

所有方法都支持参数边界万博1manbetxsbiofit(即,fminsearchnlinfit(统计学和机器学习工具箱)fminunc(优化工具箱)fmincon(优化工具箱)lsqcurvefit(优化工具箱)lsqnonlin(优化工具箱)patternsearch(全局优化工具箱)遗传算法(全局优化工具箱)particleswarm(全局优化工具箱),scattersearch)。当使用fminsearchnlinfit,或fminunc有了边界,目标函数返回如果超出界限。当您打开选项,如FunValCheck,如果在估计过程中超出界限,则优化可能会出错。如果使用nlinfit,它可能会报告雅可比矩阵是病态的或无法估计最终结果是否太接近边界的警告。sbiofitmixed不支持参数边界。万博1manbetx

参数同时指定此名称-值参数“TransformedBounds”名称-值参数。

估计参数的变换下界和上界(tBoundValues),指定为矩阵或单元数组。tBoundValues是一个N-2的数字矩阵,其中N是1还是的长度transformedNames.如果是单元格数组,则每个元素必须是大小为1 × 2或为空的向量[]

每一行tBoundValues的每个元素(如参数)的下界(第一个数字)和上界(第二个数字)estimInfo.下界必须小于上界。的所有元素都应用边界estimInfoArray

参数同时指定此名称-值参数“界限”名称-值参数。

估计参数的组名称,指定为字符向量、字符串、字符串向量或字符向量的单元数组。每个字符向量(或字符串)必须是下列条件之一。

  • 用于拟合的数据中变量的名称

  • ' < GroupVariableName >”(默认)

  • “<无>”

' < GroupVariableName >”指示数据中的每一组使用单独的参数估计值。“<无>”指示数据中的所有组使用相同的参数估计值。

如果计划用于拟合的数据包含将数据分组为不同类别的变量,则可以指定这些变量的名称。例如,如果你有一个变量叫做哪个表示男性和女性个体,你可以指定吗“性”随着“CategoryVariableName”.这意味着所有雄性个体都有一组参数估计,而所有雌性个体都有一组单独的参数估计。

输出参数

全部展开

估计的模型数量,作为返回estimatedInfo对象。

估计的模型数量,作为返回estimatedInfo的对象或向量estimatedInfo对象。如果transformedNames是一个单字符向量,estimInfoArray是一个标量estimatedInfo对象。否则,estimInfoArray是的向量estimatedInfo对象,其长度与输入参数相同transformedNames

属性

全部展开

估计模型数量的名称,指定为字符向量。更改此属性还会更新TransformedName财产。

对估计过程中的量值进行变换,指定为''“日志”分对数的,或“probit”.空字符向量''指示不应用任何转换。

对数变换确保在估计期间组件值始终为正。的分对数probit转换将组件值约束在0到1之间。

probit函数是与标准正态分布相关的逆累积分布函数。为probit转换,SimBiology使用norminv(统计学和机器学习工具箱)函数。因此,需要统计和机器学习工具箱™进行转换。

logit函数是sigmoid函数的逆函数,定义为Logit (x) = log(x) - log(1 - x)

该属性是只读的。

组合转换名称(例如“日志”)和数量名称(如“中央”),指定为字符向量(例如“日志(中央)”)。

用于估计的模型数量的初始值,指定为空矩阵[]或者一个实的,有限的标量值。空矩阵表示估算的初始值由相关的数量属性(价值为参数,InitialAmount对于物种,能力车厢)。

更改此属性会自动更新InitialTransformedValue相应模型量的性质。

用于估计的模型量的初始转换值,指定为空矩阵[]或者标量值。空矩阵表示通过变换相关的量属性(价值为参数,InitialAmount对于物种,能力车厢)。

更改此属性会自动更新InitialValue相应模型量的性质。

估计参数的下界和上界,指定为空矩阵[]或者是一个实的有限值的1 × 2向量。空矩阵[]的值引入的约束是唯一的绑定约束变换.例如,设置变换“日志”将参数限制为范围[0,正].更改此属性也会更新TransformedBounds

下界必须小于上界。

一个估计参数的变换下界和上界,指定为一个空矩阵[]或者是一个实的有限值的1 × 2向量。空矩阵[]表示该参数在变换空间中的值不受约束。更改此属性也会更新界限

下界必须小于上界。

数据组具有单独的估计参数,指定为字符向量或字符向量的单元数组。字符向量可以是拟合数据中变量的名称,也可以是其中一个关键字:' < GroupVariableName >”“<无>”

' < GroupVariableName >”指示数据中的每一组使用单独的参数估计值。“<无>”指示数据中的所有组使用相同的参数估计值。

如果你指定“池”名称-值参数(或真正的)当你跑的时候sbiofit,则该函数忽略该变量。sbiofitmixed总是忽略这个属性。

例子

全部折叠

创建一个单室PK模型与大剂量和线性间隙。

pkmd = PKModelDesign;pkc1 = add格室(pkmd,“中央”);pkc1。DosingType =“丸”;pkc1。EliminationType =“linear-clearance”;pkc1。HasResponseVariable = true;

假设你想估算中央车厢的容积(中央)。您可以指定估计的模型数量以及适当的参数转换(日志转换(在此示例中)、初始值和参数绑定estimatedInfo对象。

estimated = estimatedInfo()“日志(中央)”“InitialValue”, 1“界限”, 10 [0])
estimated = estimatedInfo with properties: Name: 'Central' Transform: 'log' transformmedname: 'log(Central)' InitialValue: 1 initialtransformmedvalue: 0 Bounds: [0 10] transformmedbounds: [-Inf 2.3026] CategoryVariableName: ''

背景

这个例子展示了如何将个体的PK数据拟合到单室模型中,并估计药代动力学参数。

假设你有一个人的药物血浆浓度数据,想要估计中央室的容积和清除率。假设药物浓度随时间曲线呈单指数下降 C t C 0 e - k e t ,在那里 C t 是t时刻的药物浓度, C 0 初始浓度是多少 k e 消除率是否取决于中央隔室的间隙和容积 k e C l / V

本例中的合成数据使用以下模型、参数和剂量生成:

  • 单室模型,大剂量给药和一阶消除

  • 中央车厢容积(中央) = 1.70升

  • 间隙参数(Cl_Central) = 0.55升/小时

  • 恒定误差模型

  • 丸量为10毫克

加载数据和可视化

数据存储为带有变量的表时间浓缩的这代表了在13个不同时间点静脉注射后个体血浆浓度的时间过程。的可变单位时间浓缩的分别是小时和毫克/升。

负载(“data15.mat”)情节(data.Time data.Conc,“b +”)包含(的时间(小时));ylabel (“药物浓度(毫克/升)”);

图包含一个轴对象。具有xlabel Time(小时),ylabel Drug Concentration(毫克/升)的axes对象包含一个line对象,该对象仅使用标记显示其值。

转换为groupedData格式

将数据集转换为agroupedData对象,它是拟合函数所需的数据格式sbiofit供以后使用。一个groupedData对象还允许您设置独立变量和组变量名称(如果存在的话)。设置的单位时间浓缩的变量。单元是可选的,并且只需要UnitConversion特性,自动将匹配的物理量转换为一个一致的单位系统。

gData = groupedData(data);gData.Properties.VariableUnits = {“小时”毫克/升的};gData。属性
ans =带有字段的结构体:描述:" UserData: [] DimensionNames: {'Row' 'Variables'} VariableNames: {'Time' 'Conc'} variabledescription: {} VariableUnits: {'hour' '毫克/升'}variableccontinucontinuity: [] RowNames: {} CustomProperties: [1x1 matlab.tabular。GroupVariableName: 'Time'

groupedData自动设置的名称IndependentVariableName属性赋给时间数据的变量。

构建一个单室模型

使用内置的PK库构建一个单室模型,具有丸给药和一阶消除,其中消除率取决于中央室的间隙和体积。使用configset对象以开启单位转换。

pkmd = PKModelDesign;pkc1 = add格室(pkmd,“中央”);pkc1。DosingType =“丸”;pkc1。EliminationType =“linear-clearance”;pkc1。HasResponseVariable = true;Model = construct(pkmd);Configset = getconfigset(model);configset.CompileOptions.UnitConversion = true;

有关使用SimBiology®内置库创建分区PK模型的详细信息,请参见创建药代动力学模型

定义剂量

确定在时间= 0时给药的单次剂量为10毫克。有关设置不同给药时间表的详细信息,请参见SimBiology模型中的剂量

剂量= sbiodose(“剂量”);剂量。TargetName =“Drug_Central”;剂量。StartTime = 0;剂量。一个mount = 10; dose.AmountUnits =毫克的;剂量。时间Units =“小时”;

将响应数据映射到相应的模型组件

中存储的药物浓度数据浓缩的变量。这个数据对应于Drug_Central模型中的物种。因此,将数据映射到Drug_Central如下。

responseMap = {'Drug_Central = Conc'};

指定要估计的参数

该模型拟合的参数是中央车厢(central)的体积和清除率(Cl_Central)。在这种情况下,为这些生物参数指定对数变换,因为它们被约束为正的。的estimatedInfo对象允许您根据需要指定参数转换、初始值和参数边界。

paramsToEstimate = {“日志(中央)”“日志(Cl_Central)”};estimatedParams = estimatedInfo(paramsToEstimate,“InitialValue”[1],“界限”,[1 5;0.5 2]);

估计参数

现在您已经定义了单室模型、拟合数据、映射响应数据、估计参数和剂量sbiofit估计参数。默认的估计函数sbiofit用法将根据可用的工具箱而变化。要查看在拟合过程中使用了哪个函数,请检查EstimationFunction属性的对应结果对象。

fitConst = sbiofit(model,gData,responseMap,estimatedParams,dose);

显示估计参数和绘图结果

注意,参数估计值与用于生成数据的真实值(1.70和0.55)相差不远。您还可以尝试不同的误差模型,看看它们是否可以进一步改进参数估计。

fitConst。ParameterEstimates
ans =2×4表名字估计StandardError界限  ______________ ________ _____________ __________ {' 中央}1.6993 0.034821 1 5{‘Cl_Central} 0.53358 - 0.01968 0.5 - 2
s.Labels.XLabel =的时间(小时);s.Labels.YLabel =的浓度(毫克/升);情节(fitConst“AxesStyle”,年代);

图包含一个轴对象。axes对象包含2个line类型的对象。其中一行或多行仅使用标记显示其值

使用不同的错误模型

尝试其他三种支持的误差模型(比例万博1manbetx误差模型、常数和比例误差模型的组合以及指数误差)。

fitProp = sbiofit(model,gData,responseMap,estimatedParams,dose,...“ErrorModel”“比例”);fitExp = sbiofit(model,gData,responseMap,estimatedParams,dose,...“ErrorModel”“指数”);fitComb = sbiofit(model,gData,responseMap,estimatedParams,dose,...“ErrorModel”“组合”);

使用权重而不是错误模型

您可以将权重指定为数字矩阵,其中列的数量对应于响应的数量。将所有权重设置为1相当于恒定误差模型。

weightsNumeric = ones(size(gData.Conc));fitWeightsNumeric = sbiofit(model,gData,responseMap,estimatedParams,dose,“重量”, weightsNumeric);

或者,您可以使用一个函数句柄,它接受预测响应值的向量并返回权重向量。在本例中,使用一个相当于比例误差模型的函数句柄。

@(y) 1./y.^2;fitWeightsFunction = sbiofit(model,gData,responseMap,estimatedParams,dose,“重量”, weightsFunction);

比较模型选择的信息标准

比较每个模型的loglikelihood、AIC和BIC值,以查看哪个错误模型最适合数据。似然值越大,表示对应的模型与模型拟合得越好。对于AIC和BIC,值越小越好。

allResults = [fitConst,fitWeightsNumeric,fitWeightsFunction,fitProp,fitExp,fitComb];errorModelNames = {“恒定误差模型”相同重量的的权重比例...“比例误差模型”指数误差模型...“组合误差模型”};LogLikelihood = [allResults.LogLikelihood];AIC = [allResults.AIC]';[allResults.BIC]';t = table(LogLikelihood,AIC,BIC);. properties . rownames = errorModelNames;t
t =6×3表LogLikelihood AIC BIC _____________ _______ _______常数误差模型3.9866 -3.9732 -2.8433等权3.9866 -3.9732 -2.8433比例权重-3.8472 11.694 12.824比例误差模型-3.8257 11.651 12.781指数误差模型1.1984 1.6032 2.7331组合误差模型3.9163 -3.8326 -2.7027

基于信息准则,恒定误差模型(或等权模型)具有最大的对数似然值和最小的AIC和BIC,因此最适合数据。

显示估计参数值

显示每个模型的估计参数值。

Estimated_Central = 0 (6,1);Estimated_Cl_Central = 0 (6,1);t2 = table(Estimated_Central,Estimated_Cl_Central);t2.Properties。RowNames = errorModelNames;i = 1:height(t2) t2{i,1} = allResults(i).ParameterEstimates.Estimate(1);t2{i,2} = allResults(i).ParameterEstimates.Estimate(2);结束t2
t2 =6×2表Estimated_Central Estimated_Cl_Central _________________ ____________________常数误差模型1.6993 0.53358等权1.6993 0.53358比例权重1.9045 0.51734比例误差模型1.8777 0.51147指数误差模型1.7872 0.51701组合误差模型1.7008 0.53271

结论

这个例子展示了如何通过将PK剖面数据拟合到单室模型中来估计PK参数,即个体中央室的体积和间隙参数。您比较了每个模型的信息标准,并估计了不同误差模型的参数值,以查看哪个模型最能解释数据。最终的拟合结果表明,常数和组合误差模型都提供了最接近用于生成数据的参数值的估计。然而,从对数似然、AIC和BIC信息标准可以看出,恒定误差模型是一个更好的模型。

这个示例展示了如何使用来自多个个体的PK配置文件数据来估计特定类别(例如年轻与年老、男性与女性)、特定个体和群体范围的参数。

背景

假设你有30个人的药物血浆浓度数据,想要估计药代动力学参数,即中央和外周室的体积、清除率和室间清除率。假设药物浓度随时间曲线呈双指数下降 C t 一个 e - 一个 t + B e - b t ,在那里 C t t时刻的药物浓度是多少 一个 b 是对应指数下降的斜率。

加载数据

这一合成数据包含了30个个体在给药(100mg)后在不同时间测量的中央和外周腔室血浆浓度的时间过程。它还包含分类变量,即年龄

明确负载(“sd5_302RAgeSex.mat”

转换为groupedData格式

将数据集转换为agroupedData对象,它是拟合函数所需的数据格式sbiofit.一个groupedData对象还允许您设置独立变量和组变量名称(如果存在的话)。设置的单位ID时间CentralConcPeripheralConc年龄,变量。单元是可选的,并且只需要UnitConversion特性,自动将匹配的物理量转换为一个一致的单位系统。

gData = groupedData(data);gData.Properties.VariableUnits = {''“小时”毫克/升的毫克/升的''''};gData。属性
ans =带有字段的结构体:描述:" UserData: [] DimensionNames:{'行''变量'}变量名称:{'ID' '时间''中心conc ''外设conc ''性别''年龄'}变量描述:{}变量单位:{" '小时''毫克/升''毫克/升' '' ''}变量连续性:[]RowNames: {} CustomProperties: [1x1 matlab.tabular。组变量名:'ID'独立变量名:'时间'

IndependentVariableNameGroupVariableName属性已自动设置为时间ID数据的变量。

可视化数据

显示每个人的响应数据。

t = sbiotrellis(gData,“ID”“时间”, {“CentralConc”“PeripheralConc”},...“标记”“+”“线型”“没有”);%调整图形大小。t.hFig.Position(:) = [100 100 1280 800];

图中包含30个轴对象。标题ID为1的轴对象1包含2个类型为line的对象。其中一行或多行仅使用标记显示其值。这些对象表示CentralConc, PeripheralConc。标题ID为6的轴对象2包含2个类型为line的对象。一个或多个行仅使用标记显示其值。标题ID为11的轴对象3包含2个类型为line的对象。一个或多个行仅使用标记显示其值。标题ID为16的轴对象4包含2个类型为line的对象。一个或多个行仅使用标记显示其值。标题ID为21的坐标轴对象5包含2个类型为line的对象。一个或多个行仅使用标记显示其值。标题ID为26的坐标轴对象6包含2个类型为line的对象。一个或多个行仅使用标记显示其值。标题ID为2的轴对象7包含2个类型为line的对象。一个或多个行仅使用标记显示其值。标题ID为7的轴对象8包含2个类型为line的对象。 One or more of the lines displays its values using only markers Axes object 9 with title ID 12 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 10 with title ID 17 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 11 with title ID 22 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 12 with title ID 27 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 13 with title ID 3 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 14 with title ID 8 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 15 with title ID 13 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 16 with title ID 18 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 17 with title ID 23 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 18 with title ID 28 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 19 with title ID 4 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 20 with title ID 9 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 21 with title ID 14 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 22 with title ID 19 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 23 with title ID 24 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 24 with title ID 29 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 25 with title ID 5 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 26 with title ID 10 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 27 with title ID 15 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 28 with title ID 20 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 29 with title ID 25 contains 2 objects of type line. One or more of the lines displays its values using only markers Axes object 30 with title ID 30 contains 2 objects of type line. One or more of the lines displays its values using only markers

建立一个双室模型

使用内置的PK库构建输注剂量和一阶消除的两室模型,其中消除速率取决于中央室的间隙和体积。使用configset对象以开启单位转换。

pkmd = PKModelDesign;pkc1 = add格室(pkmd,“中央”);pkc1。DosingType =“丸”;pkc1。EliminationType =“linear-clearance”;pkc1。HasResponseVariable = true;pkc2 = add格室(pkmd,“外围”);Model = construct(pkmd);Configset = getconfigset(model);configset.CompileOptions.UnitConversion = true;

有关使用SimBiology®内置库创建分区PK模型的详细信息,请参见创建药代动力学模型

定义剂量

假设每个人在时间= 0时接受100毫克的剂量。有关设置不同剂量策略的详细信息,请参见SimBiology模型中的剂量

剂量= sbiodose(“剂量”“TargetName”“Drug_Central”);剂量。StartTime = 0;剂量。一个mount = 100; dose.AmountUnits =毫克的;剂量。时间Units =“小时”;

将响应数据映射到相应的模型组件

这些数据包括在中央和外周室测量的血浆浓度。将这些变量映射到适当的模型组件,这些组件是Drug_CentralDrug_Peripheral

responseMap = {'Drug_Central = CentralConc''Drug_Peripheral = PeripheralConc'};

指定要估计的参数

指定中央和外围隔间的体积中央外围,隔室间隙12个,以及通关Cl_Central作为参数来估计。的estimatedInfo对象允许您选择性地指定参数转换、初始值和参数边界。因为两个中央外围如果约束为正,则为每个参数指定一个对数变换。

paramsToEstimate = {“日志(中央)”的日志(外围)“12”“Cl_Central”};estimatedParam = estimatedInfo(paramsToEstimate,“InitialValue”,[1 1 1 1]);

估计个人特定参数

为每个个体估计一组参数“池”名称-值对参数

unpooledFit = sbiofit(model,gData,responseMap,estimatedParam,dose,“池”、假);

显示结果

将拟合结果与每个个体(组)的原始数据进行对比。

情节(unpooledFit);

图中包含30个轴对象。标题为30的轴对象1包含4个类型为line的对象。一个或多个行仅使用标记显示其值。标题为29的轴对象2包含4个类型为line的对象。一个或多个行仅使用标记显示其值。标题为28的轴对象3包含4个类型为line的对象。一个或多个行仅使用标记显示其值标题为27的轴对象4包含4个类型为line的对象。其中一个或多个行仅使用标记显示其值。标题为26的轴对象5包含4个类型为line的对象。一个或多个行仅使用标记显示其值标题为25的轴对象6包含4个类型为line的对象。一个或多个行仅使用标记显示其值。标题为24的轴对象7包含4个类型为line的对象。一个或多个行仅使用标记显示其值。标题为23的轴对象8包含4个类型为line的对象。其中一个或多个行仅使用标记显示其值。标题为22的轴对象9包含4个类型为line的对象。 One or more of the lines displays its values using only markers Axes object 10 with title 21 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 11 with title 20 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 12 with title 19 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 13 with title 18 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 14 with title 17 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 15 with title 16 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 16 with title 15 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 17 with title 14 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 18 with title 13 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 19 with title 12 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 20 with title 11 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 21 with title 10 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 22 with title 9 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 23 with title 8 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 24 with title 7 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 25 with title 6 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 26 with title 5 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 27 with title 4 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 28 with title 3 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 29 with title 2 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 30 with title 1 contains 4 objects of type line. One or more of the lines displays its values using only markers

为了不合群,sbiofit总是为每个个体返回一个结果对象。

检查类别依赖的参数估计

探索未合并的估计,看看是否有任何特定于类别的参数,也就是说,是否有一些参数与一个或多个类别相关。如果存在任何类别依赖,则可能通过仅估计这些参数的特定类别值来减少自由度的数量。

首先提取每个ID的ID和类别值

catParamValues = unique(gData(:,{)“ID”“性”“年龄”}));

向包含每个参数估计值的表中添加变量。

allParamValues = vertcat(unpooledfit . parameterestimations);catParamValues。中央=一个llParamValues.Estimate(strcmp(allParamValues.Name,“中央”));catParamValues。外围=一个llParamValues.Estimate(strcmp(allParamValues.Name,“外围”));catParamValues。12个=一个llParamValues.Estimate(strcmp(allParamValues.Name,“12”));catParamValues。Cl_Central=一个llParamValues.Estimate(strcmp(allParamValues.Name,“Cl_Central”));

每个类别的每个参数的图估计。gscatter需要统计和机器学习工具箱™。如果没有,请使用其他绘图函数,例如情节

H =图;Ylabels = [“中央”“边缘”“12”“Cl \ _Central”];plot = 1;thisParam = estimatedParam(i).Name;%性别类别图次要情节(4 2 plotNumber);plotNumber = plotNumber + 1;gscatter(double(catParamValues. sex), catParamValues.(thisParam), catParamValues. sex);Ax = gca;斧子。XTick = [];ylabel (ylabels (i));传奇(“位置”“bestoutside”%年龄类别图次要情节(4 2 plotNumber);plotNumber = plotNumber + 1;gscatter(double(catParamValues. age), catParamValues.(thisParam), catParamValues. age);Ax = gca;斧子。XTick = [];ylabel (ylabels (i));传奇(“位置”“bestoutside”结束%调整图形大小。h.Position(:) = [100 100 1280 800];

图中包含8个轴对象。具有ylabel Central的轴对象1包含2个类型为line的对象。其中一行或多条仅使用标记显示其值。这些对象表示Female, Male。具有ylabel Central的轴对象2包含2个类型为line的对象。其中一行或多行仅使用标记显示其值。这些对象表示Old, Young。带有ylabel Peripheral的轴对象3包含2个类型为line的对象。其中一行或多条仅使用标记显示其值。这些对象表示Female, Male。带有ylabel Peripheral的轴对象4包含2个类型为line的对象。其中一行或多行仅使用标记显示其值。这些对象表示Old, Young。ylabel为Q12的轴对象5包含2个类型为line的对象。 One or more of the lines displays its values using only markers These objects represent Female, Male. Axes object 6 with ylabel Q12 contains 2 objects of type line. One or more of the lines displays its values using only markers These objects represent Old, Young. Axes object 7 with ylabel Cl\_Central contains 2 objects of type line. One or more of the lines displays its values using only markers These objects represent Female, Male. Axes object 8 with ylabel Cl\_Central contains 2 objects of type line. One or more of the lines displays its values using only markers These objects represent Old, Young.

从图中可以看出,年轻人似乎拥有更多的中央和外围隔区(中央外围),而不是老年人(也就是说,这些数量似乎是针对年龄的)。此外,男性的清除率较低(Cl_Central),而Q12参数则相反(也就是说,清除率和Q12似乎是性别特异性的)。

估计类别特定参数

使用“CategoryVariableName”的性质estimatedInfo对象指定拟合期间使用的类别。使用“性”为配合集团的过关Cl_Central12个参数。使用“年龄”作为团体来适应中央外围参数。

estimatedParam(1)。C一个tegoryVariableName =“年龄”;estimatedParam(2)。C一个tegoryVariableName =“年龄”;estimatedParam(3)。C一个tegoryVariableName =“性”;estimatedParam(4)。C一个tegoryVariableName =“性”;categoryFit = sbiofit(model,gData,responseMap,estimatedParam,dose)
categoryFit = OptimResults with properties: ExitFlag: 3 Output: [1x1 struct] GroupName: [] Beta: [8x5 table] parameterestimate: [120x6 table] J: [240x8x2 double] COVB: [8x8 double] covariancemmatrix: [8x8 double] R: [240x2 double] MSE: 0.4362 SSE: 205.8690权重:[]LogLikelihood: -477.9195 AIC: 971.8390 BIC: 1.0052e+03 DFE: 472 DependentFiles: {1x3 cell} Data: [240x6 groupedData] EstimatedParameterNames: {'Central' 'Peripheral' 'Q12' 'Cl_Central'} ErrorModelInfo:[1 × 3表]EstimationFunction: 'lsqnonlin'

当按类别(或组)拟合时,sbiofit始终返回一个结果对象,而不是每个类别级别一个。这是因为男性和女性个体都被认为是使用相同误差模型和误差参数的相同优化的一部分,对于年轻个体和老年个体也是如此。

阴谋的结果

绘制特定类别的估计结果。

情节(categoryFit);

图中包含30个轴对象。标题为30的轴对象1包含4个类型为line的对象。一个或多个行仅使用标记显示其值。标题为29的轴对象2包含4个类型为line的对象。一个或多个行仅使用标记显示其值。标题为28的轴对象3包含4个类型为line的对象。一个或多个行仅使用标记显示其值标题为27的轴对象4包含4个类型为line的对象。其中一个或多个行仅使用标记显示其值。标题为26的轴对象5包含4个类型为line的对象。一个或多个行仅使用标记显示其值标题为25的轴对象6包含4个类型为line的对象。一个或多个行仅使用标记显示其值。标题为24的轴对象7包含4个类型为line的对象。一个或多个行仅使用标记显示其值。标题为23的轴对象8包含4个类型为line的对象。其中一个或多个行仅使用标记显示其值。标题为22的轴对象9包含4个类型为line的对象。 One or more of the lines displays its values using only markers Axes object 10 with title 21 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 11 with title 20 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 12 with title 19 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 13 with title 18 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 14 with title 17 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 15 with title 16 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 16 with title 15 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 17 with title 14 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 18 with title 13 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 19 with title 12 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 20 with title 11 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 21 with title 10 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 22 with title 9 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 23 with title 8 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 24 with title 7 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 25 with title 6 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 26 with title 5 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 27 with title 4 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 28 with title 3 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 29 with title 2 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 30 with title 1 contains 4 objects of type line. One or more of the lines displays its values using only markers

Cl_Central12个参数,所有男性都有相同的估计,女性也有类似的估计。为中央外围参数,所有年轻个体都有相同的估计,对于老年个体也是如此。

估计人口范围的参数

为了更好地比较结果,将模型拟合到所有汇集在一起的数据中,也就是说,通过设置为所有个体估计一组参数“池”名称-值对参数真正的.警告消息告诉您,此选项将忽略任何特定于类别的信息(如果存在的话)。

pooledFit = sbiofit(model,gData,responseMap,estimatedParam,dose,“池”,真正的);
警告:当使用'Pooled'选项时,estimatedInfo对象的CategoryVariableName属性被忽略。

阴谋的结果

将拟合结果与原始数据进行对比。虽然为每个个体生成了一个单独的图,但数据是使用相同的参数集进行拟合的(即所有个体都有相同的拟合线)。

情节(pooledFit);

图中包含30个轴对象。标题为30的轴对象1包含4个类型为line的对象。一个或多个行仅使用标记显示其值。标题为29的轴对象2包含4个类型为line的对象。一个或多个行仅使用标记显示其值。标题为28的轴对象3包含4个类型为line的对象。一个或多个行仅使用标记显示其值标题为27的轴对象4包含4个类型为line的对象。其中一个或多个行仅使用标记显示其值。标题为26的轴对象5包含4个类型为line的对象。一个或多个行仅使用标记显示其值标题为25的轴对象6包含4个类型为line的对象。一个或多个行仅使用标记显示其值。标题为24的轴对象7包含4个类型为line的对象。一个或多个行仅使用标记显示其值。标题为23的轴对象8包含4个类型为line的对象。其中一个或多个行仅使用标记显示其值。标题为22的轴对象9包含4个类型为line的对象。 One or more of the lines displays its values using only markers Axes object 10 with title 21 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 11 with title 20 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 12 with title 19 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 13 with title 18 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 14 with title 17 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 15 with title 16 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 16 with title 15 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 17 with title 14 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 18 with title 13 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 19 with title 12 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 20 with title 11 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 21 with title 10 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 22 with title 9 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 23 with title 8 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 24 with title 7 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 25 with title 6 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 26 with title 5 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 27 with title 4 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 28 with title 3 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 29 with title 2 contains 4 objects of type line. One or more of the lines displays its values using only markers Axes object 30 with title 1 contains 4 objects of type line. One or more of the lines displays its values using only markers

比较残差

的残差比较CentralConcPeripheralConc每次匹配的响应。

t = gData.Time;allResid(:,:,1) = pooledFit.R;allResid(:,:,2) = categoryFit.R;allressid (:,:,3) = vertcat(unpooledFit.R);H =图;responseList = {“CentralConc”“PeripheralConc”};I = 1:2 subplot(2,1, I);oneResid = squeeze(allResid(:,i,:));情节(t, oneResid“o”);refline (0,0);表示残差为零的参考线标题(sprintf (“残差(% s)”我,responseList {}));包含(“时间”);ylabel (“残差”);传奇({“池”“的”未共享的});结束%调整图形大小。h.Position(:) = [100 100 1280 800];

图中包含2个轴对象。轴对象1标题残差(CentralConc), xlabel时间,ylabel残差包含4个类型为线的对象。其中一行或多行仅使用标记显示其值。这些对象表示Pooled、class - specific和Unpooled。标题为残差(PeripheralConc), xlabel Time, ylabel Residuals的轴对象2包含4个类型为line的对象。其中一行或多行仅使用标记显示其值。这些对象表示Pooled、class - specific和Unpooled。

如图所示,非池拟合产生了数据的最佳拟合,因为它适合每个个体的数据。这是意料之中的,因为它使用了最多的自由度。类别拟合通过将数据拟合到两个类别(性别和年龄)来减少自由度的数量。结果,残差大于未合并拟合,但仍小于总体拟合,后者仅估计所有个体的一组参数。如果数据中存在任何层次模型,那么类别拟合可能是未池化拟合和池化拟合之间的一个很好的折衷。

版本历史

在R2014a中引入