Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Options for ssn_glm() #8

Closed
highamm opened this issue Dec 11, 2023 · 1 comment
Closed

Default Options for ssn_glm() #8

highamm opened this issue Dec 11, 2023 · 1 comment

Comments

@highamm
Copy link

highamm commented Dec 11, 2023

Hello!

I expected the code below to work because I thought the family argument would default to "Gaussian", as stated in the function documentation. But there is a strange error: "Error in as.call(call_list) : invalid length 0 argument."

This error was on the CRAN installation of SSN2.

library(SSN2)

copy_lsn_to_temp()
path <- paste0(tempdir(), "/MiddleFork04.ssn")
mf04p <- ssn_import(path, predpts = "pred1km")
ssn_create_distmat(mf04p, predpts = "pred1km", overwrite = TRUE)

ssn_mod <- ssn_glm(
  formula = Summer_mn ~ ELEV_DEM + AREAWTMAP,
  ## family = "Gaussian", ## function works if this line is not commented
  ssn.object = mf04p,
  tailup_type = "exponential",
  taildown_type = "spherical",
  euclid_type = "gaussian",
  additive = "afvArea"
)
summary(ssn_mod)
@michaeldumelle
Copy link
Collaborator

Thanks @highamm . The documentation is incorrect; there should not be a default for family. We have updated the documentation accordingly and added an error message when family is missing. These changes are implemented in the development version of SSN2, which you can download by running

remotes::install_github("USEPA/SSN2", ref = "develop")

On CRAN, the changes will be reflected in the next version (the current CRAN version is 0.1.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants