How to import a density layer rather than create from scratch with make.density

13 views
Skip to first unread message

Janet

unread,
Oct 20, 2022, 3:17:03 PM10/20/22
to distance-sampling
Hello, I have a point shapefile with predicted densities of animals that I would like to import into R for use with Dsims. All the tutorials I have come across all use the create.density to create a density layer from scratch and add hotspots. Is there a way of simply importing a shapefile with predicted densities of animals similar to with make.region for the study area?
Thanks,
Janet

Eric Rexstad

unread,
Oct 21, 2022, 6:52:59 AM10/21/22
to Janet, distance-sampling
Janet

Your point shapefile cannot be fed directly into dsims​. There is an argument fitted.model​ associated with the make.density​ function that uses the gam output from the mgcv​ package associated with a model fitted to your predicted densities and s(x,y)​ as predictors.  If your point shape file came from an mgcv​ analysis, then use the model rather than the shape file.

I'm not sure how much testing the fitted.model​ approach to make.density​ has received. We'd be interested in your experience.


From: distance...@googlegroups.com <distance...@googlegroups.com> on behalf of Janet <jlmo...@dal.ca>
Sent: 20 October 2022 20:17
To: distance-sampling <distance...@googlegroups.com>
Subject: [distance-sampling] How to import a density layer rather than create from scratch with make.density
 
Hello, I have a point shapefile with predicted densities of animals that I would like to import into R for use with Dsims. All the tutorials I have come across all use the create.density to create a density layer from scratch and add hotspots. Is there a way of simply importing a shapefile with predicted densities of animals similar to with make.region for the study area?
Thanks,
Janet

--
You received this message because you are subscribed to the Google Groups "distance-sampling" group.
To unsubscribe from this group and stop receiving emails from it, send an email to distance-sampl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/distance-sampling/c7cd993d-ce85-48ad-900d-aa91fbc900a4n%40googlegroups.com.


From: distance...@googlegroups.com <distance...@googlegroups.com> on behalf of Janet <jlmo...@dal.ca>
Sent: 20 October 2022 20:17
To: distance-sampling <distance...@googlegroups.com>
Subject: [distance-sampling] How to import a density layer rather than create from scratch with make.density
 
Hello, I have a point shapefile with predicted densities of animals that I would like to import into R for use with Dsims. All the tutorials I have come across all use the create.density to create a density layer from scratch and add hotspots. Is there a way of simply importing a shapefile with predicted densities of animals similar to with make.region for the study area?
Thanks,
Janet

--
You received this message because you are subscribed to the Google Groups "distance-sampling" group.
To unsubscribe from this group and stop receiving emails from it, send an email to distance-sampl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/distance-sampling/c7cd993d-ce85-48ad-900d-aa91fbc900a4n%40googlegroups.com.

Janet

unread,
Oct 21, 2022, 12:45:01 PM10/21/22
to distance-sampling
Thanks Eric, I think I will keep it simple and just replicate the existing density layer with the make.density function :)
Reply all
Reply to author
Forward
0 new messages