I am fitting a trial with two output measurements (for now). These are CONC1 and CONC2. Supposing that they have very different magnitudes, I'd like to set weights for fitting to allow errors in each measurement to have the same effect on parameters estimated. Right now I can nail the larger valued CONC1, but the accuracy of the fit of the smaller CONC2 is poor.
I tried:
mcnc1 = mean(gdata.CONC_1(~isnan(gdata.CONC_1)));
mcnc2 = mean(gdata.CONC_2(~isnan(gdata.CONC_2)));
erwts = [1/mcnc1 1/mcnc2];
clear opto;
opto.Options = statset('Display','iter','TolX',1e-3,'TolFun',1e-3);
opto.ErrorModel = 'combined';
opto.Weights = erwts;
The problem is, sbiofitmixed gags on this. I get:
Error using nlmefit>parseInVarargin (line 1937)
Unknown parameter name: Weights.
Error in nlmefit (line 401)
parseInVarargin(q,M,N,varargin{:});
Error in sbiofitmixed (line 241)
[results.beta, results.psi, results.stats, results.b] = feval(estimationFunctionName, timeVectorStacked, yVectorStacked,
groupVectorStacked, groupList, yPredictFcn, beta0, nameValuePairs{:});
Error in Fit_PK_nlme_prot (line 66)
[fitcon4, simdat4] = sbiofitmixed( ...
Is their any way to weight the relative errors for CONC1 and CONC2? I suppose I could create a model variable that is 100 times the value for CONC2, and put a column in my dataset that is CONC2*100, and fit them together, but this seems pretty crude. Other estimation functions allow this weighting. Any way to get there with sbiofitmixed?