Johannes & Mieke,

No it is not possible to fit models for multiple species with one call to
dismo::maxent. This may be possible with the Java program MaxEnt,
but dismo::maxent behaves more like other R model functions. Also, it is
straightforward to fit many models using a loop.

Robert


On Tue, Jan 31, 2012 at 6:00 AM, Johannes Radinger <JRadinger@gmx.at> wrote:

> Hello,
>
> theoretically it should work (at least in the original MaxEnt according to
> the tutorial) to use
> multiple species as input. When I try to run it with multiple species as
> spatial points, the
> species are ignored (treated all as one). In the html output there is a
> link to the csv file
> for the single model results but there I can find only one species called
> "Species"...
>
> ..I'll try it in the next days to provide the points as dataframe (not  as
> spatial points), maybe that makes
> a difference. Maybe the spatial points are transformed incorrectly in
> dismo so that maxent can't read the name column (but thats just a guess).
> Has anyone successfully tried dismo's maxent with multiple species already?
>
>
> Best regards,
> johannes
>
>
> Am 30.01.2012 um 15:12 schrieb Mieke Zwart:
>
>  Hi,
>>
>> I would like to know this answer as well as I am doing a very similar
>> thing. I am currently working with enfa (package adehabitat) for Species
>> Distribution Models but will also look at the results with maxent.
>>
>> I also have multiple species on my site and was thinking of doing a loop,
>> but if there is a way of doing them together I would be very interested!
>>
>> Best,
>>
>> Mieke
>>
>> Mieke Zwart
>> PhD student
>> Room 4.53
>> School of Biology
>> Ridley 2
>> Newcastle University
>> Newcastle upon Tyne
>> NE1 7RU
>> United Kingdom
>>
>> Tel extension: 5952
>>
>>
>>
>>
>> -----Original Message-----
>> From: r-sig-ecology-bounces@r-**project.org<r-sig-ecology-bounces@r-project.org>[mailto:
>> r-sig-ecology-bounces@**r-project.org<r-sig-ecology-bounces@r-project.org>]
>> On Behalf Of Johannes Radinger
>> Sent: 30 January 2012 11:25
>> To: r-sig-ecology@r-project.org
>> Subject: [R-sig-eco] SDM (MaxEnt) per Species, package dismo
>>
>> Hello SIG-ECO list,
>>
>> I am want to perform Species Distribution Models with R's dismo package
>> (function: maxent()). Of course this topic is a spatial topic (R-SIG-GEO
>> related) but I think it fits better to the ECO list.
>>
>> For my analysis (MaxEnt)I have a Rasterstack of predictor variables and
>> the species occurence points as spatial points (sp-class).
>>
>> My list of observations has several different species. And I divided the
>> list into a training and testing dataset with:
>> kfold(occ.points, k = 5, by = occ.points$Species)
>>
>> As I read in the orig. MaxEnt tutorial, it should be possible to use an
>> input file with multiple species. I'd like to know:
>> Does that accuatlly work also in the R-Maxent setup? Can a provide
>> maxent() spatial points of different species, or do I have to fit the model
>> manually for each species (resp. in a loop?) How can I access the results
>> of the single species (like the 'me' in the examples of maxent).
>>
>> Another maxent related question: What happens if one of the predictor
>> rasters is not entirely populated with values resp. shows NA's? Are these
>> cells just excluded from the model fit and prediction or will there be a
>> problem with the entire model?
>>
>> Thank you for your help,
>>
>> Best regards,
>> Johannes
>>
>>
>> -------- Original-Nachricht --------
>>
>>> Datum: Fri, 27 Jan 2012 09:06:44 -0800
>>> Von: "Robert J. Hijmans" <r.hijmans@gmail.com>
>>> An: Johannes Radinger <JRadinger@gmx.at>
>>> Betreff: Re: kfold question
>>>
>>
>>  Johannes,
>>>
>>> An error occurs when you request a kfold for a single observation. I
>>> will fix that, but the request obviously makes no sense. It is
>>> straightforward to count the number of observations by species with
>>> something like
>>> table(data$species)
>>>
>>> Best,
>>> Robert
>>>
>>> On Fri, Jan 27, 2012 at 1:56 AM, Johannes Radinger <JRadinger@gmx.at>
>>> wrote:
>>>
>>>  Dear Mr Hijmans,
>>>>
>>>> I tried to use your package dismo's function: kfold() I want to
>>>> split my dataset into 5 parts by species.
>>>> Of course it is not possible to split records of a species with less
>>>> the 5 observation into 5 parts... That is the reason why I get a
>>>> warning message...
>>>> It'd be okay when these species are devided by their maximum number
>>>> of records (1,2,3,4).
>>>> But somehow I also get an error message. I think that might be
>>>> related to that. Of course it doesn't make sense to devide a species
>>>> with 1 record by 1. Is this the reason for the error message (sorry
>>>> it is in German) or is it just something totally different?
>>>>
>>>> Fehler in rep(j, times = times[j]) : ungültiges 'times' Argument
>>>> Zusätzlich: Warnmeldungen:
>>>> 1: In kfold(occ.fish, k = 5, by = occ.fish$Species) :
>>>>  lowered k for by group: N.Gesamt.Amerikanischer.**Hundsfisch  because
>>>> the number of observations was  4
>>>> 2: In kfold(occ.fish, k = 5, by = occ.fish$Species) :
>>>>  lowered k for by group: N.Gesamt.Flunder  because the number of
>>>> observations was  3
>>>> 3: In kfold(occ.fish, k = 5, by = occ.fish$Species) :
>>>>  lowered k for by group: N.Juvenil.Flunder  because the number of
>>>> observations was  1
>>>>
>>>>>
>>>>>
>>>> ...which would mean Error in rep(j, times = times[j]) : invalid 'times'
>>>> argument
>>>>
>>>> How do you usually handle such datasets?Probably excluding these
>>>> species at all and subsetting the dataset (I have to think how to do
>>>> that in R).
>>>>
>>>>
>>>> best regards,
>>>> johannes
>>>> --
>>>> "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
>>>> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/**topmail<http://www.gmx.net/de/go/topmail>
>>>>
>>>>
>> --
>>
>>
>>
>>
>> --
>>
>> ______________________________**_________________
>> R-sig-ecology mailing list
>> R-sig-ecology@r-project.org
>> https://stat.ethz.ch/mailman/**listinfo/r-sig-ecology<https://stat.ethz.ch/mailman/listinfo/r-sig-ecology>
>>
>
>

	[[alternative HTML version deleted]]

