Disclaimer: Undergrad student learning how to use SAS
So I'm doing proc panel using data that looks like this
Year | State | Vehicle Miles Traveled per driver | Population Density | Centerline Miles Density | Lane Miles Density |
2002 | Alabama | 16074.68559 | 88.58738276 | 1.86462632 | 3.863757528 |
2003 | Alabama | 16296.9555 | 88.86863461 | 1.86462632 | 3.863816764 |
2002 | Alaska | 10193.7351 | 1.128180415 | 0.024740599 | 0.050168144 |
2003 | Alaska | 10264.0362 | 1.136998568 | 0.024936869 | 0.050550171 |
I use the following to get some coefficients
proc sort data=WithInteractionEffects;
by state year;
run;
proc panel data = WithInteractionEffects;
id state year;
model vehicle_miles_traveled_per_drive = population_density centerline_miles_density lane_miles population_centerline_density population_lane_density centerline_lane_density;
run;
I want to include
by state;
So that it will give me regression coefficients for each state rather than just the whole thing.
Currently, when I try that it gives me
ERROR: There is only one cross section or time series observation. Computations will be
terminated
So is there a way to achieve the result that I want?