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

Issue plotting agree_np object, also peculiar warning #50

Open
TenanATC opened this issue Mar 5, 2024 · 1 comment
Open

Issue plotting agree_np object, also peculiar warning #50

TenanATC opened this issue Mar 5, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@TenanATC
Copy link

TenanATC commented Mar 5, 2024

Hello! I get both a peculiar warning when running the below code for agree_np and then the plotting method will not work.

The warning is "Model has 31 prior weights, but we recovered 2 rows of data. So prior weights were ignored.", which I can't decipher. This occurs in my 0.2.0 version but not in my colleagues 0.1.2 version.

The error for the plot method occurs in both of our versions and is: "Error in -1 * delta : non-numeric argument to binary operator"

Here's a reproducible example:
`
df <- data.frame(x1 = c(0,0,0,0,-0.15,0,0,0,0,0,-0.185714286,0,0,0,0,-0.05,0.028571429,0,0.028571429,0,0,0,0,0,0,0,-0.05,0,-0.3,0,0),
x2 = c(-0.255255255,-0.092972973,-0.421428571,-0.001228501,-0.027777778,-0.103070175,0.042857143,-0.005555556,0.048178613,
-0.236842105,-0.092436975,0.117777778,0.08168643,-0.090909091,-0.082309582,-0.038461538,0.058823529,-0.03968254,
-0.008009153,0.052287582,-0.001349528,0,-0.016746411,0.078947368,-0.031400966,-0.161616162,0.057142857,0.051578947,
-0.117647059,-0.169642857,-0.057017544))

df_np <- agree_np(x = "x1", y = "x2", data = df, delta = log(1.10), TOST = TRUE, prop_bias = TRUE)
plot(df_np)`

@arcaldwell49
Copy link
Owner

It's a me being dumb problem. A very long story short, it has to do with how the delta is saved via matched call.

The code below will work by assigning the delta to an object below the call. I have will keep this issue open until I have a more sustainable solution.

dumb_aaron = log(1.1)
df_np <- agree_np(x = "x1", y = "x2", data = df, delta = dumb_aaron, TOST = TRUE, prop_bias = TRUE)
plot(df_np)

@arcaldwell49 arcaldwell49 self-assigned this Mar 20, 2024
@arcaldwell49 arcaldwell49 added the bug Something isn't working label Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants