gData = groupedData(data);
gData.Properties.IndependentVariableName = 'Var1';
gData.Properties.GroupVariableName = 'Var3';
gData.Properties.VariableUnits = {'hour','nanogram/milliliter','',''};
pkc1 = addCompartment(pkmd,'Central');
pkc1.DosingType = 'FirstOrder';
pkc1.EliminationType = 'linear-clearance';
pkc1.HasResponseVariable = true;
configset = getconfigset(model);
configset.CompileOptions.UnitConversion = true;
dose.TargetName = 'Dose_Central';
dose.AmountUnits = 'milligram';
responseMap = {'Drug_Central = Var2'};
NCA.Central = mean(ncaparameters.V_z,'omitnan');
NCA.CL = mean(ncaparameters.CL,'omitnan');
paramsToEstimate = {'log(Central)','log(Cl_Central)','log(ka_Central)'};
estimatedParams = estimatedInfo(paramsToEstimate,'InitialValue',[NCA.Central NCA.CL NCA.ka]);
fitConst = sbiofit(model,gData,responseMap,estimatedParams,dose);
pooledFit = sbiofit(model,gData,responseMap,estimatedParams,dose,'Pooled',true);