This PR adds a new option for HASPT.ignore.invalid, if this parameter is set to NA, then invalid time segments are considered no movement for the Sleep Period Time definition. This addresses those scenarios in which participants unexpectedly take off the devices during nigth even though they are not expected to do so, and this also facilitates the SPT definition in day-only study protocols in which devices are taken off during nights.
Checklist before merging:
[x] Existing tests still work (check by running the test suite, e.g. from RStudio).
[ ] Added tests (if you added functionality) or fixed existing test (if you fixed a bug).
[x] Updated or expanded the documentation.
[x] Updated release notes in inst/NEWS.Rd with a user-readable summary. Please, include references to relevant issues or PR discussions.
[ ] Added your name to the contributors lists in the DESCRIPTION file, if you think you made a significant contribution.
Closes issue #1043
This PR adds a new option for HASPT.ignore.invalid, if this parameter is set to NA, then invalid time segments are considered no movement for the Sleep Period Time definition. This addresses those scenarios in which participants unexpectedly take off the devices during nigth even though they are not expected to do so, and this also facilitates the SPT definition in day-only study protocols in which devices are taken off during nights.
Checklist before merging:
inst/NEWS.Rd
with a user-readable summary. Please, include references to relevant issues or PR discussions.DESCRIPTION
file, if you think you made a significant contribution.