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

TA for random steps when observed is NA #63

Open
bsmity13 opened this issue Mar 4, 2022 · 1 comment
Open

TA for random steps when observed is NA #63

bsmity13 opened this issue Mar 4, 2022 · 1 comment

Comments

@bsmity13
Copy link
Collaborator

bsmity13 commented Mar 4, 2022

Step 1 has no turn angle because there is no previous step (ta_ = NA). However, the random steps paired with step 1 do have a turn angle. Demonstration:

deer %>% 
  steps_by_burst() %>% 
  random_steps(n_control = 3) %>% 
  print(n = 9, width = 100)

Problem would arise for first step of any burst. Problem might be that direction_p should be NA? Isn't that direction of the previous step?

@jmsigner
Copy link
Owner

Yes that's true, I did note this a few weeks ago. When fitting an iSSF with fit_issf() this is not a problem because survival::clogit() removes these strata. I did add a function remove_incomplete_strata() to deal with such cases.

If direction_p was NA, then we would lose these steps and in cases we are only interested in sl_ it doesn't matter. What do you think?

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