Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • s2dv s2dv
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 17
    • Issues 17
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • s2dvs2dv
  • Issues
  • #6
Closed
Open
Issue created Mar 26, 2020 by aho@ahoMaintainer

Regression(): bug in na.action and other suggestions

Hi @cdelgado

Thanks for your exhaustive test on Regression()! I listed part of your feedback here for the ease of discussion.

  1. The option "na.fail" for the "na.action" argument. When I tried it with a time series with NAs, it doesn't return an error (which is expected).

Thanks for finding this! I will check it. The other thing we should consider is that change the default to na.fail. It is the default of lm(), and in this way, it can be in line with MeanDims(), which was discussed in the last R user meeting. People can be aware of NA while using the functions.

  1. I would do a small change in the argument "time_dim": in s2verification, this argument has to be a number (the index of the dimension), while in s2dv it has to be a string (the name of the dimension). It would be nice to have both options, since sometimes you may want to do the regression of to an array with only 1 dimension, so it wouldn't be needed to name this only one dimension.

We want to force the users to use names to specify the dimension because it can avoid undetected mistakes (e.g., use the previous script and do the regression over the undesired dimension.) But if the data is only one dimension (i.e., a vector), I think it will be good to make the function work.

I would rename "time_dim": you may want to calculate the regression of another dimension (not always with the time).

We can consider renaming it to 'reg_dim'.

Please let me know your thoughts, @nperez . Thanks!

Cheers,
An-Chi

Assignee
Assign to
Time tracking