README.md

nomscheck: Check NOMs H-data

Installation and Implementation Instructions

  1. Download R
  2. Download the free version of R-Studio
  3. Open R-Studio and make sure you have the devtools and rmarkdown packages installed (type the code below into the console)
install.packages("devtools")
install.packages("rmarkdown")
  1. Windows users: You may have to download and install Rtools MAC users: You may have to download and install Xcode

  2. Install and load the nomscheck package

devtools::install_github("sarahvanhala/nomscheck")
library(nomscheck)
  1. Read in a SPARS download using the read_noms_data function (the file is the file that you download from SPARS)
noms_data <- read_noms_data("/Users/sarah/Desktop/SV Work/Evaluation Projects/General Reports/Packages/ExcelReport old.xls")

The results of read_noms_data includes the following derived variables:

You can save the results of read_noms_data using the following code:

library(readr)
write_csv(noms_data, "/path/file_name_you_want.csv")
  1. Create the prior_assessment_data csv using the save_prior_assessments function
save_prior_assessments(noms_data, "/Desktop/prior_assessments.csv")
  1. Click on File > New File > R Markdown > select from template > select NOMs checking report > OK

  2. Click on the arrow to the right of Knit > knit with parameters

  3. Save the code file

  4. Enter the paths for the new NOMs data set and optionally for the csv of prior assessments

  5. Click Knit to create the report!

Instructions on how to change the comparison distributions

For the variable plots:

  1. Determine the mean of the distribution

  2. Determine the standard deviation of the distribution

  3. Go into the code that is generated after Step 8 above

  4. Type ctrl+f for compare_dist and change the mean and standard deviation parameters

## For the difference plots:

  1. The probability that the difference between assessments is zero

  2. The mean of the absolute value of the non-zero differences

  3. Go into the code that is generated after Step 8 above

  4. Type ctrl+f for compare_diff and change the zero_prob and the mean parameters

Example

compare_diff(diff_data, "Weight", zero_prob = .3, mean = 10)
compare_dist(new_data, "BPressure_s", mean = 90, sd = 15)

Note that the code that you need to run in the console is in the Run Me file



sarahvanhala/nomscheck documentation built on May 11, 2019, 5:15 p.m.