forced_choice option not working

67 views
Skip to first unread message

Veysel Şahin

unread,
Aug 17, 2016, 9:46:36 AM8/17/16
to mirt-p...@googlegroups.com
Hi,
i am using mirtCat package and customized gui.
My code like this. forced_choice option just working for first question and on second question user can continue without answer.
After user attemp to continue user getting an error like this,
subscript out of bounds
missing value where TRUE/FALSE needed
Thank you


title <- "İngilizce Sınavı"
authors <- "Murat Akyıldız & Murat Doğan Şahin"

firstpage <- list(h2("İngilizce Sınavı"), h5("Lütfen Tüm sorulara Cevap Veriniz. ",        
                                               "Sorulara geri dönme şansınız olmayacağından lütfen iyi okuyunuz ", 
                                             "Sınav sonunda puanınız size bildirilecektir."))
                                            "Sınav sonunda puanınız size bildirilecektir."))

lastpage <- function(person){
  

  veri<-paste0(ad<-person$demographics$adınız,";",ad<-person$demographics$Cinsiyet,";",person$thetas[1],";",person$thetas_SE_history,";",person$items_answered,";",person$thetas_history,sep="")
  print(str(person))
  write(veri,file = "d.txt",append = 1)
  testvar<-"-2"
  list(h2("Testimizi Tamamladığınız İçin Teşekkür Ederiz."), 
       h4('Puanınız -3 ile 3 arasında hesaplanmaktadır:'),
       h4(sprintf("Sizin Puanınız: %.3f, puanınızın Standart Hatası = %.3f", person$thetas[1],
                  person$thetas_SE_history[nrow(person$thetas_SE_history), 1])),
       h3("Please click 'Next' to close the application."))

}

demographics <- list(textInput(inputId = "adınız", label = "Lütfen Adınız ve Soyadınızı Yazınız",
                               
                               value = ""), selectInput(inputId = "Cinsiyet", label = "Lütfen Cinsiyetinizi Seçin.",
                                                        choices = c("", "Erkek", "Kadın"), selected = ""))
shinyGUI_list <- list(title = title, authors = authors, demographics = demographics,
                      demographics_inputIDs = c("adınız", "Cinsiyet"), firstpage = firstpage, lastpage = lastpage,forced_choice=TRUE)

result <-mirtCAT_preamble(df, mod, method = 'EAP', criteria = 'MI', start_item = 'random',shinyGUI=shinyGUI_list,
                          design = list(min_SEM = 0.3))




Phil Chalmers

unread,
Aug 17, 2016, 1:07:41 PM8/17/16
to Veysel Şahin, mirt-package
Can you supply the df and mod object as well (email it personally to me if necessary) in something like an .Rdata file or two .rds files so that I can reproduce the issue? Using arbitrary working objects is fine as well. 

Phil

2016-08-17 9:46 GMT-04:00 Veysel Şahin <the...@gmail.com>:
Hi,
i am using mirtCat package and customized gui.
My code like this. forced_choice option just working for first question and on second question user can continue without answer.
Thank you


title <- "İngilizce Sınavı"
authors <- "Murat Akyıldız & Murat Doğan Şahin"

firstpage <- list(h2("İngilizce Sınavı"), h5("Lütfen Tüm sorulara Cevap Veriniz. ",        
                                               "Sorulara geri dönme şansınız olmayacağından lütfen iyi okuyunuz ", 
                                             "Sınav sonunda puanınız size bildirilecektir."))
                                            "Sınav sonunda puanınız size bildirilecektir."))

lastpage <- function(person){
  

  veri<-paste0(ad<-person$demographics$adınız,";",ad<-person$demographics$Cinsiyet,";",person$thetas[1],";",person$thetas_SE_history,";",person$items_answered,";",person$thetas_history,sep="")
  print(str(person))
  write(veri,file = "d.txt",append = 1)
  testvar<-"-2"
  list(h2("Testimizi Tamamladığınız İçin Teşekkür Ederiz."), 
       h4('Puanınız -3 ile 3 arasında hesaplanmaktadır:'),
       h4(sprintf("Sizin Puanınız: %.3f, puanınızın Standart Hatası = %.3f", person$thetas[1],
                  person$thetas_SE_history[nrow(person$thetas_SE_history), 1])),
       h3("Please click 'Next' to close the application."))

}

demographics <- list(textInput(inputId = "adınız", label = "Lütfen Adınız ve Soyadınızı Yazınız",
                               
                               value = ""), selectInput(inputId = "Cinsiyet", label = "Lütfen Cinsiyetinizi Seçin.",
                                                        choices = c("", "Erkek", "Kadın"), selected = ""))
shinyGUI_list <- list(title = title, authors = authors, demographics = demographics,
                      demographics_inputIDs = c("adınız", "Cinsiyet"), firstpage = firstpage, lastpage = lastpage,forced_choice=TRUE)

result <-mirtCAT_preamble(df, mod, method = 'EAP', criteria = 'MI', start_item = 'random',shinyGUI=shinyGUI_list,
                          design = list(min_SEM = 0.3))




--
You received this message because you are subscribed to the Google Groups "mirt-package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages