Closed pipi815 closed 2 months ago
Dear author.thanks for your excellent working, but i have some questions, <error/purrr_error_indexed> Error in
purrr::map()
: ℹ In index: 1. Caused by error inglm.fit()
: ! NA/NaN/Inf in 'y' Backtrace: ▆
- ├─jstable::TableSubgroupMultiGLM(...)
- │ └─purrr::map(...)
- │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
- │ ├─purrr:::with_indexed_errors(...)
- │ │ └─base::withCallingHandlers(...)
- │ ├─purrr:::call_with_cleanup(...)
- │ └─jstable (local) .f(.x[[i]], ...)
- │ └─jstable::TableSubgroupGLM(...)
- │ └─stats::glm(formula, data = data)
- │ ├─base::eval(...)
- │ │ └─base::eval(...)
- │ └─stats::glm.fit(...)
- └─base::.handleSimpleError(...)
- └─purrr (local) h(simpleError(msg, call))
└─cli::cli_abort(...)
└─rlang::abort(...)
i have examined 'y' for several ,it is surely nurmeric(0,1), i need your help
there's no NA and illegal value in 'y'
Can you share reproducible data & code?
Thanks for your resolution,i have succeeded running it。While,i wanna to know,how to control the other variables by this code,thanks。
Can you show your code with the other variable?
library(jstable) res<-TableSubgroupMultiGLM(Osteoporosis ~ CVAI1, var_subgroups = c("Gender", "Hypertension","Hyperlipidemia","Income","Education","Diabetes","Smoking","Residence"), data = data, family = "binomial") res。 Thanks for your reply,above is my code. For example,I would like to stratified the analysis by gender but i don‘t konw how to adjust other variables like hypertension,hyperlipidemia and so on at the same time。
Please use var_cov
option https://github.com/jinseob2kim/jstable/tree/master/R
I'm sorry, I'm a beginner and I don't understand what you mean. Could you please give me a sample code,thanks.
library(jstable)
res<-TableSubgroupMultiGLM(Osteoporosis ~ CVAI1,
var_subgroups = c("Gender", "Hypertension","Hyperlipidemia","Income","Education","Diabetes","Smoking","Residence"), data = data, family = "binomial", var_cov = c("Hypertension", "Hyperlipidemia"))
Thanks for your reply.
Dear author.thanks for your excellent working, but i have some questions, <error/purrr_error_indexed> Error in
purrr::map()
: ℹ In index: 1. Caused by error inglm.fit()
: ! NA/NaN/Inf in 'y' Backtrace: ▆
- ├─jstable::TableSubgroupMultiGLM(...)
- │ └─purrr::map(...)
- │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
- │ ├─purrr:::with_indexed_errors(...)
- │ │ └─base::withCallingHandlers(...)
- │ ├─purrr:::call_with_cleanup(...)
- │ └─jstable (local) .f(.x[[i]], ...)
- │ └─jstable::TableSubgroupGLM(...)
- │ └─stats::glm(formula, data = data)
- │ ├─base::eval(...)
- │ │ └─base::eval(...)
- │ └─stats::glm.fit(...)
- └─base::.handleSimpleError(...)
- └─purrr (local) h(simpleError(msg, call))
└─cli::cli_abort(...)
└─rlang::abort(...)
i have examined 'y' for several ,it is surely nurmeric(0,1), i need your help
there's no NA and illegal value in 'y'
hello! i met the same problem with "NA" .May I ask how did you solve the problem? i checked the data. There is no missing value. Thanks!
Can you share reproducible example?
I think there are non 0/1 value in ‘y'
res <- jstable::TableSubgroupMultiGLM(fall_acc ~ ckd, family = "binomial" , var_subgroups = c("Pain","Age"), data = data_forest,line=T ) 'data.frame': 1406 obs. of 6 variables: $ Depression: Factor w/ 2 levels "<10",">10": 1 1 1 2 1 1 2 2 1 2 ... $ fall_acc : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 2 1 ... $ ckd : Factor w/ 2 levels "0","1": 2 1 1 2 2 2 1 2 2 2 ... $ Sex : Factor w/ 2 levels "Female","Male": 2 1 1 2 1 1 2 1 2 2 ... $ Pain : Factor w/ 2 levels "No","Yes": 2 1 2 2 1 1 2 2 1 2 ... $ Fall : Factor w/ 2 levels "No","Yes": 2 1 1 1 1 1 1 1 1 1 ...
the codes run well without var_subgroups
There are no “Age” variable
I check OK if var_subgroup = “Pain”
I can not run with "Pain" only . thks, i will check when i restart my computer.
This is my result. Could you install the latest version?
data_forest <- fread("~/ShinyApps/research-individual/aquabeats2/aosc/forest.csv")
res <- jstable::TableSubgroupMultiGLM(fall_acc ~ ckd, family = "binomial" ,
var_subgroups = c("Pain"),
data = data_forest1,line=T
)
res
Variable Count Percent OR Lower Upper P value P for interaction
ckd Overall 1406 100 1.16 0.91 1.48 0.234 <NA>
1 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
11 Pain <NA> <NA> <NA> <NA> <NA> <NA> 0.818
init No 808 57.5 1.12 0.79 1.6 0.52 <NA>
...4 Yes 598 42.5 1.19 0.84 1.69 0.324 <NA>
I retried it today. Running it directly still didn't work, saving the data locally and re-reading it worked. The two data types are as follows (that int/chr below will run).
version of package "jstable" is 1.3.3 . the latsest one .
there is fall_acc
variable issue. The function can’t run if dependent variable is factor
Thank you for your work!Awesome!!!
Dear author.thanks for your excellent working, but i have some questions, <error/purrr_error_indexed> Error in
purrr::map()
: ℹ In index: 1. Caused by error inglm.fit()
: ! NA/NaN/Inf in 'y' Backtrace: ▆i have examined 'y' for several ,it is surely nurmeric(0,1), i need your help