I am very new to R so I apologize in advance if this is a trivial questions. I have a large set of data consisting of mortgage loan information icluding date of origination. I need to calculate a moving weighted (by loan amount) average of FICO scores over 3 month windows. The problem that I'm running into, is that I don't know how to account for the fact that there are multiple loans originated in the same month/year, and I know that an average of 3 months of averages is inaccurate.
SO how might I go about doing this if I have the following fields:
funded$loan_amount
funded$fico_score
funded$date