search for: yav

Displaying 1 result from an estimated 1 matches for "yav".

Did you mean: av
2011 Jan 27
1
normalizing prizes to a specific year - how to?
...the prices to, eg. 2010 prices. The data frame looks like this > head(dafP) Y P 1 2004 11199.60 2 2005 15310.10 3 2005 19491.50 4 2005 18656.70 5 2005 16092.00 6 2005 9929.08 Y is Year and P is price (in Danish Kroner) per m2 I looked in some old scripts and have written this: dafP$Yav <- ave(dafP$P,dafP$Y,FUN=mean) # Yav. Prices Weight per Year, i.e. Yearly mean dafP$Pno <- dafP$P * (mean(dafP$P)/dafP$Yav) # Prize Normalized by Year Can any one comment on this: * This code only normalizes so all year get the same mean. How would I go about 'normali...