-
Notifications
You must be signed in to change notification settings - Fork 8
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
Distance analysing binned data using arguments instead of distend / distbegin when distance is not in dataset #144
Comments
My suggestion is that we check input data and not allow users to have a |
Checking the data for distance and distbegin and distend columns doesn't do anything to fix this scenario as there was no distance column in the data to start with. Early on in the ds function if there is no distance column it is created using the distend and distbegin columns. It was this column that was then used with the specified cutpoints to make new distbegin and distend columns in the data. |
OK good point. My suggestion then is that we should not be adding a distance column to the dataset. No doubt it's being done so some other code works - but I think (without looking into the details) we're better to change that other code so that it's robust to not having a distance column. Having a fake distance column puts us in danger that it will be analyzed somewhere as an exact distance when it is not. I appreciate this will be more work and so puts this issue down the priority list. (Still think we should check for distance and distend/disbegin when users pass in data frames and not allow both, as well as the above.) |
Just to note that Laura mentioned for this particular dataset, the distbegin and distend are related to the same underlying set of cutpoints for all observations. This is not a case where there are different distance intervals for each observation - although clearly our code needs to be robust to that. |
One short-term thing to do here is to add documentation under distbegin and distend to discourage users from using this when they have a fixed set of cutpoints that apply to the whole survey. |
Also amended tests to comply with this. Reference #144
I have updated the documentation but as the next step is a big fix I have moved this to the next release milestone. |
Also amended tests to comply with this. Reference #144
When both distbegin / distend area supplied in the dataset along with the arguments cutpoints and width in the function call you get a warning message saying that distbegin / distend are being ignored. In this case there was no column distance hence it was unclear what the detection function was being fitted to.
Also results are inconsistent between the following 2 models when they should be identical
x3 model plot:
x4 model plot (not the strange additional point at distance 5)
The text was updated successfully, but these errors were encountered: