Closed ns-rse closed 7 years ago
Thanks for the question. Unfortunately, the Shiny application is completely and utterly broken. The application was working for last year's useR conference, however, since I have modified the package syntax slightly which makes the application unusable.
Fortunately, the Shiny application should be updated within the next month to generate correct code and hopefully not be utterly broken. I am talking about the package at JSM in early August, this is my deadline for this.
Thanks for taking the time to update me on the current state of play, appreciated.
I look forward to the revision. Good luck with your talk at JSM.
Although not extensively tested, the Shiny app for this package should generate data and correct code for simple models.
You can install the latest version using:
devtools::install_github('lebebr01/simglm')
If you do try this and still are receiving errors, I'd appreciate if you passed those along so that I can hopefully fix those. The Shiny app is large, cumbersome, and having more than a single tester is helpful.
Cheers.
Hi Brandon,
Thanks for notifying me of the update and apologies for taking so long to get back to you, work has been keeping me busy.
I've installed the new version and had a play around with it. I'm not sure I've tested every possible option but here are a few things I noticed...
Discrete Co-variates
Increasing the number of Discrete Co-variates can cause errors. If there are three continuous co-variates and I attempt to set three discrete variables too then the 'Mean cov', 'SD cov' and 'Type cov' under Continuous Co-variates all show...
Error: missing value where TRUE/FALSE needed
...this may be by design but I expect there may be scenario's where people do have multiple discrete variables they wish to simulate.
Update Simulation
I played around with a few options then hit "Update Simulation" and got the error message....
Error: 5 parameters specified for 2 variables in design matrix
The options I'd selected ultimately were not the problem as starting a new instance of Shiny they worked ok, it seemed to be an issue with selecting and unselecting options. I realise this isn't a particularly useful description as its not reproducible, but does it perhaps suggest that the order in which options are selected/enabled is important.
Not much I'm afraid and even less helpful that I don't have time to fork and collaborate, but I hope its of some utility.
Neil
-- "We have the duty of formulating, of summarising, and of communicating our conclusions, in intelligible form, in recognition of the right of other free minds to utilize them in making their own decisions." - R.A. Fisher (1955)
Neil Shephard Clinical Trials Research Unit University of Sheffield
-----BEGIN PGP PUBLIC KEY BLOCK----- Version: Mailvelope 0.11.0 Comment: Email security by Mailvelope - https://www.mailvelope.com
xsBNBFTUl3QBB/95NT1dbXEVSsKj/uSCuQWZbFBJG49ymVKaoVCR8VQIg8sn K+nkDk0KMURqSSHUHsi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nhksETFWHd+MEiOmErUJixU0uS3EPBcJ7XfJvQmJuZOwARAQABwsBf BBgBCAATBQJU1JeICRAwyWVb1+DArgIbDAAAteAH/2TCRqYRC3f+pYzCYeNy tMwf9J4unv87xvVzd8zYZk+nd2TCx16fu4TniQrD4hCXJTKJIg8uKiIWHC6X /uxAd4aesPEepH81gyT2Kzfws0aZ9iERDeTWRCAL5fPNb6R5inXzL+vgwONb bI3egOZSysW+6Hv4hMAajbv3z8vPiLJC2nD6LtVRP4Njy0FD2HFBg9y6co5c bK5lDEbVRvOwz39krOw7+MTRS2+Sy0POdjy3Mg+nEJaL5XRvE9JCYNX/wb0p XaqGCJTToxfyOfA+UJqQd1yNGTVKN8A20oI3mrz/RBKYKClGyJpcFgfcx9ui YYcBAzk1OqtEN0dhYUUqAUI= =kSM+ -----END PGP PUBLIC KEY BLOCK-----
On 12 July 2017 at 20:51, Brandon LeBeau notifications@github.com wrote:
Although not extensively tested, the Shiny app for this package should generate data and correct code for simple models.
You can install the latest version using:
devtools::install_github('lebebr01/simglm')
If you do try this and still are receiving errors, I'd appreciate if you passed those along so that I can hopefully fix those. The Shiny app is large, cumbersome, and having more than a single tester is helpful.
Cheers.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lebebr01/simglm/issues/46#issuecomment-314877733, or mute the thread https://github.com/notifications/unsubscribe-auth/AQwKxsp0gGcPzfKGKpsiavnijYuarke7ks5sNSPSgaJpZM4OGywB .
I appreciate you taking the time to work through the Shiny app and these notes are very helpful in my attempt to get this app working as smoothly as possible. I've seen one of the error messages you obtained as well but could not directly isolate it, I need to spend more time with it.
If you are interested in progress of the package/shiny app passively watch this repo and also announcements at https://brandonlebeau.org
Hi,
Thanks for writing and sharing this package, its looks incredibly powerful and in turn useful.
I would be grateful if you've time for advice on model specification. I've been tasked with checking simulations someone else has performed (using Stata) for a longitudinal study of a Randomised Control Trial with two arms (
group
), adjusting for baseline (baseline
), time (Time
) and interaction between time and group. Since the study is longitudinal they have clustered at the individual level (id
) and interacted treatment allocation (group
) with time (month
). With the data in long-format they have simulated multiple time points (n = 8) and specify the regression model along the lines of......since interaction terms are automatically expanded (in this case to
group + month + group * month
).My first approach to checking this with
sim_pow_glm()
is to fire up the Shiny example (a very neat addition by the way, thank you) and set the following parameters. I've listed the options and (put in brackets my thoughts on what the parameter should be, or whether I've left is as a default)two-level
longitudinal
20
1
5
1
1
yes
4
baseline
,group
,id
1
1
1
1
1
1
0
0
0
1
1
1
lvl1
lvl1
lvl2
continuous
No
No
lvl3
clustersyes
dropout
1
group
2
lvl1
yes
group.f
baseline
id
1
2
lvl1
no
Problems
When I hit the
Simulate Data
button I'm told......and the following from the console...
Questions
The code generated from Shiny (also a very nice feature) is included below should it be useful...
I'd like to first generate a data set that I can check the structure of before moving on to power simulations and varying the sample size, co-variate means/SDs etc. etc. but am unsure if I'm on the right track.
Thanks in advance for any assistance you can provide.