Question: I need help with R-studio, please add computation formula for me to better understand Create three vectors (x, y and z) from randomly generated numbers
I need help with R-studio, please add computation formula for me to better understand
- Create three vectors (x, y and z) from randomly generated numbers from a uniform distribution. (Hint - see "runif" in the cookbook.)
- Run correlations between x and y, x and z, and y and z
- Create a data frame from the three vectors. Cut and paste the output here
- Find the means of the three columns of the data frame (hint: use "apply" command
- Using the data frame you created, rerun the correlation between x and y. (Hint, you can select individual columns from a data frame. One way is to list the data frame and then select the specific column. For example, "df$x" refers to the x column in data frame "df". The "x" column from the data frame is specified by the dollar sign ($))
- Download and install two R packages - "ppcor" and "psych". (Hint - use "install.packages(" package name ") - keep the quotes - to download a package. Use library(package name) - no quotes - to make the R package available to your current R session.
a) Create a vector of data. Run the function from the "psych" package called
"describe" on your vector (hint - if the psych package installed correctly, the command describe (vector) should produce an output that includes 13 different descriptive statistics.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
