Closed yhoriuchi closed 1 year ago
@yhoriuchi:
1) projoint_qoi
objects don't have those slots -- do you think we should add them?
2) When would we want .ignore_position
to be FALSE? Should we just always make this TRUE?
3) If .structure = "profile_level" and .ignore_position is TRUE, is this a problem? If it doesn't break anything, maybe we don't need to worry about this
.structure
is "profile-level," the unit of analysis is each profile, not profile-pair. So, setting whether to ignore the position does not make sense. I've fixed these things. Note: the new behavior is that if .qoi and .structure/.estimand are BOTH set, the values from .qoi override. If you agree, close the issue.
I checked your changes. The following part you added:
If \code{.structure = "profile_level"} and this argument is \code{NULL}, it is automatically reset to \code{TRUE}.
should be:
If \code{.structure = "choice_level"} and this argument is \code{NULL}, it is automatically reset to \code{TRUE}.
because the code you added is:
if(.structure == "choice_level" & is.null(.ignore_position)){
.ignore_position = TRUE
}
See the warning messages on https://yhoriuchi.github.io/projoint/articles/index.html. Something is wrong. Even without specifying .estimand
and .structure
, we see the warning message. @aaronrkaufman ?
and this one:
mm2 <- [projoint](https://yhoriuchi.github.io/projoint/reference/projoint.html)(.data = out1,
.qoi = qoi_2,
.structure = "choice_level",
.ignore_position = FALSE)
The code should not produce any message even after dropping .structure = "choice_level"
. Right?
Yes, this is because projoint
has defaults set for both .estimand and .structure. I can remove this warning or we can remove the defaults or we can suppress the warning just for the vignette. What do you prefer?
@aaronrkaufman . Please see https://yhoriuchi.github.io/projoint/articles/04-estimate.html. In this example, .strcture
is NOT specified within `projoint().
qoi_1 <- [set_qoi](https://yhoriuchi.github.io/projoint/reference/set_qoi.html)(
.structure = "profile_level",
.estimand = "mm",
.att_choose = "att1",
.lev_choose = "level1")
mm1 <- [projoint](https://yhoriuchi.github.io/projoint/reference/projoint.html)(.data = out1,
.qoi = qoi_1)
Nevertheless, we see the warning message:
## Warning in projoint(.data = out1, .qoi = qoi_1): Both .qoi and .structure are
## specified; using the value from .qoi.
And we see the same warning message TWICE.
I'm sorry, I explained it poorly above.
1) Because there is a default value of .estimand
and of .structure
, we will ALWAYS see both warnings if .qoi
is set, unless the user resets .estimand = NULL
and .structure = NULL
. This is on purpose.
2) They are not the same warning: one is about .structure, the other is about .estimand.
Would you like me to remove this warning? I think it is important.
I see. Then, we perhaps don't need to show the warning message.
On Thu, Aug 17, 2023 at 10:08 AM Aaron R. Kaufman @.***> wrote:
I'm sorry, I explained it poorly above.
- Because there is a default value of .estimand, we will ALWAYS see that warning if .qoi is set. This is on purpose.
- They are not the same warning: one is about .structure, the other is about .estimand.
— Reply to this email directly, view it on GitHub https://github.com/yhoriuchi/projoint/issues/26#issuecomment-1682354423, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC332BDXGMCHMBUCFMAHCADXVYQUDANCNFSM6AAAAAA3SYTYY4 . You are receiving this because you modified the open/close state.Message ID: @.***>
Will do.
@aaronrkaufman , can you make the following change for improvement?
set_qoi()
, and specify aprojoint_qoi
object withprojoint()
, then.structure
and.estimand
should be automatically inherited from theprojoint_qoi
object..structure = "choice_level"
,.ignore_position
should be set to TRUE.projoint()
, for.ignore_position
, we say, "TRUE (default) if you ignore the location of profile (left or right). Relevant only if analyzed at the choice level." But this is not quite an accurate explanation. The default is NULL (because the default.structure
is "profile_level". The default for.ignore_position
should be TRUE only if.structure
is "choice-level." This condition (or conditions) should be set with or without using aprojoint_qoi
object.