Closed MuyaoXi9271 closed 9 months ago
Hi @MuyaoXi9271,
Thanks for reporting this issue. I am not able to replicate the error. What version of ALASCA are you using? What settings do you use?
Best, Anders
Hi Anders,
The version I used is 1.0.14.
ALASCA_model <- ALASCA(df_l, formula = value ~ visit*group + (1|subject), scale_function = "sdall", validate = TRUE, filepath = paste0(path_outputs$POS, "/ALASCA"), save = TRUE)
Thanks for your quick reply.
Best, Muyao
Hi,
Thank you for the additional information. I am still unable to reproduce the error using the Example 2 dataset in our paper and your settings. Is visit
a factor variable? Do you get any output with ALASCA_model$get_scores(component = c(1,2))
?
Best, Anders
Hi Anders,
I get the same error. What else can I check also?
Best, Muyao
You can take a look at the score data table itself with ALASCA_model$ALASCA$score
which contains all the PCs calculated
I can get the data table after running ALASCA_model$ALASCA$score
as shown in the image above.
Best, Muyao
Thank you. I have no experience using the tibble
package but perhaps it is interfering in some way (since this print looks like tibble
)? I guess you can try mod$ALASCA$score[[1]] <- as.data.table(mod$ALASCA$score[[1]])
and then try to plot again, just to ensure that the data tables actually are data table objects
I try mod$ALASCA$score[[1]] <- as.data.table(mod$ALASCA$score[[1]])
and mod$ALASCA$score <- as.data.table(mod$ALASCA$score[[1]])
(I use the function as.data.table from package data.table)
I still have the same error when I plot it.
Best, Muyao
Strange! Can you check that it is indeed a data table? is.data.table(ALASCA_model$ALASCA$score[[1]])
So, the issue here is that - with data.table
- we can select the appropriate rows with self$ALASCA$score[[effect_i]][PC %in% component]
(where self
is the model object) - this is the code in the get_scores
function that throws the error. But there is something preventing this selection to work. We can, however, see that the data table exists and has a column called PC
Hi Ander,
It works now.
Thanks for your help
Best, Muyao
Hi developer,
I got the ALASCA model successfully but accidentally removed the log file. I met the error as shown in the title when I ran
plot(ALASCA_model, component = c(1,2), type = "effect")
I appreciate any help you could provide.
Best, Muyao