View source: R/calculate_cutoff.R
calculate_cutoff | R Documentation |
This function allows you to bootstrap samples across various sample sizes when the data (optionally) has repeated measures items.
calculate_cutoff(population, grouping_items, score, minimum, maximum)
population |
The population data set or the pilot dataset |
grouping_items |
The names of columns to group your data by for the cutoff calculation, usually this column is the item column |
score |
The column of the score you wish to calculate for your cutoff score SE |
minimum |
The minimum possible value for your score, used to calculate the proportion of variability in your items |
maximum |
The maximum possible value for your score, used to calculate the proportion of variability in your items |
"se_items"The standard errors for each of your items.
"sd_items"The standard deviation of the standard errors of your items.
"cutoff"The cutoff score for your estimation of sample size by item.
"prop_var"The proportion of variability found in your items, used to calculate the revised sample from simulations.
# step 1 create data like what I think I'll get or use your own
pops <- simulate_population(mu = 4, mu_sigma = .2, sigma = 2,
sigma_sigma = .2, number_items = 30, number_scores = 20,
smallest_sigma = .02, min_score = 1, max_score = 7, digits = 0)
# step 2 calculate our cut off score
cutoff <- calculate_cutoff(population = pops,
grouping_items = "item",
score = "score",
minimum = 1,
maximum = 7)
cutoff$se_items
cutoff$sd_items
cutoff$cutoff
cutoff$prop_var
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.