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
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
Get Answers For Free
Most questions answered within 1 hours.