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!
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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.