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 ; mu=exp(xb)*tarea*q; model count~ poisson(mu) ; random u2~normal(0,s2u)subject=source; predict mu out=results; run; 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!
... View more