Skip to contents

Simulation functions

rmulti()
Multiple correlated distributions
rnorm_multi()
Multiple correlated normal distributions
rnorm_pre()
Make a normal vector correlated to existing vectors
sim_design()
Simulate data from design
sim_df()
Simulate an existing dataframe
sim_joint_dist()
Simulate category joint distribution

Mixed effects functions

add_random()
Add random factors to a data structure
add_within()
Add within factors
add_between()
Add between factors
add_recode()
Recode a categorical column
add_ranef()
Add random effects to a data frame
sim_mixed_cc()
Generate a cross-classified sample
sim_mixed_df()
Generate a mixed design from existing data

Contrasts

add_contrast()
Add a contrast to a data frame
contr_code_treatment()
Treatment code a factor
contr_code_anova()
Anova code a factor
contr_code_sum()
Sum code a factor
contr_code_difference()
Difference code a factor
contr_code_helmert()
Helmert code a factor
contr_code_poly()
Polynomial code a factor

Other useful functions

codebook()
Create PsychDS Codebook from Data
get_params() check_sim_stats()
Get parameters from a data table
json_design()
Convert design to JSON
make_id()
Make ID
messy()
Simulate missing data
long2wide()
Convert data from long to wide format
wide2long()
Convert data from wide to long format
faux_options()
Set/get global faux options

Datasets

faceratings
Attractiveness ratings of faces
fr4
Attractiveness rating subset

Helper functions

average_r2tau_0()
Average r to Random Intercept SD
check_design()
Validates the specified design
check_mixed_design()
Get random intercepts for subjects and items
cormat()
Make a correlation matrix
cormat_from_triangle()
Make Correlation Matrix from Triangle
faux
faux: Simulation Functions.
fix_name_labels()
Fix name labels
get_coefs()
Get Coefficients from Data
get_design()
Get design
get_design_long()
Get design from long data
getcols()
Get data columns
interactive_design()
Set design interactively
is_pos_def()
Check a Matrix is Positive Definite
nested_list()
Output a nested list in RMarkdown list format
plot_design() plot(<design>) plot(<faux>)
Plot design
pos_def_limits()
Limits on Missing Value for Positive Definite Matrix
readline_check()
Check readline input
sample_from_pop()
Sample Parameters from Population Parameters
set_design()
Set design
unique_pairs()
Make unique pairs of level names for correlations

Distribution functions

std_alpha2average_r()
Standardized Alpha to Average R
convert_r()
Convert r for NORTA
distfuncs()
Get distribution functions
fh_bounds()
Get Fréchet-Hoefding bounds
rlikert()
Random Likert distribution
dlikert()
Likert density function
plikert()
Likert distribution function
qlikert()
Likert quantile function
norm2likert()
Convert normal to likert
norm2beta()
Convert normal to beta
norm2binom()
Convert normal to binomial
norm2gamma()
Convert normal to gamma
norm2nbinom()
Convert normal to negative binomial
norm2norm()
Convert normal to normal
norm2pois()
Convert normal to poisson
norm2trunc()
Convert normal to truncated normal
trunc2norm()
Convert truncated normal to normal
norm2unif()
Convert normal to uniform
beta2norm()
Convert beta to normal
binom2norm()
Convert binomial to normal
gamma2norm()
Convert gamma to normal
unif2norm()
Convert uniform to normal