BookmarkSubscribeRSS Feed
RepetePete
Calcite | Level 5

Hello group, first post,

I have one physiological outcome variable and 3 independent variables that I have measured in different conditions on the same subjects. Physiologically, my 3 dependent variables should be able to explain all of the outcome, so in linear regression, my model would look like this (without intercept):

outcome = a*V1 + b*V2 + c*V3, with V1-3 being my independent variables.

So far, pretty simple. However, for interpretation I would like/need to constrain a, b, c to >0 & <1, and that their sum should always be 1.

I've tried in NLMIXED:

proc nlmixed data=final;

bounds

a > 0, b > 0, a < 1, b < 1;

parameters

a = .3

b = .3

;

c = (1-a-b);

pred = a*V1 + b*V2 + c*V3;

model outcome ~ normal(pred,5);

run;

All variables, including outcome, are continues between 0 and 100. They are a measure of hemoglobin saturation.

However, this doesn't include subject-subject variation (random effect) and I don't get an estimate of c (fair enough).

Any help out there? Thanks. Peter

4 REPLIES 4
SteveDenham
Jade | Level 19

You won't get an estimate for c under this parameterization, as V3 is a linear combination of V1 and V2.  As far as adding in a subject effect, see the first example in Getting Started: NLMIXED Procedure.  It is for nonlinear growth curves with gaussian data, but the principles for adding in a subject effect are clearly outlined.  You might actually end up with an estimate for c under this model, but it would represent sampling differences more than anything else--it still represents a fully collinear combination of V1 and V2 under the boundary conditions.

Good luck.

Steve Denham

RepetePete
Calcite | Level 5

Dear Steve, thanks for you reply. I may have misunderstood your reply or maybe not phrased my question clearly. For that I apologise. The idea is to fit a model where V1-3 can fully explain the outcome variable so as far as my thinking goes, a+b+c = 1 is a requirement of the model. I do still get the same estimates for a, b and c if I replace "c = 1-a-b" with e.g "a = 1-b-c". Where is the flaw in my logic/thinking? Anyway, here is two examples of my code. The proc model I am fairly confident in but I am not sure I am adding the random effect the right way in proc nlmixed.

title 'NIRO, arterial, venous, and skin contribution, without intercept';

proc model data=final;

      ods output ParameterEstimates=NIROnoint;

      bounds a > 0, a < 1, b > 0, b < 1;

      parameters a = 0.50 b = 0.20;

      c = 1-a-b;

      niro_toi = a*sao2 + b*sjvo2 + c*moor_so2;

      fit niro_toi;

      estimate 'Arterial' a, 'Venous' b, 'Skin' c;

run;

title 'NIRO, random effects model, arterial, venous, and skin contribution, without intercept';

proc nlmixed data=final ;

      bounds a > 0, b > 0, a < 1, b < 1;

      parameters a = .5 b = .25 sd1 = 110 sd2 = 0.03;

      c = 1-a-b;

      pred = (a*sao2 + b*sjvo2 + c*moor_so2)*r;

      model niro_toi ~ normal(pred,sd1);

      random r ~ normal(1,sd2) subject=subject;

      estimate 'Arterial' a;

      estimate 'Venous' b;

      estimate 'Skin' c;

run;

SteveDenham
Jade | Level 19

That is an interesting parameterization in the NLMIXED code--multiplying by a random effect.  Most of the models I have seen involve additive random effects around the parameters. My brain thinks of the additive pretty easily--the subjects come from a population with a multivariate normal distribution for the parameters, with variances for each and covariances between them.  Could you present a motivation for the multiplicative effect?

Given this approach, you may think about doing some recoding to force the multiplier to be consistently positive. Do a  search on the SAS-L listserv:archives for NLMIXED, and look particularly for articles by Dale McLerran.  He has several where log and exp transforms are used to constrain parameters to positive values.

Steve Denham

PGStats
Opal | Level 21

You will require some luck to get a c value greater than 0 with those programs. It would be safer to add the restriction a + b < 1 to the proc model statements. For nlmixed you will have to rely on luck or more complicated programming Smiley Happy. I think you are not likely to get stable estimates of sd1 and sd2, unless you have many observations per subject.

PG

PG

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1375 views
  • 0 likes
  • 3 in conversation