Question

In: Math

Part 2– R work (must be done in R) Copy and paste your R code and...

Part 2– R work (must be done in R)

Copy and paste your R code and output into a word document, along with your written answers to the questions, and upload to Canvas.  

Follow these instructions to import the necessary dataset:

Before opening the dataset needed for this problem, you’ll need to call the “car”package.  Run the following line of code:

> library(car)

Now you can import the “Prestige” dataset and use it to answer the question below. Name the data frame with your UT EID:

                        

> my_eid <- Prestige

Remember to include any code you use along with your answers in your submission!

ThePrestigedataset contains information about different occupations in Canada in 1971.  We want to see if the average years of education of the workforce (“education”) can predict an occupation’s annual income (“income”).

Make a scatterplot for this analysis.  Why is a linear regression not appropriate? (1pt)

Create a new variable in the dataset called “log_income” that is the natural log of each income value. (1pt)

Conduct a full analysis to see if education can predict log-income.  Include all steps for full credit.  Comment on any assumptions that might not be met, but carry out the full test.   (4pt)

Solutions

Expert Solution


Related Solutions

R studio questions Write up your answers and paste the R code Copy and paste all...
R studio questions Write up your answers and paste the R code Copy and paste all plots generated. First create a sample drawn from a normal random variable. R has many distributions for which you can get probabilities and draw random numbers. We are going to use the normal. Go to help in R and type in rnorm. You will see a write up for functions associated with the normal distribution. dnorm is the density; pnorm is the probability distribution...
Use R to answer the following question. Copy and paste the code and answer from R...
Use R to answer the following question. Copy and paste the code and answer from R into your paper. On the average,five cars arrive at a particular car wash every hour. Let X count the number of cars that arrive from 10 AM to 11 AM. Then X ∼pois(lambda = 5). Also, μ = σ2 = 5.  What is the probability that no car arrives during this period?  Suppose the car wash above is in operation from 8AM...
Do the following using R. You must also turn in a copy of your R code....
Do the following using R. You must also turn in a copy of your R code. (10) What is the probability a beta (1, 8) random variable is less than 0.13? (11) What is the probability a beta (3, 9) random variable is greater than .4? (12) What is the probability a beta (18,4.4) random variable is between 0.6 and 0.7? (13) At what value of x is the probability that a beta (4, 7) random varable is less than...
Directly copy the source code and paste into the Word file. Screenshot of running result must...
Directly copy the source code and paste into the Word file. Screenshot of running result must be presented. 1. (20 points) Write the “Hello, world!” program. 2. (30 points) Write a program to calculate the sum from -5 to10. Use the for loop to do the calculation. 3. (20 points) Write a complete C++ program that asks the user to enter the necessary information about the cylinder, calculate the volume in a function (named as calculate_vol, using reference to pass...
Using R Studio Use the two iid samples. (You can copy and paste the code into...
Using R Studio Use the two iid samples. (You can copy and paste the code into R). They both come from the same normal distribution. X = c(-0.06, 1.930, 0.608 -0.133,0.657, -1.284, 0.166, 0.963, 0.719, -0.896) Y = c(0.396, 0.687, 0.809, 0.939, -0.381, -0.042, -1.529, -0.543, 0.758, -2.574, -0.160, -0.713, 0.311, -0.515, -2.332, -0.844, -0.942, 0.053, 0.066, 0.942, -0.861, -0.186, -0.947, -0.110, 0.634, 2.357, 0.201, -0.428, -1.661, 0.395) (a) Report 95% confidence interval for the mean of X. Should we...
R work (must be done in R) Before opening the dataset needed for this problem, you’ll...
R work (must be done in R) Before opening the dataset needed for this problem, you’ll need to call the “car” package. Run the following line of code: > library(car)  Now you can import the “ Cowles” dataset and use it to answer the question below. Name the data frame with your EID: > my_eid <- Cowles Remember to include any code you use along with your answers in your submission! 3. Cowles and Davis (1987) collected data on...
***This problem must be done using R so please provide the R code used to find...
***This problem must be done using R so please provide the R code used to find the solution. I have provided the data in data-wtLoss.txt below the question. I will also give "thumbs-up for correct R code" Thanks in advance.*** The file “data-wtLoss.txt” contains data on weight loss and self esteem evaluation at three time points over a period of three months for 34 individuals who are randomly selected from a residential area. These individuals are randomly assigned to one...
***This problem must be done using R so please provide the R code used to find...
***This problem must be done using R so please provide the R code used to find the solution. I have provided the data in data-wtLoss.txt below the question. I will also give "thumbs-up for correct R code" Thanks in advance.*** The file “data-wtLoss.txt” contains data on weight loss and self esteem evaluation at three time points over a period of three months for 34 individuals who are randomly selected from a residential area. These individuals are randomly assigned to one...
Run the following R code (copy and paste) to create some data: out1 <- rep( c(0,0,1),...
Run the following R code (copy and paste) to create some data: out1 <- rep( c(0,0,1), 3 ) out2 <- rep( c(1,0,1), 3 ) counts <- c(18,17,15,20,10,20,25,13,12) This is a variation on the data in the first example on the “glm” help page in R. The counts variable is our response variable and will be modeled as a Poisson variable, the out1 predictor variable will measure the difference between outcomes 2 (baseline) and 3, and out2 will measure the difference...
Copy and paste the below code EXACTLY as shown into your Java environment/editor. Your task is...
Copy and paste the below code EXACTLY as shown into your Java environment/editor. Your task is to fill in the code marked as "...your code here...". A detailed explanation follows the code. import java.util.*; public class OddManOut {    public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("How many random Integers to produce?"); int num = sc.nextInt();    ArrayList<Integer> randomInts = createRandomList(num); System.out.println("The random list is: "); System.out.println(randomInts);    removeOdds( randomInts ); System.out.println("The random list with only...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT