I have a data file consisting of 57 variables. I want to transform about 12 of them into z-scores due to their uneven level of measurement. I looked up internet resources and help files. One internet resource adviced that I need the package Rbasic (does not exist). I used scale() which only seemed to center the variables. I tried V5-mean/st.dev. which got me very strange scores. Can somebody please give me practical adivce?
Share
scale()is the correct choice here:Notice how the attributes in the object returned from
scale()are the mean and SD of the input data.Now you don’t provide real code to show how you computed “V5-mean/st.dev” but if you did it exactly like that the operator precedence might have caught you out. This for example doesn’t return the correct z-scores: