ok, that answers half of the questions.
The question of whether imputeEQ5DCostmean is a data.frame or something else would shed light on whether imputemeanCost$Costs24 should be expected to refer to anything meaningful, as given the previous line, it only would if imputeEQ5DCostmean was an object containing Costs24
Now you provide information about imputemeanCostDSA, a brand new name , how does this relate to what was previously discussed,m? you haven't said... therefore no conclusions can be reliably drawn.
sorry for the confusion however imputemeanCostDSA has the exact code and sequence as imputemeanCost , additionally, other codes with the same exact sequence and coding worked and some (the ones I shared ) didnt