Help using Base SAS procedures

Code for change in # of family members

Reply
Contributor spg
Contributor
Posts: 61

Code for change in # of family members

I have a panel data set which records consumption of a brand over the years by different households (given by their IDs). I want to find out how the addition of a child in the household affects consumption of the brand (see changes in the child_status column and number of UNITS consumed). How can I capture this as a variable to use in a basic regression model?

Any input is greatly appreciated.

ID YR UNITS # Members child_status
1 2001 1 2 NoKids<18yrs
1 2006 5 2 NoKids<18yrs
1 2007 1 2 NoKids<18yrs
2 2001 19 2 NoKids<18yrs
2 2002 43 4 Kids<6yrs
2 2003 34 2 NoKids<18yrs
2 2008 11 1 NoKids<18yrs
2 2009 3 2 NoKids<18yrs
2 2010 2 1 NoKids<18yrs
3 2001 1 1 NoKids<18yrs
3 2005 2 4 Kids<6yrs
3 2009 6 2 NoKids<18yrs
Ask a Question
Discussion stats
  • 0 replies
  • 87 views
  • 0 likes
  • 1 in conversation