Calcite | Level 5

## Analysing Non-linear data, PROC NLIN.

Please I need assistance in analysing data produced from in vitro incubation of feed samples , using the PROC NLIN.

I had triied to search for similar syntax which I can modify without success. The class include cultivar,rep. The incubation times are from 3,6,9,===48 hrs. Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Rhodochrosite | Level 12

## Re: Analysing Non-linear data, PROC NLIN.

Just to add to my previous post, you can fit your model to the data in the SAS Getting Started example using:

``````
proc nlin data=Enzyme method=marquardt hougaard plots=all;
parms a 50 to 250 by 50  b 20 to 80 by 10 c .5 to 2 by .5;
model Velocity = a + b*(1-exp(-c*concentration));
run;
``````

It would be to your benefit to study the User's Guide.

4 REPLIES 4
SAS Super FREQ

## Re: Analysing Non-linear data, PROC NLIN.

What nonlinear model are you trying to fit?

Calcite | Level 5

## Re: Analysing Non-linear data, PROC NLIN.

• Dear SAS friends out there, please I want to analyse the data set of gas grom forage cultivars, collected 3 hourly in the course of in vitro fermentation up to 48 hours, and fit the data into the equation proposed by Orskov and McDonald is Y = a+b (1- e-ct), pease note that the -ct is to the power of e, then plot the graph . Anyone with the experience of the correct syntax to use please? I can forward the data if need be. Thanks.
Rhodochrosite | Level 12

## Re: Analysing Non-linear data, PROC NLIN.

It pays to read the User's Guide. The getting started example shows you exactly how to fit a nonlinear model. This is a different model from what you want, but you can see where you need to write the equation and define the parameters. I added the plot statement to show you how easy it is to get predicted values and confidence/prediciton intervals.

``````/* From SAS User's Guide */
data Enzyme;
input Concentration Velocity @@;
datalines;
0.26 124.7   0.30 126.9
0.48 135.9   0.50 137.6
0.54 139.6   0.68 141.1
0.82 142.8   1.14 147.6
1.28 149.8   1.38 149.4
1.80 153.9   2.30 152.5
2.44 154.5   2.48 154.7
;

proc nlin data=Enzyme method=marquardt hougaard plots=all;
parms theta1=155
theta2=0 to 0.07 by 0.01;
model Velocity = theta1*Concentration / (theta2 + Concentration);
run;``````

Just change the model and parms statements. It is important to have good starting values.  You also mentioned class variables. NLIN does not have a class statement. You would have to use dummy variables (0,1) for the different class levels. But this gets more complicated, and I am not describing this here, since you are apparently new to this. You would find the textbook by Schabenberger and Pierce (2002) very helpful for this. With class variables, you have to decide what parameter is being affected by the factor (which parameter is being affected by the factor).

Rhodochrosite | Level 12

## Re: Analysing Non-linear data, PROC NLIN.

Just to add to my previous post, you can fit your model to the data in the SAS Getting Started example using:

``````
proc nlin data=Enzyme method=marquardt hougaard plots=all;
parms a 50 to 250 by 50  b 20 to 80 by 10 c .5 to 2 by .5;
model Velocity = a + b*(1-exp(-c*concentration));
run;
``````

It would be to your benefit to study the User's Guide.

Discussion stats
• 4 replies
• 1848 views
• 1 like
• 3 in conversation