-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update to use g_mlm() #33
Conversation
…from lmeInfo. Deprecate extract_varcomp(), Info_Expected_lmeAR1(), and g_REML() in scdhlm. Defunct summary.g_REML() in scdhlm.
Codecov Report
@@ Coverage Diff @@
## master #33 +/- ##
=======================================
Coverage 52.81% 52.81%
=======================================
Files 7 7
Lines 640 640
=======================================
Hits 338 338
Misses 302 302 Continue to review full report at Codecov.
|
Update the shiny app to use
Sorry for so many questions...Please consider this whole pull request as a draft :) Just wanted to show you what I have done so far. Thank you! |
…into updating-to-g_mlm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I've left several comments on some pieces. We can talk through the comments tomorrow. The only major comment I have is on the changes to the shiny app lme-fit functions. Let's talk about your approach here to make sure we're on the same page.
I am getting errors when I use the shiny app to calculate effect sizes for certain models right now. For instance, try using the Schutte data in a model with random intercept & slope in baseline and a fixed slope in treatment (or pretty much any other model).
I made some minor changes to the README and vignette, so be sure to re-pull. |
Hi Man,
Responses to your questions below (in addition to the comments on the pull
request).
James
On Wed, May 20, 2020 at 12:31 PM Man Chen ***@***.***> wrote:
Update the shiny app to use g_mlm().
- In lme-fit.R, I updated lme_fit_MB() and effect_size_RML() with
g_mlm().
1. The functions can handle 3 level or 4 level data now, which
includes case/series/within, cluster/case/within, and
cluster/case/series/within. I do not know how to update the functions so
that they can handle data with arbitrary levels.
This is definitely above and beyond what we need to worry about for now.
Since you've already made progress on it, let's stick with the 3/4 level
structure. We'll eventually need to update the UI to provide options to add
these levels, but that will take some work and I want to save it for a
later milestone.
1. I set infotype = "expected in g_mlm() for now. Might need to update
the UI if we allow specifying infotype.
I think it's fine to impose this choice and not provide an option. Anyone
who cares about using infotype = "average" can always move to writing code
(especially if we provide template code in the shiny app).
- In helper-functions.R, I updated summarize_ES().
1. The rho is not calculated correctly now. I am not sure how to
calculate and display rho for models with more than 2 levels.
Let's discuss.
1. Should we allow the users to specify symmetric or asymmetric for
CI_g()? I chose asymmetric so that the result is consistent with the
published shiny app.
I thought in the Pusto Hedges Shadish paper we ended up recommending
symmetric confidence intervals. So it's odd that the app uses asymmetric. I
think I'd prefer to change it to symmetric, but let's discuss tomorrow.
1. Should we add cor_params and var_params estimates to the summary
table? For example, if a user specifies a multivariate model with corSymm
correlation structure, should we report this information in the summary
table?
Let's discuss. My initial inclination is to say no, it would be Too Much
Information.
Sorry for so many questions...
Don't be! All very good questions. I remain VERY impressed with your work!
|
Hi Man, I think I figured out the namespace issues. The trick is that we have to import the functions from lmeInfo, but then also re-export them from scdhlm so that they can be called by a user who has loaded the package (but hasn't loaded lmeInfo). But then if we export the functions, they also have to be documented, so I added a very simple set of Roxygen documentation. See the file |
Aah! That makes sense! Thank you!
…On Thu, May 21, 2020 at 3:30 PM James E. Pustejovsky < ***@***.***> wrote:
Hi Man, I think I figured out the namespace issues. The trick is that we
have to import the functions from lmeInfo, but then also re-export them
from scdhlm so that they can be called by a user who has loaded the package
(but hasn't loaded lmeInfo). But then if we export the functions, they also
have to be documented, so I added a very simple set of Roxygen
documentation. See the file R/lmeInfo-imports.R.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#33 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN4DSOVLAGFCS7XABKVLQNTRSWFORANCNFSM4NF2UUFQ>
.
--
Man Chen, M.Ed.
Doctoral student
Quantitative Methods, Department of Educational Psychology
University of Texas at Austin
|
…hod for g_REML. Added print method for g_REML.
Was the error "object fixed not found"? I got this error. Then I added |
I am not sure why Travis CI build failed... |
Do we need to export |
…ction is no longer exported.
Yes, the error was "object fixed not found". Even with |
The bug in the shiny app seems to be a problem with the call to |
Perfect! Sleep always helps. I will work on the CI_g and shiny app
tomorrow. Thanks for the commits and updates!
On Thu, May 21, 2020 at 10:00 PM James E. Pustejovsky < ***@***.***> wrote:
The bug in the shiny app seems to be a problem with the call to model_matrix(mod,
data = nlme::getData(mod)), which happens in lmeInfo::Fisher_info().
There seems to be a problem with how model_matrix() evaluates the formula
from mod. Not quite sure what to do about it at the moment so I'm gonna
go to bed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#33 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN4DSOX6NMD6TLBZSPEF6RTRSXTFFANCNFSM4NF2UUFQ>
.
--
Man Chen, M.Ed.
Doctoral student
Quantitative Methods, Department of Educational Psychology
University of Texas at Austin
|
I tried to fix the bugs.
I am not sure if the errors are fixed although it seems work on my end. Please let me know how it goes. |
…_g to g_REML and g_HPS objects. Not sure about g_mlm objects.
Looking this over now. I think I know how to resolve.
…On Fri, May 22, 2020 at 10:59 AM Man Chen ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In R/confidence-interval-functions.R
<#33 (comment)>:
> #'
-CI_g <- function(g, cover = 0.95, bound = 35) UseMethod("CI_g")
+
+CI_g <- function(g, cover = 0.95, bound = 35, symmetric = TRUE) UseMethod("CI_g")
I imported CI_g() from lmeInfo. Looks like it is working although I did
not import CI_g.g_mlm(). I am super confused with expanding S3 method.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#33 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCVGIUADB5M5SU3T5BNCITRS2OO5ANCNFSM4NF2UUFQ>
.
|
Merge branch 'updating-to-g_mlm' of http://github.com/jepusto/scdhlm into updating-to-g_mlm # Conflicts: # R/confidence-interval-functions.R # man/CI_g.Rd
Okay I think we've got the CI_g issues resolved. Can you think of anything else outstanding? If not, I'll go ahead and merge with the master branch. |
Yes, please merge! We do need to reinstall scdhlm from Github and update README (I can do this). Not sure if the pkgdown will work but we will see. Thanks! |
Create a new branch as this is an extensive change.
I used a previous branch: updating-to-g_mlm.
Import
g_mlm()
fromlmeInfo
.I put
lmeInfo
in the Depends field in DESCRIPTION and used importFromg_mlm()
,extract_varcomp()
,varcomp_vcov()
, andFisher_info()
. I tried movinglmeInfo
to the Imports field but theLaski_g_mlm
example in confidence-interval-functions.R returns error thatg_mlm
can not be found.Import
CI_g()
fromlmeInfo
and removescdhlm::CI_g()
. Note that we'll first need to make sure thatlmeInfo::CI_g()
works withg_REML
objects.I first tried to Defunct
scdhlm::CI_g()
and importlmeInfo::CI_g()
, butCI_g()
still calls the functionscdhlm::CI_g()
. And I am not sure how to makelmeInfo::CI_g()
works withg_REML
objects. If we do not updateCI_g()
inlmeInfo
, I think the easiest way to updatescdhlm::CI_g()
is to rewrite the function (this is what I did).Update the
scdhlm
vignette to useg_mlm()
.Done. But
g_mlm()
and the inline code are not evaluated now becausescdhlm
is not updated yet. After this branch gets merged to master branch, I will reinstallscdhlm
from Github and then re-knit the Rmd. Should I add confidence intervals for all the models in the vignette?Update the README to use
g_mlm()
.Done. Same with the vignette that
g_mlm()
,CI_g()
and the inline code are not evaluated.Edit documentation to deprecate
g_REML()
.Added documentation for the deprecated and removed functions.
Update the shiny app to use
g_mlm()
.Need more time on this.
I am not sure about importing
g_mlm()
andCI_g()
. Please let me know if you would like to do this differently. Thanks!