BookmarkSubscribeRSS Feed
kevin_li
Calcite | Level 5

Disclaimer: Undergrad student learning how to use SAS

So I'm doing proc panel using data that looks like this

YearStateVehicle Miles Traveled per driverPopulation DensityCenterline Miles DensityLane Miles Density
2002Alabama16074.6855988.587382761.864626323.863757528
2003Alabama16296.955588.868634611.864626323.863816764

2002Alaska10193.73511.1281804150.0247405990.050168144
2003Alaska10264.03621.1369985680.0249368690.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?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 1440 views
  • 0 likes
  • 1 in conversation