Code Monkey home page Code Monkey logo

conquestr's People

Contributors

markdly avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

conquestr's Issues

cq_show currently has error if conquestr is only library loaded

Reprex:

library(conquestr)
cq_show(cq_example(display = FALSE, example_name = "ex1.shw"))
#> Error in group_by(., term): could not find function "group_by"

library(tidyverse)
cq_show(cq_example(display = FALSE, example_name = "ex1.shw"))
#> # A tibble: 9 x 13
#> # Groups:   term [1]
#>   params    est   err uw_mnsq uw_ci_lo uw_ci_hi  uw_t  mnsq ci_lo ci_hi
#>   <chr>   <dbl> <dbl>   <dbl>    <dbl>    <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1   q1 -1.36  0.052    2.25     0.93     1.07  25.3  1.25  0.92  1.08
#> 2 2   q2 -1.95  0.054    0.85     0.93     1.07  -4.2  0.89  0.91  1.09
#> 3 3   q3  0.576 0.05     1.02     0.93     1.07   0.5  1.01  0.93  1.07
#> 4 4   q4  0.63  0.05     0.51     0.93     1.07 -16.4  0.67  0.93  1.07
#> 5 5   q5  0.252 0.05     2.83     0.93     1.07  33.8  1.84  0.93  1.07
#> 6 6   q6  0.434 0.05     0.53     0.93     1.07 -15.4  0.67  0.93  1.07
#> 7 7   q7  0.581 0.05     0.61     0.93     1.07 -12.3  0.74  0.93  1.07
#> 8 8   q8 -0.096 0.05     1.21     0.93     1.07   5.3  1.11  0.93  1.07
#> 9 9   q9  0.939 0.143    0.66     0.93     1.07 -10.5  0.75  0.93  1.07
#> # ... with 3 more variables: t <dbl>, term <chr>, section_index <chr>

Created on 2018-05-11 by the reprex package (v0.2.0).

length of key string

I am currently working on domain based analysis and have LOTS of items in a run. eg 350+ items

current command results in a super long line
`key 111111111111111111111111 etc ! 1'

can we split that key string into more manageable chunks

Separating data file from name of analysis

Currently {name} is used for $title, $data, $label etc.
Could we use something like data {filename}.txt; so that we can use one datafile for many subsets of analysis?

> cq_cmds
$reset
[1] "reset;"

$title
[1] "title {name} {title};"

$data
[1] "data {name}.txt;"

$label
[1] "label << {name}.lab;"

$format
[1] "format {group_resp_cols} responses {resp_cols};"

$codes
[1] "codes {codes};"

Gender Dif

cqc_Show to read in the gender result.
I need item index, Chi Sqr results, and if item favours a gender

order of syntax commands - 'label' after 'format'

is it possible to change the output order? so the 'label' command comes after the 'format' command

Currently code produces this order. Which CQ wont read, but has no issues if I swap order of commands.

reset;
title Numeracy_Y3_a1 ;
data Year_3_Calibration_Extract_with_DAC_redaction_20180306.txt ;
label << Numeracy_Y3_a1.lab;
format responses 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212;
codes 0,1,2,3,4,5,6,7,8,9;
key 111111111111 ! 1;
model item;
estimate ! iter=1000, nodes=30;
itanal >> Numeracy_Y3_a1.itn;

Super Large mnsq

Sometimes CQ will record an items mnsq as a text value instead of a numeric value. Eg

item:1068                                                            
Cases for this item    273   Discrimination  0.02
Item Threshold(s):    32.00   Weighted MNSQ _BIG_
Item Delta(s):        77.96
------------------------------------------------------------------------------
 Label    Score     Count   % of tot  Pt Bis     t  (p)   PV1Avg:1 PV1 SD:1   
------------------------------------------------------------------------------
   0       0.00      270      98.90   -0.02    -0.25(.800)  0.12     0.80     
   1       1.00        3       1.10    0.02     0.25(.800)  0.01     1.23     
==============================================================================

Currently the import function will display an error message ( generic conversion issue because it cant convert 'BIG' into a number) and the resulting mnsq cell value is kept blank/NA

Is it possible to have mnsq = 999 in these cases?
Or would you rather this be a responsibility of the end user (ie me) to find/recode?

import show files

ConQuest show files are produced using the show command. It would be good to add functionality to conquestr to reduce dependence on other functions such as sirt::R2conquest to obtain this information.

conquest analysis function

There is now some functionality to read in conquest output (e.g. cq_itanal) and some rudimentary functionality to create syntax using cq_syntax. Next a function to generate an analysis would be nice to start bringing things together. Use inbuilt package data as an example. This involves creating syntax and associated files (mydata.txt, mydata.lab) based on a dataframe of item responses. Smaller helper functions will also be needed (e.g. to identify response columns).

Itanal: "Discrimination" sometimes labelled "Item-Rest Cor."

Depending on the version of ConQuest used, an item analysis (itanal) file might have a label named "Item-Rest Cor."

Item 120
--------
item:120 (120)
Cases for this item    5704   Item-Rest Cor.  0.25
Item Threshold(s):     2.74   
Item Delta(s):         2.74
...

Other times this is labelled as "Discrimination" (as in CTT discrimination)

Item 8
------
item:8 (q8)
Cases for this item   1475   Discrimination  0.57
Item Threshold(s):    -0.10   Weighted MNSQ   1.11
Item Delta(s):        -0.10
...

conquestr::cq_itanal() currently imports "Discrimination" version only.

generate Conquest syntax

This is covered to a degree in other packages already. We should focus on the common use case initially - unidimensional analysis with sensible defaults.

Extreme items where threshold = +-32

this is itanal for extreme items. note threshold and fit

--------
item:111 (x00026989)                                                            
Cases for this item    208   Discrimination  0.25
Item Threshold(s):   -32.00   Weighted MNSQ _BIG_
Item Delta(s):       -37.01
------------------------------------------------------------------------------
 Label    Score     Count   % of tot  Pt Bis     t  (p)   PV1Avg:1 PV1 SD:1   
------------------------------------------------------------------------------
   A       0.00        5       2.40   -0.25    -3.78(.000) -1.14     0.74     
   C       1.00      203      97.60    0.25     3.78(.000)  0.66     0.96     
==============================================================================
--------
item:210 (x00078108)                                                            
Cases for this item    206   Discrimination  0.28
Item Threshold(s):   -10.03   Weighted MNSQ 813.33
Item Delta(s):       -10.03
------------------------------------------------------------------------------
 Label    Score     Count   % of tot  Pt Bis     t  (p)   PV1Avg:1 PV1 SD:1   
------------------------------------------------------------------------------
   A       0.00        4       1.94   -0.12    -1.77(.078) -0.59     0.87     
   C       1.00      198      96.12    0.28     4.16(.000)  0.51     0.96     
   D       0.00        4       1.94   -0.27    -3.98(.000) -1.29     0.58     
==============================================================================

CR items

Want to read in and deal with items with partial credits scoring

import .shw file??

Do you read in the .shw files? eg to get item errors
No problems if you dont, I can write something.

Perfect/Zero items

function conquestr::cq_itanal() fails to read in any itanal file that contains a zero/perfect item.
Error message is something about True/FALSE
image

Sample itanal stats:
image

auto-detect number of pvs in pv file

Currently users need to specify the number of plausible values contained in a file when importing.

library(conquestr)
fname <- cq_example(display = FALSE, example_name = "ex1_10.pv") 
pv <- cq_pv(fname, np = 10)  
head(pv)
#> # A tibble: 6 x 4
#>   index val   recid field
#>   <chr> <chr> <int> <chr>
#> 1 1     10001     1 pid  
#> 2 1     3.02      1 pv1  
#> 3 2     3.16      1 pv2  
#> 4 3     2.43      1 pv3  
#> 5 4     5.34      1 pv4  
#> 6 5     2.85      1 pv5

Created on 2018-03-28 by the reprex package (v0.2.0).

It would be better if this was auto-detected on import. Or, at the very least provide a warning if the number of pvs appears to be incorrect for the file specified...

rlang package needed

I tried to install the conquestr package and got an error about the rlang package
i resolved it by install.package("rlang") and then re-trying to install your CQr package

> devtools::install_github("markdly/conquestr")

Downloading GitHub repo markdly/conquestr@master
from URL https://api.github.com/repos/markdly/conquestr/zipball/master
Installing conquestr
Installing 1 package: gdata
Installing package into ‘C:/Users/Leanne/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘gtools’

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/gtools_3.5.0.zip'
Content type 'application/zip' length 144747 bytes (141 KB)
downloaded 141 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/gdata_2.18.0.zip'
Content type 'application/zip' length 1186723 bytes (1.1 MB)
downloaded 1.1 MB

package ‘gtools’ successfully unpacked and MD5 sums checked
package ‘gdata’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\Leanne\AppData\Local\Temp\RtmpWaqULs\downloaded_packages
Installing 1 package: rlang
Installing package into ‘C:/Users/Leanne/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/rlang_0.2.0.zip'
Content type 'application/zip' length 817350 bytes (798 KB)
downloaded 798 KB

package ‘rlang’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘rlang’

The downloaded binary packages are in
C:\Users\Leanne\AppData\Local\Temp\RtmpWaqULs\downloaded_packages
"C:/PROGRA1/R/R-341.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet
CMD INSTALL
"C:/Users/Leanne/AppData/Local/Temp/RtmpWaqULs/devtoolsf503a325c1b/markdly-conquestr-c414fbd"
--library="C:/Users/Leanne/Documents/R/win-library/3.4" --install-tests

ERROR: dependency 'rlang' is not available for package 'conquestr'

  • removing 'C:/Users/Leanne/Documents/R/win-library/3.4/conquestr'
    In R CMD INSTALL
    Installation failed: Command failed (1)`

Import output gracefully when estimate fit=no;

When fit=no; is specified for the ConQuest estimate command, this information is not produced for the itanal and show files.

This results in NA values for thresholds when using cq_itanal()
Warnings are also produced when using cq_show()

These should be handled (1) correctly, and (2) in a more user friendly way.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.