I am writing some code to simulate a forest stand. I have simulated the positions of large and medium sized trees using Spatstats. The next step I want to do is simulate smaller trees. I have been trying to write some code that enables the smaller trees to be located further away from large and medium sized trees.
I can simulate the correct number of smaller trees using a single number kappa for a Thomas clumping model in Spatstat, however this produces clumping close to larger/medium trees. I am struggling to simulate the correct number of smaller trees where the parent points are located in less dense parts of the forest stand.
I have tried using the density function in spatstat on the large and medium sized trees. I then tried inverting the raster so that the areas with less trees have a higher pixel value, but I cant seem to find a way of changing this to a Kappa raster which will give me the correct number of smaller trees to be generated.
The code below gives me a number for the correct number of small trees to be generated
Window size is 100x100m
kappaS<-(Number_Small_Trees_to_be_Generated)/(mean(muS)*winarea)
Small.Trees1<-rThomas(kappa=kappaS,
scale=sigmaM,
mu=muS,
win=Window222)
I'm hoping to find a way of producing a kappa raster that simulates the correct number of points where the parent points are more likley to be produce in less dense areas of the stand.
Many thanks for any help!