meanz.Rd
z-score variables column-wise and then obtain the mean row-wise
meanz(data)
data | data of variables |
---|
#> [1] -0.1137967 -0.1518854 -1.2724343 1.7022898 1.5851833 -1.0795056#> #> Call: #> lm(formula = salary ~ meanz(df[, c("yrs.since.phd", "yrs.service")]), #> data = df) #> #> Residuals: #> Min 1Q Median 3Q Max #> -84565 -19890 -2786 15533 101189 #> #> Coefficients: #> Estimate Std. Error t value #> (Intercept) 113706 1404 80.973 #> meanz(df[, c("yrs.since.phd", "yrs.service")]) 11959 1439 8.311 #> Pr(>|t|) #> (Intercept) < 2e-16 *** #> meanz(df[, c("yrs.since.phd", "yrs.service")]) 1.54e-15 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Residual standard error: 27980 on 395 degrees of freedom #> Multiple R-squared: 0.1488, Adjusted R-squared: 0.1467 #> F-statistic: 69.07 on 1 and 395 DF, p-value: 1.541e-15 #>