Programming the statistical procedures from SAS

HELP on régression lineraire

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

HELP on régression lineraire

Hello I'm a beginner with SAS University Edition and I'm sorry my english is not very good and I need your help.

 

I have a database with 50000 data.

 

I have 8 variables (Sexe_assure / age / Profession_assure / ancien / Categorie_vehicule / Usage_vehicule / annee / bonus)

And 2 variables quantitative (Nb_sinistres / Cout_sinsitres)

 

For your information,

Nb_sinistres = Number of car accident

Cout_sinistres = cost of accident

 

I have to analyse the population first then estimate the "cost".

 

I have already done the correlations off the varaibles with the fonction PROC CORR PEARSON.

 

This is my code :

79 /*Population sinsitrée = popuplation with accident*/
80 PROC CORR PEARSON DATA=WORK.SAS_GLOBAL;
81 VAR Age Ancien Categorie_vehicule Profession_assure Sexe_assure Usage_vehicule bonus annee;
82 WHERE nb_sinistres between 1 and 10;
83 RUN

 

I have done the same operation for nb_sinistres = 0 and an other one without the condition "WHERE".

My objectif is to observe the variables for all population, the population without accident and the population with accident.

 

I have done my analysis of the different populations.

 

Now I have to estimate the cost. In this instruction I understand that I have to predict/presage the cost for the next years.

 

I suppose I have to do a linaire regression. But i don't know how to get, can you help me write the program ?

 

I need to have a graph and the result

 

 

Please find attached the database

 

Thank you in advance for your help.


Accepted Solutions
Solution
‎06-24-2016 10:01 AM
Regular Contributor
Posts: 229

Re: HELP on régression lineraire

Hello and welcome to the community!

 

You can use the Linear Regression Task in SAS University Edition to help you.  If you go to TASKS AND UTILITIES -> Statistics -> scroll down you'll see it there.

 

Screen Shot 2016-06-12 at 9.15.33 AM.png

 

All you have to do is fill in the screens with the information and run the Task, you will get results.  You can specify different criteria without having to worry about wrtiing any code.  

Screen Shot 2016-06-12 at 9.19.54 AM.png

 

Screen Shot 2016-06-12 at 9.20.03 AM.png

 

If you want to see the code, you can click on the CODE tab

Screen Shot 2016-06-12 at 9.22.30 AM.png

 

And you'll get something like this:

Screen Shot 2016-06-12 at 9.22.37 AM.png

 

I hope this helps.  If you need more information about linear regression, I recommend Greg Lee's book Business statistics made easy.  You can also post back here, plenty of people have lots of experience and can help you.

 

Good luck!

Chris 

Has my article or post helped? Please mark as Solution or Like the article!

View solution in original post


All Replies
Solution
‎06-24-2016 10:01 AM
Regular Contributor
Posts: 229

Re: HELP on régression lineraire

Hello and welcome to the community!

 

You can use the Linear Regression Task in SAS University Edition to help you.  If you go to TASKS AND UTILITIES -> Statistics -> scroll down you'll see it there.

 

Screen Shot 2016-06-12 at 9.15.33 AM.png

 

All you have to do is fill in the screens with the information and run the Task, you will get results.  You can specify different criteria without having to worry about wrtiing any code.  

Screen Shot 2016-06-12 at 9.19.54 AM.png

 

Screen Shot 2016-06-12 at 9.20.03 AM.png

 

If you want to see the code, you can click on the CODE tab

Screen Shot 2016-06-12 at 9.22.30 AM.png

 

And you'll get something like this:

Screen Shot 2016-06-12 at 9.22.37 AM.png

 

I hope this helps.  If you need more information about linear regression, I recommend Greg Lee's book Business statistics made easy.  You can also post back here, plenty of people have lots of experience and can help you.

 

Good luck!

Chris 

Has my article or post helped? Please mark as Solution or Like the article!
New Contributor
Posts: 2

Re: HELP on régression lineraire

Thanks for your help

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 220 views
  • 1 like
  • 2 in conversation