{"action":"created","issue":{"url":"https://api.github.com/repos/tmcd82070/Rdistance/issues/62","repository_url":"https://api.github.com/repos/tmcd82070/Rdistance","labels_url":"https://api.github.com/repos/tmcd82070/Rdistance/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/tmcd82070/Rdistance/issues/62/comments","events_url":"https://api.github.com/repos/tmcd82070/Rdistance/issues/62/events","html_url":"https://github.com/tmcd82070/Rdistance/issues/62","id":332101752,"node_id":"MDU6SXNzdWUzMzIxMDE3NTI=","number":62,"title":"Helper function to automate fitting/comparing multiple models","user":{"login":"jcarlis3","id":10441106,"node_id":"MDQ6VXNlcjEwNDQxMTA2","avatar_url":"https://avatars3.githubusercontent.com/u/10441106?v=4","gravatar_id":"","url":"https://api.github.com/users/jcarlis3","html_url":"https://github.com/jcarlis3","followers_url":"https://api.github.com/users/jcarlis3/followers","following_url":"https://api.github.com/users/jcarlis3/following{/other_user}","gists_url":"https://api.github.com/users/jcarlis3/gists{/gist_id}","starred_url":"https://api.github.com/users/jcarlis3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcarlis3/subscriptions","organizations_url":"https://api.github.com/users/jcarlis3/orgs","repos_url":"https://api.github.com/users/jcarlis3/repos","events_url":"https://api.github.com/users/jcarlis3/events{/privacy}","received_events_url":"https://api.github.com/users/jcarlis3/received_events","type":"User","site_admin":false},"labels":[{"id":45043534,"node_id":"MDU6TGFiZWw0NTA0MzUzNA==","url":"https://api.github.com/repos/tmcd82070/Rdistance/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-13T17:59:45Z","updated_at":"2018-08-14T16:38:30Z","closed_at":null,"author_association":"COLLABORATOR","body":"The development version of the package currently has an `autoDistSamp` function that will use AIC(c) to compare different detection functions and run `abundEstim` on the highest-ranked one.  This function can compare different likelihood-expansion combos (halfnorm with 0 expansions vs halfnorm with 1 expansion vs hazrate with 0 expansions vs hazrate with 1 expansion, etc.), but cannot compare different model formulas (dist ~1 vs dist ~ myCovariate).  I suspect many users would like the option to compare different model formulas (models with varying covariates included).  Diem wrote a wrapper function that does this (with the added perk of model-averaging estimates of p instead of assuming the highest-ranked model).  We could likely start there.\r\n\r\n```\r\nrequire(Rdistance)\r\ndata(\"sparrowDetectionData\")\r\ndata(\"sparrowSiteData\")\r\n\r\n# Demo the current functionality of comparing likelihood-expansion combos\r\nautoDistSamp(dist ~ 1, detectionData=sparrowDetectionData, siteData=sparrowSiteData,\r\n             likelihoods=c(\"halfnorm\", \"hazrate\"),\r\n             series=c(\"cosine\", \"simple\"), expansions=0:1,\r\n             area=1e4, w.hi=100, R=3, plot.bs=TRUE)\r\n\r\n\r\n# Try comparing likelihood combos for a model function that includes a covariate\r\n# Errors (message below).\r\n# I suspect this errors in the plotting stage (looks like it fits the first dfunc fine),\r\n# but haven't looked much into it\r\n# Error: object of type 'symbol' is not subsettable\r\nautoDistSamp(dist ~ bare, detectionData=sparrowDetectionData, siteData=sparrowSiteData,\r\n             likelihoods=c(\"halfnorm\", \"hazrate\"),\r\n             expansions=0,\r\n             area=1e4, w.hi=100, R=3, plot=TRUE, plot.bs=TRUE)\r\n\r\n\r\n# If you disable the plots, it will run and compare models with covariates\r\nautoDistSamp(dist ~ bare, detectionData=sparrowDetectionData, siteData=sparrowSiteData,\r\n             likelihoods=c(\"halfnorm\", \"hazrate\"),\r\n             expansions=0,\r\n             area=1e4, w.hi=60, R=3, plot=FALSE, plot.bs=FALSE)\r\n```"},"comment":{"url":"https://api.github.com/repos/tmcd82070/Rdistance/issues/comments/412936457","html_url":"https://github.com/tmcd82070/Rdistance/issues/62#issuecomment-412936457","issue_url":"https://api.github.com/repos/tmcd82070/Rdistance/issues/62","id":412936457,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjkzNjQ1Nw==","user":{"login":"tmcd82070","id":4823244,"node_id":"MDQ6VXNlcjQ4MjMyNDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4823244?v=4","gravatar_id":"","url":"https://api.github.com/users/tmcd82070","html_url":"https://github.com/tmcd82070","followers_url":"https://api.github.com/users/tmcd82070/followers","following_url":"https://api.github.com/users/tmcd82070/following{/other_user}","gists_url":"https://api.github.com/users/tmcd82070/gists{/gist_id}","starred_url":"https://api.github.com/users/tmcd82070/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmcd82070/subscriptions","organizations_url":"https://api.github.com/users/tmcd82070/orgs","repos_url":"https://api.github.com/users/tmcd82070/repos","events_url":"https://api.github.com/users/tmcd82070/events{/privacy}","received_events_url":"https://api.github.com/users/tmcd82070/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T16:38:30Z","updated_at":"2018-08-14T16:38:30Z","author_association":"OWNER","body":"@ashoffman is working on this"}}
{"actor":{"display_login":"tmcd82070"}}