Skip to content
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

Model Performance for oohbchoice class models #637

Open
donaldkip77 opened this issue Oct 6, 2023 · 12 comments · May be fixed by easystats/insight#817
Open

Model Performance for oohbchoice class models #637

donaldkip77 opened this issue Oct 6, 2023 · 12 comments · May be fixed by easystats/insight#817
Labels
Feature idea 🔥 New feature or request

Comments

@donaldkip77
Copy link

I am tying to extract R squared and adjusted R squared for models of class oohbchoice and package performance cannot support please help
library(DCchoice)
library(parameters)
library(insight)
library(modelsummary)
library(performance)
library(easystats)
library(modelbased)
library(see)
data(oohbsyn)
oohb1 <- oohbchoice(R1 + R2 ~ 1 | log(BL) + log(BH), data = oohbsyn)
oohb2 <- oohbchoice(R1 + R2 ~ age + gender | log(BL) + log(BH), data = oohbsyn)
summary(oohb2)
summary(oohb2)$AIC
summary(oohb2)$R2
summary(oohb2)$R1
r2(oohb2)
model_performance(oohb2)

@strengejacke
Copy link
Member

strengejacke commented Oct 6, 2023

I can't install the package DCchoice because the dependency Icens is no longer available. Thus, it is unlikely that this package is supported across easystats packages (unless everything is fixed again and DCchoice becomes installable).

@donaldkip77
Copy link
Author

You install the Icens package from bioconductor website page https://www.bioconductor.org/packages/Icens/

@strengejacke
Copy link
Member

Yes, I just realized that, too ;-) Will look at it.

@donaldkip77
Copy link
Author

A link to the oohbchoice model https://rdrr.io/cran/DCchoice/man/oohbchoice.html

strengejacke added a commit to easystats/insight that referenced this issue Oct 6, 2023
@strengejacke strengejacke linked a pull request Oct 6, 2023 that will close this issue
@strengejacke
Copy link
Member

What names characterize the RHS of the | in the formula? BH and BL in your example.

@donaldkip77
Copy link
Author

R1 + R2 ~ (the names of the covariates) | BL + BH

The covariates are defined in the right hand side of the formula in the place of (the names of the covariates). Each covariate is connected with the arithmetic operator + and (the names of the covariates) in the above syntax should be replaced with var1 + var2 and the like.

The first part, the left-hand side of the tilde sign (~), must contain the response variables for the suggested prices in the first and the second stage of CV questions. In the example below, R1 denotes a binary or two-level factor response variable for a bid in the first stage and R2 for a bid in the second stage.

The last part of the formula starts after the vertical bar (|). The names of the two variables (BL and BH) containing suggested lower and higher prices in OOHBDC-CV question are specified in this part

According to the structure of the formula, a data set (data frame) consists of three parts. An example of the data set (first six rows) is as follows (gender and age are respondents' characteristics and assumed to be covariates): An example

id R1 R2 gender age BL BH
1 1 0 female 32 4 6
2 1 1 male 41 2 4
3 1 -9 female 38 2 4

@donaldkip77
Copy link
Author

For more details https://rdrr.io/cran/DCchoice/man/oohbchoice.html

@strengejacke
Copy link
Member

Yes, but how to "name" that component? The LHS of ~ is the "response", the RHS we usually call "conditional". Other models also have a "zero-inflation" or "random effects" component. But how to call "The names of the two variables (BL and BH) containing suggested lower and higher prices in OOHBDC-CV question are specified in this part"?

@donaldkip77
Copy link
Author

From my understanding you are finding it difficult to name the LHS "response" variable Component and the (BL and BH) Component containing suggested lower and higher prices in OOHBDC-CV question" . I am also unable to do so. What can we do?

@donaldkip77
Copy link
Author

Another perspective would be that. Variable R1 contains yes or no to the bid in the first stage or 1 for yes and 0 for no. R2 contains yes, no, none to the bid in the second stage or 1 for yes, 0 for no, and -9 for none

@strengejacke
Copy link
Member

It's rather thinking in terms how the formula is composed.
For example, in mixed models, we may have two "components":

data(sleepstudy, package = "lme4")
m <- lme4::lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
insight::find_formula(m)
#> $conditional
#> Reaction ~ Days
#> 
#> $random
#> ~Days | Subject

What would be the name for the BH and BL in DCchoice?

oohb1 <- oohbchoice(R1 + R2 ~ 1 | log(BL) + log(BH), data = oohbsyn)
insight::find_formula(oohb1 )
#> $conditional
#> R1 + R2 ~ 1
#> 
#> $???  # <- we need that name
#> ~log(BL) + log(BH)

@donaldkip77
Copy link
Author

Could the package authors could be of help i had earlier contacted them but no reply to date http://www.agr.hokudai.ac.jp/spmur/

@strengejacke strengejacke added the Feature idea 🔥 New feature or request label Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature idea 🔥 New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants