Help using Base SAS procedures

How to fit dispersal function to seed trap data with PROC NLMIXED?

Not applicable
Posts: 1

How to fit dispersal function to seed trap data with PROC NLMIXED?

I am trying to fit dispersal functions to seed trap data gathered in the field. Seed traps were placed at intervals of increasing distances from a single seed source. I am trying to fit dispersal functions to the data that describes the probability of a seed landing at a particular distance. Below is the code I created for fitting a Negative Exponential (NE) function with PROC NLMIXED. The parameter a needs to be estimated. The parameter D is the distance from the seed source. The xb line is the NE function. Mu gives the expected seed count at a distance by multiplying the dispersal function (xb) by trap area (tarea) and by the total number of seeds dispersed (q). The variable tarea is offset variable and both tarea and q are known quantities. There is a random effect (u2) because I replicated the study at 3 sites.

proc nlmixed data=count; title "NE";

parms a=.0001,.001,0.01,0.1,1,10,100,1000,10000, 100000,1000000 s2u=1,10,100,1000,10000;

xb=((1/(2*3.1415*(a**2)))*(exp(-(D/a)))) +u2  ;


model count~ poisson(mu) ;

random u2~normal(0,s2u)subject=source;

predict mu out=results;


My questions are: 1) is the code correct for calculating the parameters of the dispersal function?

2) Is the random effect in the correct location? Could it be placed at  mu=exp(xb)*tarea*q + u2;?

If anyone has experience with dispersal functions and could offer any insight, I would be very thankful!

Respected Advisor
Posts: 2,655

Re: How to fit dispersal function to seed trap data with PROC NLMIXED?

Posted in reply to ChrisLoebach

The placement of u2 will depend on your assumption regarding the variability due to site.  Where you have it now, it enters essentially as a multiplicative error--probably a reasonable assumption given the distribution.  Moving it to the alternative you propose means an additional (above residual) additive error.  You might want to consider one other alternative--that the parameter a comes from a distribution with error dependent on site.  This would result in:

xb=((1/(2*3.1415*(a**2)))*(exp(-(D/(a + u2))))

This sort of parameterization is more common in pharmacokinetic models where there is additional variability due to patient/subject, but may be appropriate here.

Hope this helps some.

Steve Denham

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation