我在SPSS上有两列,一列是Weight
,另一列是Unit
。 Weight
以磅或千克为单位,Unit
的重量单位为1或2。如何将所有值转换为一个单位,例如公斤,以便进行分析?非常感谢!
答案 0 :(得分:0)
假设您的单位为1 =磅,2 =公斤,
if units=2 kilos=weight.
if units=1 kilos=weight/2.20462 .
或者,当然
if units=2 lbs=weight*2.20462.
if units=1 lbs=weight .
这是一种单行执行此操作的方法:
compute kilos=weight/(1+(2-unit)*1.20462).