Question

Use R to calculate a new variable (called z.days) based on the existing variable "days". This...

Use R to calculate a new variable (called z.days) based on the existing variable "days". This variable should represent the z-scores for each observation of "days". You should therefore have a whole new column in your data set that has 500 different values. When calculating the z-scores in R, be sure to use the z-score formula from Lesson L02, a mean value of 685.25, and a standard deviation of 419.95.

Complete the blanks below with the missing syntax you would use to complete this task in R.

$  = ( $ - 685.25 ) / 419.95

Homework Answers

Answer #1

suppose I have data set which store in 'D' name and also We have new variable / new column with name new. Which ever column we have to extract use that column name to extract.

check column name with r command

ColNames( D)

first we have to extract the new column from our data set..and command is

D$new

or

D$"new"

now we have extracted column new ..

We know that,

Formula for

Z score = ( x - mu ) / sigma

here,

mu = mean

sigma = standard deviation

#Code for R and R studio

Mu= 685.25

sigma= 419.95

Zscore= ( D$new - mu ) / sigma

Zscore

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
in R language, how would you use mutate() to make a new column in the dataset...
in R language, how would you use mutate() to make a new column in the dataset called moisture100 which contains the moisture score times 100 I wrote coffee_ratings %>% mutate(moisture100=moisture*100) but I get an error?
PLEASE FILL IN THE BLANKS WITH THE PROPER TERM! THANKS Key Terms ---------------------------------------------------------------------------------------------------------------------------- Positive relationship ---...
PLEASE FILL IN THE BLANKS WITH THE PROPER TERM! THANKS Key Terms ---------------------------------------------------------------------------------------------------------------------------- Positive relationship --- Occurs in so far as pairs of observations tend to occupy similar relative positions in their respective distribution. Negative relationship --- Occurs in so far as pairs of observations tend to occupy dissimilar relative positions in their respective distribution. Scatterplot --- a graph containing a cluster of dots that represents all pairs of observations. Person correlation coefficient --- A number between –1 and +1...
Data For Tasks 1-8, consider the following data: 7.2, 1.2, 1.8, 2.8, 18, -1.9, -0.1, -1.5,...
Data For Tasks 1-8, consider the following data: 7.2, 1.2, 1.8, 2.8, 18, -1.9, -0.1, -1.5, 13.0, 3.2, -1.1, 7.0, 0.5, 3.9, 2.1, 4.1, 6.5 In Tasks 1-8 you are asked to conduct some computations regarding this data. The computation should be carried out manually. All the steps that go into the computation should be presented and explained. (You may use R in order to verify your computation, but not as a substitute for conducting the manual computations.) A Random...
BIOS 376 Homework 7 1. A professor claims that the mean IQ for college students is...
BIOS 376 Homework 7 1. A professor claims that the mean IQ for college students is 92. He collects a random sample of 85 college students to test this claim and the mean IQ from the sample is 84. (a) What are the null and alternative hypotheses to test the initial claim? (1 pt) (b) Using R, compute the test statistic. Assume the population standard deviation of IQ scores for college students is 17.6 points. (1 pt) (c) Using R,...
A debate rages whether or not bottled water is worth the cost. The National Resource Defense...
A debate rages whether or not bottled water is worth the cost. The National Resource Defense Council concludes, “there is no assurance that bottled water it is any cleaner or safer than tap (water).” But, in addition to the safety issue, many people prefer the taste of bottled water to tap water, or so they say! Let’s suppose that the city council members of Corvallis are trying to show that the city of Corvallis tap water tastes just as good...
0. Introduction. In this laboratory assignment, you will write a Python class called Zillion. The class...
0. Introduction. In this laboratory assignment, you will write a Python class called Zillion. The class Zillion implements a decimal counter that allows numbers with an effectively infinite number of digits. Of course the number of digits isn’t really infinite, since it is bounded by the amount of memory in your computer, but it can be very large. 1. Examples. Here are some examples of how your class Zillion must work. I’ll first create an instance of Zillion. The string...
**please write code with function definition taking in input and use given variable names** for e.g....
**please write code with function definition taking in input and use given variable names** for e.g. List matchNames(List inputNames, List secRecords) Java or Python Please Note:    * The function is expected to return a STRING_ARRAY.      * The function accepts following parameters:      *  1. STRING_ARRAY inputNames      *  2. STRING_ARRAY secRecords      */ Problem Statement Introduction Imagine you are helping the Security Exchange Commission (SEC) respond to anonymous tips. One of the biggest problems the team faces is handling the transcription of the companies reported...
I'm working in a 6 page research paper and below is the complete list of the...
I'm working in a 6 page research paper and below is the complete list of the paper has to be set up and the required things needed to be included. Can you check to see what is already included on the list and what is missing in my paper. Also, what I need to improve and how? My topic is "The Struggles of Epilepsy". Can you help me with the content (background, empirical research, and hypothesis )? I also need...
You will write a program that loops until the user selects 0 to exit. In the...
You will write a program that loops until the user selects 0 to exit. In the loop the user interactively selects a menu choice to compress or decompress a file. There are three menu options: Option 0: allows the user to exit the program. Option 1: allows the user to compress the specified input file and store the result in an output file. Option 2: allows the user to decompress the specified input file and store the result in an...
I NEED TASK 3 ONLY TASK 1 country.py class Country:     def __init__(self, name, pop, area, continent):...
I NEED TASK 3 ONLY TASK 1 country.py class Country:     def __init__(self, name, pop, area, continent):         self.name = name         self.pop = pop         self.area = area         self.continent = continent     def getName(self):         return self.name     def getPopulation(self):         return self.pop     def getArea(self):         return self.area     def getContinent(self):         return self.continent     def setPopulation(self, pop):         self.pop = pop     def setArea(self, area):         self.area = area     def setContinent(self, continent):         self.continent = continent     def __repr__(self):         return (f'{self.name} (pop:{self.pop}, size: {self.area}) in {self.continent} ') TASK 2 Python Program: File: catalogue.py from Country...