Question

In: Statistics and Probability

R studio programing . can someone do an example of when to perform a one-sample wilcox...

R studio programing . can someone do an example of when to perform a one-sample wilcox signed-rank test. after, show modification to the previous function to perform a hypothesis comparing 2 population center with independent samples (mann-whitney test).

Solutions

Expert Solution

  1. whether the median (mm) of the sample is equal to the theoretical value (m0m0)?
  2. whether the median (mm) of the sample is less than to the theoretical value (m0m0)?
  3. wh

    You can draw R base graphs as described at this link: R base graphs. Here, we’ll use the ggpubr R package for an easy ggplot2-based data visualization

  4. Install the latest version from GitHub as follow (recommended):
  5. # Install
    if(!require(devtools)) install.packages("devtools")
    devtools::install_github("kassambara/ggpubr")
    ether the median (mm) of the sample is greater than to the theoretical value(m0m0)
  6. wilcox.test(x, mu = 0, alternative = "two.sided")
  7. Import your data into R

  8. Prepare your data as specified here: Best practices for preparing your data set for R

  9. Save your data in an external .txt tab or .csv files

  10. Import your data into R as follow:

  11. # If .txt tab file, use this
    my_data <- read.delim(file.choose())
    # Or, if .csv file, use this
    my_data <- read.csv(file.choose())
  12. set.seed(1234)
    my_data <- data.frame(
      name = paste0(rep("M_", 10), 1:10),
      weight = round(rnorm(10, 20, 2), 1)
    )

    Check your data

    # Print the first 10 rows of the data
    head(my_data, 10)
       name weight
    1   M_1   17.6
    2   M_2   20.6
    3   M_3   22.2
    4   M_4   15.3
    5   M_5   20.9
    6   M_6   21.0
    7   M_7   18.9
    8   M_8   18.9
    9   M_9   18.9
    10 M_10   18.2.
  13.    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
      15.30   18.38   18.90   19.25   20.82   22.20 
  14. Min.: the minimum value
  15. 1st Qu.: The first quartile. 25% of values are lower than this.
  16. Median: the median value. Half the values are lower; half are higher.
  17. 3rd Qu.: the third quartile. 75% of values are higher than this.
  18. Max.: the maximum value
  19. Visualize your data using box plots

    library(ggpubr)
    ggboxplot(my_data$weight, 
              ylab = "Weight (g)", xlab = FALSE,
              ggtheme = theme_minimal

Related Solutions

pl use r studio to do that What is the most appropriate analysis to perform on...
pl use r studio to do that What is the most appropriate analysis to perform on the following data?   x<-c(8.1, 9.4, 9.9, 9.6, 10.7, 10.2, 10.4, 13.6, 15.5, 17.8) Y<-c(7.3, 8.6, 9.9, 9.6, 9.3, 9.2, 10.9, 10.7, 11.4, 16.1) Determine Spearman’s Rho coefficient (2dp) for the following data. x<-c(56,56,65,65,50,25,87,44,35) y<-c(87,91,85,91,75,28,122,66,58)
Perform the following tasks on R Studio/R Construct a function called conv3 which inputs a measurement...
Perform the following tasks on R Studio/R Construct a function called conv3 which inputs a measurement in centimeters and outputs the corresponding measurement in inches. However, if a negative value is entered as an input, no conversion of unit is done and an error message is printed instead.
Please use R and R studio A sample of 15 female collegiate golfers was selected and...
Please use R and R studio A sample of 15 female collegiate golfers was selected and the clubhead velocity (km/hr) while swinging a driver was determined for each one, resulting in the following data (“Hip Rotational Velocities During the Full Golf Swing,” J.of Sports Science and Medicine, 2009: 296–299): 69.0 69.7 72.7 80.3 81.0 85.0 86.0 86.3 86.7 87.7 89.3 90.7 91.0 92.5 93.0 The corresponding z percentiles are -1.83 -1.28 -0.97 -0.73 -0.52 -0.34 -0.17 0.0 0.17 0.34 0.52...
Perform the following tasks on R Studio Construct a function called conv1 which inputs a measurement...
Perform the following tasks on R Studio Construct a function called conv1 which inputs a measurement in centimeters and outputs the corresponding measurement in inches and construct another function called conv2 which inputs a measurement in centimeters and outputs the corresponding measurements in inches, feet, and meters
Using R Studio/R programming... Usually, we will use a random sample to estimate the statistics of...
Using R Studio/R programming... Usually, we will use a random sample to estimate the statistics of the underlying population. If we assume a given population is a standard normal distribution and we want to estimate its mean, which is the better technique to estimate that mean from a sample: Use the mean of one random sample of size 500 Use the mean of 300 random samples of size 10 Run your own experiment and use your results as a supporting...
Answer using R Studio Here we consider the amount of data needed to perform hypothesis testing....
Answer using R Studio Here we consider the amount of data needed to perform hypothesis testing. Suppose we are testing a coin using observations of tosses. We wish to test H0: p = 0.5 against an alternative of HA : p = 0.6 (in this question use one-sided tests only). How many tosses are needed to guarantee a size Æ∑ 0.05 and Ø∑ 0.2? Now generalize to consider HA : p = 0.5+delta. Choose sensible values for delta and quantify...
Using R Studio Now, set the seed to 348 with `set.seed()`. Then take a sample of...
Using R Studio Now, set the seed to 348 with `set.seed()`. Then take a sample of size 10,000 from a normal distribution with a mean of 82 and a standard deviation of 11. (a) Using sum() on a logical vector, how many draws are less than 60? Using mean() on a logical vector, what proportion of the total draws is that? How far is your answer from pnorm() in 1.1 above? ```{R} set.seed(348) x=rnorm(10000,82,11) sum(ifelse(x<60,1,0)) mean(ifelse(x<60,1,0)) pnorm(60,82,11) Using sum() function...
How do you plot continuous versus category in r studio
How do you plot continuous versus category in r studio
Can You please Answer the question using R studio and R cloud Telomeres are complexes of...
Can You please Answer the question using R studio and R cloud Telomeres are complexes of DNA and protein that cap chromosomal ends. They consist of the same short DNA sequence TTAGGG repeated over and over again. They tend to shorted with cell divisions and with advancing cellular age, which will lead to chromosome instability or apoptosis (programmed cell death). Eukaryotic cells have the ability to reverse telomere shortening by expressing telomerase, an enzyme that extends the telomeres of chromosomes....
Can someone explain how to manipulate the clock in verilog code? For example, I do not...
Can someone explain how to manipulate the clock in verilog code? For example, I do not understand how to go from 100MHz to 68027Hz.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT