COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Trouble with NLMIXED

• Email
• Follow

```Hi There.

to use NLMIXED to analyze count data.  I would like to know if species
abundance fits an exponential curve when plotted against the point
count (survey) distance to natural gas wells.  I believe that NLMIXED
is appropriate for this.  I hope I am giving you all the information
needed to help me solve the problem, but please let me know if more
information is required!

I am using a formula in my script to calculate an exponential
relationship taken from a published paper (Stephenson, G.L., Koper,
N., Atkinson, G.F., Solomon, K.R., and Scroggins, R.P. 2000. Use of
nonlinear regression techniques for describing concentration-response
relationships for plant species exposed to contaminated site soils.
Environmental Toxicology and Chemistry, 19(12): 2968-2981).  The
formula used is:

Y=t*e**(b*C)

where t is the control response, e is the base of the natural
logarithm, b is a scale parameter and C is the point count distance to
well (pcdtw).

Here is an example of what my data table looks like:

Data merged; input pcdtw species section_pasture;
37 2.94 1053
23 0 1053
77 1.59 1053
164 3.85 1055
140 0 2059
266 1.13 2061
100 2.72 2066
68 1 2069
run;

My script and the following error is below.  If anyone sees a problem
in my scripting I would appreciate the help.  Is it possible that the
'0' values for species are throwing the script off?  I've looked
through the data table when this error comes up, and cannot see any
difference between columns that work and those that don't.

268  title 'dist';
269  proc nlmixed data=merged alpha=0.1;
270  parms T=1.2 B=0.03 s2=1;
271  eta = T*(2.71828**(B*PCDTW)) + u;
272  LAMBDA = exp(eta);
273  model species ~ poisson(lambda);
274  random u ~ normal (0, s2) subject=section_pasture;
275  PREDICT LAMBDA OUT=PROB;
276  run;

NOTE: Execution error for observation 5.
NOTE: The data set WORK.PROB has 0 observations and 0 variables.
WARNING: Data set WORK.PROB was not replaced because new file is
incomplete.
NOTE: PROCEDURE NLMIXED used (Total process time):
real time           0.07 seconds
cpu time            0.01 seconds

suggestions!

Holly
```
 0

See related articles to this posting

```On Apr 6, 4:02=A0pm, Holly Kalyn Bogard <holly.bog...@ec.gc.ca> wrote:
> Hi There.
>
> Please forgive my lack of knowledge...I am a graduate student trying
> to use NLMIXED to analyze count data. =A0I would like to know if species
> abundance fits an exponential curve when plotted against the point
> count (survey) distance to natural gas wells. =A0I believe that NLMIXED
> is appropriate for this. =A0I hope I am giving you all the information
> needed to help me solve the problem, but please let me know if more
> information is required!
>
> I am using a formula in my script to calculate an exponential
> relationship taken from a published paper (Stephenson, G.L., Koper,
> N., Atkinson, G.F., Solomon, K.R., and Scroggins, R.P. 2000. Use of
> nonlinear regression techniques for describing concentration-response
> relationships for plant species exposed to contaminated site soils.
> Environmental Toxicology and Chemistry, 19(12): 2968-2981). =A0The
> formula used is:
>
> Y=3Dt*e**(b*C)
>
> where t is the control response, e is the base of the natural
> logarithm, b is a scale parameter and C is the point count distance to
> well (pcdtw).
>
> Here is an example of what my data table looks like:
>
> Data merged; input pcdtw species section_pasture;
> 37 2.94 1053
> 23 0 1053
> 77 1.59 1053
> 164 3.85 1055
> 140 0 2059
> =A0266 1.13 2061
> 100 2.72 2066
> 68 1 2069
> run;
>
> My script and the following error is below. =A0If anyone sees a problem
> in my scripting I would appreciate the help. =A0Is it possible that the
> '0' values for species are throwing the script off? =A0I've looked
> through the data table when this error comes up, and cannot see any
> difference between columns that work and those that don't.
>
> 268 =A0title 'dist';
> 269 =A0proc nlmixed data=3Dmerged alpha=3D0.1;
> 270 =A0parms T=3D1.2 B=3D0.03 s2=3D1;
> 271 =A0eta =3D T*(2.71828**(B*PCDTW)) + u;
> 272 =A0LAMBDA =3D exp(eta);
> 273 =A0model species ~ poisson(lambda);
> 274 =A0random u ~ normal (0, s2) subject=3Dsection_pasture;
> 275 =A0PREDICT LAMBDA OUT=3DPROB;
> 276 =A0run;
>
> NOTE: Execution error for observation 5.
> NOTE: The data set WORK.PROB has 0 observations and 0 variables.
> WARNING: Data set WORK.PROB was not replaced because new file is
> incomplete.
> NOTE: PROCEDURE NLMIXED used (Total process time):
> =A0 =A0 =A0 real time =A0 =A0 =A0 =A0 =A0 0.07 seconds
> =A0 =A0 =A0 cpu time =A0 =A0 =A0 =A0 =A0 =A00.01 seconds
>
> suggestions!
>
> Holly

The error says specifically Observation 5 which is the observation
with a 0.

Remove the 5th observation and run the proc again.  If you receive no
error take an observation that is working and change the species to 0
and see if the error occurs again.

My guess is that the procedure is taking the inverse at some point and
1/0 isn't defined. Not hugely familiar with the NLMixed proc.

Doubt that helps...

```
 0