Skip to content
Snippets Groups Projects
Commit c14729dc authored by Boulakis Paradeisios Alexandros's avatar Boulakis Paradeisios Alexandros
Browse files

ex03

parent e3e099ca
No related branches found
No related tags found
No related merge requests found
set.seed(2024)
# Specify simulation parameters
# n_sim
# cohen_d
# random noise
# alpha_level
# beta_level
# sample_size_list
# Main loop
# create a storage vector for achieved power per sample size
# for every sample size
# create a storage vector for pvals
# create a storage vector for statistic
# for every simulation
# simulate random normally distributed samples for group 1 and add noise
# simulate random normally distributed samples for group 2, add your effect and noise
# do an independent t-test
# store statistic and pvals
# count how many results where significant
# plot power curve
# print when your results was above your threshold
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment