Calcite | Level 5

## 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)

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

1 ACCEPTED SOLUTION

Accepted Solutions
Lapis Lazuli | Level 10

## 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.

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.

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

And you'll get something like this:

Good luck!

Chris

Has my article or post helped? Please mark as Solution or Like the article!
2 REPLIES 2
Lapis Lazuli | Level 10

## 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.

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.

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

And you'll get something like this:

Good luck!

Chris

Has my article or post helped? Please mark as Solution or Like the article!
Calcite | Level 5

## Re: HELP on régression lineraire

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