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?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1249 views
  • 0 likes
  • 1 in conversation