check_input: Function trunning the actual power simulation

View source: R/utility_functions.R

check_inputR Documentation

Function trunning the actual power simulation

Description

check_input() checks if inout handed to simulation is correct. Returns error messages.

Usage

check_input(
  model,
  data,
  fixed_effects,
  simvar,
  steps,
  critical_value,
  n_sim,
  SESOI,
  R2,
  R2var,
  R2level
)

Arguments

model

lme4 model: mixed model of interest

data

data frame: pilot data that fits the mixed model of interest

fixed_effects

vector of character elements: names of variables that are used as fixed effects in model emp

simvar

charackter element: name of the variable that contains the subject??s number in data

critical_value

integer: z/t value to test if a given fixed effect is significant

n_sim

integer: number of simulations to run

SESOI

Smallest effect of interst

R2

logical value: indicating if a R2 simulation should be run

R2var

character: name of second random effect we want to vary

R2level

integer: number of levels for R2var. Right now, the second

sampe_sizes

vector of integers: sample sizes you want to test power of


DejanDraschkow/mixedpower documentation built on Feb. 16, 2024, 7:58 a.m.