sbiofitmixed/ nlmefit and weighting two dependent variables
Mostra commenti meno recenti
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))); % Use NaN data to get mean for concentration 1
mcnc2 = mean(gdata.CONC_2(~isnan(gdata.CONC_2))); % Use NaN data to get mean for concentration 2
erwts = [1/mcnc1 1/mcnc2]; % Set weights so that the two concentrations are about equally weighted
clear opto; % Make sure I have a "clean" optimoptions
opto.Options = statset('Display','iter','TolX',1e-3,'TolFun',1e-3); % Per instructions in sbiofitmixed
opto.ErrorModel = 'combined'; % Per instructions in nlmefit
opto.Weights = erwts; % This does set the value for Opto.Weights.
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?
Risposte (0)
Categorie
Scopri di più su Nonlinear Mixed-Effects Modeling in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!