-
Notifications
You must be signed in to change notification settings - Fork 103
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
Improving Model> Fit model>Two variable & One variable dialogs #7930
base: master
Are you sure you want to change the base?
Conversation
@derekagorhom can you peer review this? |
@Vitalis95 it is great you are working on this issue. But I couldn't find what you have done. Here is the current dialogue - from your pull request. I had expected to find another button, called Bayesian, at the top. But alternatively I suppose you could add the Bayesian options here (And label the control as I tried with the nc data from the statsr package. Can you also detail which data you used,, and you are also welcome to include a figure in the pull request, if you wish, so I know what to expect. |
@lloyddewit , When @rdstern pulls this branch he can't see the changes, what might be the problem? Thanks |
@Vitalis95 I pulled the branch and can see the changes in VisualStudio. However when I compile and run the branch, the dialogs look identical to the screenshots in issue #7634. Do the dialogs look identical to you too? If there are changes that should be visible in this PR, then please could you share a screenshot so that I can check if I can see these changes also? Thanks |
@Vitalis95 I have looked at the new one and found the Bayes in the one variable dialogue, see below. I still can't find it in the 2-variable? a) For now can you hide the control for one-sided/two sided. I haven't bothered with it for the other options, because I don't think the idea is that important. |
@Vitalis95 one important - and larger area - is that we will need a button labelled either Options or Prior. That to allow us to give informative priors. I am happy that the default is non-informative. You may want to wait with this, or indicate for now, but putting the button there, but not enabling it for now. |
@rdstern , have a look at it, it's for One Variable Fit models Without saving is more informative than when saved. What is your take on that? |
@rdstern , I have added to Two variable Fit models: |
@Vitalis95 this is exciting. You have made very good progress. a) This gave me a serious error that needs correction, though it is nothing to do with the Bayesian. I get the same problem with the released version. If you try the dialogue with the survey and with the yield by variety, with the variety as a character variable, i.e. not a factor. Then it crashes with the nasty error. I wonder if character-types should be made into factors, or just not allowed. Should just numeric or factor be allowed. I assume we should allow logical or date, so not sure of the simplest check to do. b) So then I moved to the subset with variety at 2 levels. There the proportion etc seems to work well. I wonder why it can't all work with more than 2 levels. It gives the choice of which is to be a success, and (with more than 2 levels), then all the others together are against this one. That's what (I think) is possible in the ordinary proportion functions, so why not for the Bayesian? c) This does need the d) I asked you to get rid of the alternative hypothesis checkbox. I am still not sure I want it for the frequentist options, but (sorry) please put it back here. At the same time there would be a real jackpot if better hypotheses could be included. I don't know if this is possible, so start for now with what you had before. But might it be possible to have Ho = p < 0.3 v H1 = p>= 0.3? That would be a game-changer, but I don't know if it is possible. I hope @jkmusyoka can also help with discussions on these improvements. e) I like the option to choose between simulation and theoretical, but couldn't see the difference in the output. I don't want 1000 lines of output, but it would be good to have something different in the output. e) Trivial changes - for one sample, in the list of tests could you add a horizontal line under the 2 bayes tests and estimates as well as above. |
@rdstern I have added to the |
@rdstern , I noticed Negative Binomial in 2 variable fit model dialog had a bug. It's now working fine |
@rdstern , I have added sub dialog |
@Vitalis95 I get the developer error when loading the 2 variable example: |
Co-authored-by: lloyddewit <[email protected]>
Co-authored-by: lloyddewit <[email protected]>
Co-authored-by: lloyddewit <[email protected]>
@lloyddewit ,I have made the changes. Thanks |
@rdstern if you can test/approve, then we can merge, thanks |
@lloyddewit I will check and support that you wait until after the build. The Model > Two Variable - in its current form is one of the dialogues that has regressed in the current merged version. I don't want Patrick's work to be further complicated. |
@Vitalis95 I looked, but couldn't find the Bayesian options anymore? This problem may be at my end, because I had a similar problem with another pull request. So, I'll try again later - perhaps after restarting! |
updating branch
@Vitalis95 now it is different - very different - and there are build errors. But I think that is progress, because I earlier had a similar problem with a pull request from @N-thony where the change didn't seem to be working on my running. |
@Vitalis95 yes. Sorry I have been working on the model dialogs generally. |
You can now work on the 1 and 2 variable dialogs. Just merge the changes from the master and add the new functionalities. |
@rdstern ,have a look it now. |
@Vitalis95 please direct me on what options to test here. Is it now both one variable and 2 variables. I am starting with the survey data, unless you suggest better. And I'll get a factor variable with just 2 levels there. |
@rdstern this reminds me that we need to find a way for these dialogs to distinguish between. 1 variable models and 2 variable models in the selector. At the moment. I noticed that if have both types of models, they all display in either of the dialogs. Some 2 variable models operations don't really apply to 1 variable models. This will also help alleviate any user confusion. |
@Vitalis95 what should be done here? |
@Vitalis95 can you provide an update on the current status of this PR? |
Fixes (partially) #7634
This work is still in progress
@rdstern @N-thony @lloyddewit I have added the Bayesian method to Two Variable Fit model dialog.
The function
bayes_inference
currently supports two level factor, the response variable (Second Variable in our case) can be either categorical (2 level factor) or numeric , the explanatory variable(First Variable in our case) is always categorical.I am using
nc
data to test,When the Second Variable is numeric i.e
gained
and first variablehabit
, thesample statistic
should bemean
When the Second Variable is categorical i.e
lowbirthweight
and first variablehabit
, thesample statistic
should beproportion
, then specify which of its levels is thesuccess
in the y argument (Second Variable) i.elow
- the level to do inference on,@rdstern , the number of Monte Carlo drawn when the type of inference is
credible interval
, is more than 10,000,R-Instat output window cannot display all of them including the summaries at the end, I have set it to print a maximum of 1000, the reason for this is that by default the global options of R cut off outputs after the 1000th entry -it will cut off at 1000th entry and display summaries at the end. Alternatively, if you are not happy with this, we then not save the model so that it just display the summaries