Question: Problem 1. (Permutation KS test) The two-sample KS test is already a permutation test since it is based on the ranks. Read the R manual

Problem 1. (Permutation KS test) The two-sample KS test is already a permutation test since it is based on the ranks. Read the R manual for ks.test to learn how the p-value is computed (or approximated) by default: it's either using an exact recursive formula (for smaller samples and when there are no ties) or asymptotic theory. Write a function perm.ks.test(x, y, alternative = c("two.sided" , " less" , " greater" ). 32999) that estimates the (permutation) p-value by Monte Carlo simulation based on B repeats. Apply your function to the cloudseeding dataset
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
