BookmarkSubscribeRSS Feed
Quartz | Level 8

Hello all,


I have financial data of subjects that were chosen for a survey. The variable of interest (the dependent variable) is the subject's income. The main question, is to test the relation between the income and the age. Other covariates in the data are such as: marital status, gender, years of education and more. In addition, some subjects comes from the same family (probably the family was chosen by random, and if it contained only one subject over 18, he/she were chosen, and if more than one subjects, they all were chosen). I wish to create a model that will test the impact of age on the income, while controlling for the other covariates. But, looking at a plot of age vs. income, the relation looks non-linear. Theoretically, it should be parabolic, but in the data it is a bit different. I am attaching the plot so you can see. The plot is a smoothed line, since there are many observations with the same age, and a scatter is not very clear to understand.


I would like to ask your help in writting the SAS code for it. I understand that PROC NLMIXED is what I want. I am not sure how to model correctly (the formula, starting points, etc...).


Thank you in advance !


P.S. I can create a uniqe ID for each subject by connecting family ID and subject ID.





Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

You are right that NLMIXED is the procedure to use for nonlinear models with clustering (subjects). But NLMIXED is essentially a programming language, and there is no simple way to give you advice at this point. The forum participants usually want to provide help with existing code (corrections, changes, etc.), and typically will not write out code from scratch. Plus, you are not sure about a model to use. I think you will have to first do some homework and learn a bit about NLMIXED, and then figure out some models that you think are appropriate. People on this forum can then give advice on ways to fix problems, and so on.


The SAS User's Guide can describe NLMIXED, but the book "SAS for Mixed Models, 2nd edition" is even better to learn about this procedure. In terms of models, I am sure that many have been proposed in the literature for this type of economic data.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 2 in conversation