How to estimate change effects through time using R?

#1
Hi I am using project R and I have two sets of datas:

1. House prices, house info (eg. sqft, rooms, lot sizes, etc), area codes, and school ratings (based on a research institute) in 2006
2. Same thing but just 2007

And I want to measure how the change in school ratings from 2006 to 2007 change house prices. Bascally the question I'm interested in is how parents react to the change in school ratings by looking at house prices.

I created a dummy time variable on each data and rbind them into one data set, called "dat", and use plm to make them a panel data with index = "year":

library(plm)
data <- plm.data(dat, index = "year")
But from here on, I don't know what regression I should use.
I tried plm(Sold.Price ~ score, data=data,effect="twoways", index = "year")
But an error appears:
Error in La.svd(x, nu, nv) : error code 1 from Lapack routine 'dgesdd'

I am guessing it's because the panel data is unbalanced due to the houses sold in 2006 are different from 2007?

Hope someone here can inspire me. I am no good at statistics but I have to do this for an economics course. Some suggestions and directions would be very helpful.

Thanks.
 
Last edited by a moderator: