I am trying to do factor analysis on a few variables and one particular variable (given in the example below) is covering/ explaining all the variance due to some outliers. I am not sure what else I can do apart from removing this variable from factor analysis. But doing so will lose a lot of information. Hence, I am trying to fix this variable by fixing outliers and then normalizing it.
Initially, the histogram of this vector looks like this -
vec <- c(-10172.83, -8745.45, -8745.45, -7344.71, -4700.3, -3588, -1293.15,
-1006.84, -995.62, -791.5, -634.49, -607.19, -591.17, -402.27,
-397.21, -355.54, -301.01, -295.31, -272.22, -233.65, -168.68,
-148.08, -132.47, -129.05, -115.94, -89.63, -89.63, -85.59, -83.79,
-83.61, -83.61, -83.59, -81.05, -79.73, -76.99, -72.72, -71.02,
-71.02, -70.2, -69.4, -67.56, -64.92, -62.8, -62.61, -60.09,
-58.97, -58.97, -58.48, -55.39, -50.54, -50.54, -43.43, -43.39,
-43.3, -42.85, -42.35, -40.46, -38.9, -37.9, -36.01, -35.41,
-35.22, -34.92, -34.61, -34.23, -32.33, -30.96, -30.35, -30.16,
-29.89, -29.8, -29.16, -28.81, -28.17, -27.56, -27.47, -26.49,
-26.05, -24.4, -23.9, -22.87, -21.92, -20.07, -19.92, -19.62,
-19.31, -18.8, -18.8, -18.38, -17.17, -17.17, -17.06, -16.74,
-16.25, -16.2, -15.84, -15.75, -15.24, -14.78, -14.71, -14.48,
-14.06, -13.88, -13.88, -13.4, -12.93, -12.89, -12.19, -11.98,
-11.83, -11.75, -11.25, -11.23, -11.14, -10.87, -10.72, -10.68,
-10.59, -10.59, -10.58, -10.56, -10.17, -10.15, -9.49, -9.45,
-9.2, -9.13, -8.97, -8.73, -8.66, -8.49, -8.21, -8.1, -8.1, -8.02,
-7.97, -7.95, -7.95, -7.93, -7.83, -7.61, -7.27, -7.23, -6.94,
-6.85, -6.84, -6.7, -6.38, -6.32, -6.21, -6.2, -6.02, -6.01,
-5.98, -5.91, -5.87, -5.87, -5.86, -5.86, -5.86, -5.85, -5.82,
-5.74, -5.66, -5.61, -5.56, -5.56, -5.51, -5.42, -5.31, -5.26,
-5.26, -5.18, -5.17, -4.98, -4.98, -4.74, -4.71, -4.71, -4.7,
-4.7, -4.68, -4.57, -4.56, -4.51, -4.5, -4.5, -4.48, -4.48, -4.46,
-4.36, -4.35, -4.2, -4.16, -4.08, -4.08, -4.07, -4.07, -4.05,
-4.05, -4.01, -3.96, -3.85, -3.85, -3.79, -3.64, -3.51, -3.49,
-3.48, -3.4, -3.39, -3.39, -3.38, -3.37, -3.34, -3.33, -3.33,
-3.32, -3.26, -3.26, -3.25, -3.24, -3.24, -3.21, -3.21, -3.19,
-3.19, -3.19, -3.18, -3.17, -3.16, -3.16, -3.14, -3.13, -3.09,
-3.09, -3.03, -3.01, -2.96, -2.96, -2.91, -2.89, -2.89, -2.88,
-2.84, -2.68, -2.62, -2.62, -2.6, -2.6, -2.6, -2.6, -2.57, -2.55,
-2.54, -2.46, -2.45, -2.42, -2.42, -2.4, -2.38, -2.37, -2.35,
-2.34, -2.28, -2.28, -2.28, -2.28, -2.26, -2.22, -2.22, -2.21,
-2.2, -2.2, -2.2, -2.2, -2.19, -2.16, -2.15, -2.1, -2.08, -2.03,
-1.98, -1.93, -1.92, -1.91, -1.91, -1.9, -1.89, -1.89, -1.89,
-1.88, -1.88, -1.88, -1.87, -1.87, -1.86, -1.86, -1.85, -1.84,
-1.83, -1.83, -1.82, -1.8, -1.79, -1.78, -1.76, -1.76, -1.74,
-1.74, -1.73, -1.73, -1.72, -1.69, -1.63, -1.62, -1.62, -1.6,
-1.6, -1.59, -1.59, -1.57, -1.56, -1.56, -1.55, -1.55, -1.54,
-1.54, -1.53, -1.51, -1.48, -1.48, -1.47, -1.47, -1.46, -1.44,
-1.44, -1.44, -1.43, -1.42, -1.4, -1.39, -1.39, -1.37, -1.34,
-1.34, -1.34, -1.32, -1.31, -1.3, -1.3, -1.28, -1.26, -1.26,
-1.24, -1.22, -1.22, -1.21, -1.19, -1.19, -1.18, -1.15, -1.13,
-1.12, -1.12, -1.11, -1.11, -1.1, -1.1, -1.09, -1.09, -1.09,
-1.09, -1.09, -1.08, -1.08, -1.08, -1.07, -1.07, -1.06, -1.05,
-1.04, -1.03, -1.03, -1.03, -1.02, -1.02, -1.01, -1.01, -1, -1,
-0.99, -0.99, -0.99, -0.99, -0.99, -0.99, -0.98, -0.98, -0.97,
-0.97, -0.96, -0.96, -0.96, -0.95, -0.95, -0.94, -0.94, -0.94,
-0.93, -0.93, -0.92, -0.92, -0.92, -0.91, -0.91, -0.91, -0.9,
-0.9, -0.9, -0.9, -0.89, -0.88, -0.88, -0.87, -0.86, -0.85, -0.85,
-0.85, -0.84, -0.84, -0.84, -0.83, -0.82, -0.81, -0.81, -0.81,
-0.81, -0.81, -0.81, -0.8, -0.79, -0.79, -0.79, -0.79, -0.78,
-0.78, -0.77, -0.76, -0.76, -0.76, -0.76, -0.75, -0.75, -0.74,
-0.73, -0.72, -0.71, -0.71, -0.71, -0.71, -0.7, -0.7, -0.7, -0.7,
-0.69, -0.69, -0.68, -0.68, -0.68, -0.67, -0.67, -0.67, -0.66,
-0.66, -0.66, -0.66, -0.65, -0.65, -0.65, -0.65, -0.65, -0.64,
-0.64, -0.64, -0.63, -0.63, -0.63, -0.63, -0.63, -0.63, -0.62,
-0.62, -0.61, -0.61, -0.61, -0.61, -0.6, -0.6, -0.6, -0.6, -0.6,
-0.6, -0.6, -0.58, -0.58, -0.58, -0.58, -0.58, -0.57, -0.57,
-0.57, -0.57, -0.57, -0.57, -0.56, -0.56, -0.56, -0.56, -0.56,
-0.55, -0.55, -0.55, -0.55, -0.55, -0.55, -0.55, -0.55, -0.55,
-0.54, -0.54, -0.53, -0.53, -0.53, -0.53, -0.53, -0.53, -0.52,
-0.52, -0.52, -0.52, -0.52, -0.51, -0.51, -0.51, -0.51, -0.51,
-0.51, -0.51, -0.5, -0.5, -0.5, -0.5, -0.5, -0.49, -0.49, -0.49,
-0.49, -0.49, -0.49, -0.48, -0.48, -0.48, -0.48, -0.48, -0.48,
-0.48, -0.48, -0.48, -0.47, -0.47, -0.47, -0.47, -0.47, -0.47,
-0.46, -0.46, -0.46, -0.46, -0.45, -0.45, -0.45, -0.45, -0.45,
-0.45, -0.45, -0.44, -0.44, -0.44, -0.44, -0.44, -0.44, -0.44,
-0.44, -0.44, -0.43, -0.43, -0.43, -0.43, -0.43, -0.43, -0.43,
-0.43, -0.42, -0.42, -0.42, -0.42, -0.42, -0.42, -0.42, -0.42,
-0.41, -0.41, -0.41, -0.41, -0.41, -0.41, -0.41, -0.41, -0.41,
-0.4, -0.4, -0.4, -0.4, -0.4, -0.4, -0.4, -0.4, -0.39, -0.39,
-0.39, -0.39, -0.39, -0.39, -0.39, -0.39, -0.38, -0.38, -0.38,
-0.38, -0.38, -0.38, -0.38, -0.38, -0.37, -0.37, -0.37, -0.37,
-0.37, -0.37, -0.37, -0.37, -0.36, -0.36, -0.36, -0.36, -0.36,
-0.36, -0.36, -0.36, -0.35, -0.35, -0.35, -0.35, -0.35, -0.35,
-0.35, -0.35, -0.34, -0.34, -0.34, -0.34, -0.34, -0.34, -0.34,
-0.34, -0.33, -0.33, -0.33, -0.33, -0.33, -0.33, -0.33, -0.33,
-0.33, -0.33, -0.32, -0.32, -0.32, -0.32, -0.32, -0.32, -0.32,
-0.32, -0.32, -0.32, -0.31, -0.31, -0.31, -0.31, -0.31, -0.31,
-0.31, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3,
-0.3, -0.3, -0.3, -0.3, -0.3, -0.29, -0.29, -0.29, -0.29, -0.29,
-0.29, -0.29, -0.29, -0.29, -0.29, -0.29, -0.29, -0.29, -0.29,
-0.29, -0.29, -0.29, -0.28, -0.28, -0.28, -0.28, -0.28, -0.28,
-0.28, -0.28, -0.28, -0.28, -0.28, -0.28, -0.27, -0.27, -0.27,
-0.27, -0.27, -0.26, -0.26, -0.26, -0.26, -0.26, -0.26, -0.26,
-0.26, -0.26, -0.26, -0.26, -0.26, -0.25, -0.25, -0.25, -0.25,
-0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.24,
-0.24, -0.24, -0.24, -0.24, -0.24, -0.24, -0.24, -0.24, -0.24,
-0.24, -0.24, -0.24, -0.24, -0.24, -0.24, -0.24, -0.24, -0.24,
-0.23, -0.23, -0.23, -0.23, -0.23, -0.23, -0.23, -0.23, -0.23,
-0.23, -0.22, -0.22, -0.22, -0.22, -0.22, -0.22, -0.22, -0.21,
-0.21, -0.21, -0.21, -0.21, -0.21, -0.21, -0.21, -0.21, -0.21,
-0.21, -0.2, -0.2, -0.2, -0.2, -0.2, -0.2, -0.2, -0.2, -0.2,
-0.2, -0.2, -0.2, -0.2, -0.2, -0.2, -0.19, -0.19, -0.19, -0.19,
-0.19, -0.19, -0.19, -0.19, -0.19, -0.19, -0.19, -0.19, -0.19,
-0.19, -0.19, -0.19, -0.18, -0.18, -0.18, -0.18, -0.18, -0.18,
-0.18, -0.18, -0.18, -0.18, -0.18, -0.18, -0.18, -0.18, -0.18,
-0.18, -0.18, -0.18, -0.18, -0.18, -0.18, -0.17, -0.17, -0.17,
-0.17, -0.17, -0.17, -0.17, -0.17, -0.17, -0.17, -0.17, -0.17,
-0.17, -0.17, -0.17, -0.17, -0.16, -0.16, -0.16, -0.16, -0.16,
-0.16, -0.16, -0.16, -0.16, -0.16, -0.16, -0.16, -0.15, -0.15,
-0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15,
-0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15,
-0.15, -0.15, -0.15, -0.14, -0.14, -0.14, -0.14, -0.14, -0.14,
-0.14, -0.14, -0.14, -0.14, -0.14, -0.14, -0.14, -0.14, -0.14,
-0.14, -0.14, -0.14, -0.14, -0.14, -0.13, -0.13, -0.13, -0.13,
-0.13, -0.13, -0.13, -0.13, -0.13, -0.13, -0.13, -0.13, -0.13,
-0.13, -0.13, -0.12, -0.12, -0.12, -0.12, -0.12, -0.12, -0.12,
-0.12, -0.12, -0.12, -0.12, -0.12, -0.12, -0.12, -0.12, -0.12,
-0.12, -0.12, -0.12, -0.12, -0.11, -0.11, -0.11, -0.11, -0.11,
-0.11, -0.11, -0.11, -0.11, -0.11, -0.11, -0.11, -0.11, -0.11,
-0.11, -0.11, -0.11, -0.11, -0.11, -0.11, -0.11, -0.11, -0.11,
-0.11, -0.1, -0.1, -0.1, -0.1, -0.1, -0.1, -0.1, -0.1, -0.1,
-0.1, -0.1, -0.1, -0.1, -0.1, -0.1, -0.1, -0.1, -0.1, -0.1, -0.1,
-0.1, -0.1, -0.1, -0.09, -0.09, -0.09, -0.09, -0.09, -0.09, -0.09,
-0.09, -0.09, -0.09, -0.09, -0.09, -0.09, -0.09, -0.09, -0.09,
-0.09, -0.09, -0.09, -0.09, -0.09, -0.09, -0.09, -0.08, -0.08,
-0.08, -0.08, -0.08, -0.08, -0.08, -0.08, -0.08, -0.08, -0.08,
-0.08, -0.08, -0.08, -0.08, -0.08, -0.08, -0.08, -0.08, -0.08,
-0.08, -0.08, -0.08, -0.08, -0.08, -0.08, -0.08, -0.08, -0.07,
-0.07, -0.07, -0.07, -0.07, -0.07, -0.07, -0.07, -0.07, -0.07,
-0.07, -0.07, -0.07, -0.07, -0.07, -0.07, -0.07, -0.07, -0.07,
-0.07, -0.07, -0.07, -0.07, -0.07, -0.07, -0.06, -0.06, -0.06,
-0.06, -0.06, -0.06, -0.06, -0.06, -0.06, -0.06, -0.06, -0.06,
-0.06, -0.06, -0.06, -0.06, -0.06, -0.06, -0.06, -0.06, -0.06,
-0.06, -0.06, -0.06, -0.06, -0.06, -0.06, -0.06, -0.06, -0.06,
-0.06, -0.06, -0.06, -0.06, -0.06, -0.05, -0.05, -0.05, -0.05,
-0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05,
-0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05,
-0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05,
-0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.04, -0.04, -0.04,
-0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04,
-0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.04, -0.03,
-0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03,
-0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03,
-0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03,
-0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03,
-0.03, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02,
-0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02,
-0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02,
-0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02,
-0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.02, -0.01,
-0.01, -0.01, -0.01, -0.01, -0.01, -0.01, -0.01, -0.01, -0.01,
-0.01, -0.01, -0.01, -0.01, -0.01, -0.01, -0.01, -0.01, -0.01,
-0.01, -0.01, -0.01, -0.01, -0.01, -0.01, -0.01, -0.01, -0.01,
0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01,
0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01,
0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01,
0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01,
0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.02, 0.02, 0.02, 0.02, 0.02,
0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02,
0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02,
0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02,
0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02,
0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02,
0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02,
0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02,
0.02, 0.02, 0.02, 0.02, 0.02, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03,
0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03,
0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03,
0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03,
0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03,
0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03,
0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03,
0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03,
0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03,
0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03,
0.03, 0.03, 0.03, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04,
0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04,
0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04,
0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04,
0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04,
0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04,
0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04,
0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04,
0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04,
0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04,
0.04, 0.04, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,
0.05, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06,
0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06,
0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06,
0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06,
0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06,
0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06,
0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06,
0.06, 0.06, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.08,
0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08,
0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08,
0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08,
0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08,
0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08,
0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08,
0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08,
0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.09, 0.09, 0.09, 0.09,
0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09,
0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09,
0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09,
0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09,
0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09,
0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09,
0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09,
0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.09, 0.1,
0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11,
0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11,
0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11,
0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11,
0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11,
0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11,
0.11, 0.11, 0.11, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12,
0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12,
0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12,
0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12,
0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.13, 0.13, 0.13, 0.13,
0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13,
0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13,
0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13,
0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13,
0.13, 0.13, 0.13, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14,
0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14,
0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14,
0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.15, 0.15, 0.15, 0.15, 0.15,
0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15,
0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15,
0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15,
0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15,
0.15, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16,
0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16,
0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, 0.16,
0.16, 0.16, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17,
0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17,
0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.18, 0.18, 0.18, 0.18, 0.18,
0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18,
0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, 0.18,
0.18, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19,
0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19,
0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19, 0.19,
0.19, 0.19, 0.19, 0.19, 0.19, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2,
0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2,
0.2, 0.2, 0.2, 0.2, 0.2, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21,
0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21,
0.21, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22,
0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22,
0.22, 0.22, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23,
0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.23,
0.23, 0.23, 0.23, 0.23, 0.23, 0.23, 0.24, 0.24, 0.24, 0.24, 0.24,
0.24, 0.24, 0.24, 0.24, 0.24, 0.24, 0.24, 0.24, 0.24, 0.24, 0.24,
0.24, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.26,
0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.26,
0.26, 0.26, 0.27, 0.27, 0.27, 0.27, 0.27, 0.27, 0.27, 0.27, 0.28,
0.28, 0.28, 0.28, 0.28, 0.28, 0.28, 0.29, 0.29, 0.29, 0.29, 0.29,
0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.29, 0.3, 0.3, 0.3, 0.3,
0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.31, 0.31,
0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.32, 0.32,
0.32, 0.32, 0.32, 0.32, 0.32, 0.33, 0.33, 0.33, 0.33, 0.33, 0.33,
0.33, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35, 0.35,
0.35, 0.35, 0.35, 0.35, 0.35, 0.35, 0.36, 0.36, 0.36, 0.36, 0.36,
0.36, 0.36, 0.36, 0.37, 0.37, 0.37, 0.37, 0.37, 0.37, 0.38, 0.38,
0.39, 0.39, 0.39, 0.39, 0.39, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.41,
0.41, 0.41, 0.41, 0.41, 0.41, 0.41, 0.41, 0.42, 0.42, 0.42, 0.42,
0.42, 0.42, 0.42, 0.42, 0.43, 0.43, 0.43, 0.43, 0.44, 0.44, 0.44,
0.44, 0.45, 0.45, 0.45, 0.45, 0.46, 0.46, 0.46, 0.47, 0.47, 0.47,
0.48, 0.48, 0.48, 0.48, 0.48, 0.49, 0.49, 0.49, 0.5, 0.51, 0.51,
0.51, 0.52, 0.52, 0.53, 0.53, 0.54, 0.55, 0.57, 0.57, 0.57, 0.58,
0.58, 0.58, 0.6, 0.6, 0.61, 0.62, 0.64, 0.65, 0.65, 0.67, 0.67,
0.67, 0.74, 0.76, 0.77, 0.83, 0.83, 0.83, 0.84, 0.89, 0.89, 0.89,
0.94, 0.95, 0.96, 0.96, 1, 1.07, 1.07, 1.12, 1.12, 1.26, 1.26,
1.26, 1.27, 1.43, 1.55, 1.59, 1.59, 2.01, 2.05, 2.4, 2.45, 2.52,
3.12, 4.38, 10.97, 10.97, 11.84, 14.57, 19.12, 52.07, 145.74,
145.74)
To remove outliers, I used the update_outliers
function (given below) which removes the negative and positive outliers using quantiles. However, the problem with this method is that it overdoes outlier fixing as can be seen in the image below (see the red circles).
update_outliers <- function(x, na.rm = TRUE, ...) {
qnt <- quantile(x, probs=c(.05, .95), na.rm = na.rm, ...)
H <- 1.5 * IQR(x, na.rm = na.rm)
y <- x
y[x < (qnt[1] )] <- qnt[1]
y[x > (qnt[2] )] <- qnt[2]
y
}
new_vec = update_outliers(vec)
hist(new_vec)
Question - How can I fix the outliers so that outlier fixing is not overdone as above and the data gets normalized? I want a bell-shaped histogram (as shown by the blue line in the image below) without any spikes on both ends.
Most importantly, during normalization, the negative values should not turn positive and vice versa.
My approach might be totally wrong as I am trying to fit data to a model instead of the fitting model to the data. I am open to any ideas to solve this problem in a better way.
vec
represents and how you conceive of its role in your analysis. (it's a question of "feature engineering.") But do you really have to supply 4006 values to explain your problem?? Let's have a minimal reproducible example, please. $\endgroup$library(rcompanion); vec2 = blom(vec); hist(vec2)
$\endgroup$