Coder Social home page Coder Social logo

Comments (10)

aaronrkaufman avatar aaronrkaufman commented on July 22, 2024

@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

from projoint.

yhoriuchi avatar yhoriuchi commented on July 22, 2024
  1. Yes, please add these slots!
  2. In a new project we are working on (police reform), we are interested in respondents' choice of the left column (status quo). Right? So we cannot ignore the position.
  3. If .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.

from projoint.

aaronrkaufman avatar aaronrkaufman commented on July 22, 2024

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.

from projoint.

yhoriuchi avatar yhoriuchi commented on July 22, 2024

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
  }

from projoint.

yhoriuchi avatar yhoriuchi commented on July 22, 2024

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?

from projoint.

aaronrkaufman avatar aaronrkaufman commented on July 22, 2024

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?

from projoint.

yhoriuchi avatar yhoriuchi commented on July 22, 2024

@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.

from projoint.

aaronrkaufman avatar aaronrkaufman commented on July 22, 2024

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.

from projoint.

yhoriuchi avatar yhoriuchi commented on July 22, 2024

from projoint.

aaronrkaufman avatar aaronrkaufman commented on July 22, 2024

Will do.

from projoint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.