@milos_miletic wrote:
Hello,
This is the entire code of the linear regression :
/* -------------------------------------------------------------------
Code généré par une tâche SAS
Généré le : lundi 2 décembre 2019 à 12:18:05
Par tâche : Régression linéaire
Données d'entrée : Local:WORK.DATASET FP
Serveur : Local
------------------------------------------------------------------- */
ODS GRAPHICS ON;
%_eg_conditional_dropds(WORK.PREDLINREGPREDICTIONS_0002,
WORK.SORTTEMPTABLESORTED_0002,
WORK.TMP1TempTableForPlots);
/* -------------------------------------------------------------------
Déterminez l'attribut de type de la table (si défini)
et le prépare pour l'ajout à la table/la vue, qui est
généré lors de l'étape suivante.
------------------------------------------------------------------- */
DATA _NULL_;
dsid = OPEN("WORK.'DATASET FP'n", "I");
dstype = ATTRC(DSID, "TYPE");
IF TRIM(dstype) = " " THEN
DO;
CALL SYMPUT("_EG_DSTYPE_", "");
CALL SYMPUT("_DSTYPE_VARS_", "");
END;
ELSE
DO;
CALL SYMPUT("_EG_DSTYPE_", "(TYPE=""" || TRIM(dstype) || """)");
IF VARNUM(dsid, "_NAME_") NE 0 AND VARNUM(dsid, "_TYPE_") NE 0 THEN
CALL SYMPUT("_DSTYPE_VARS_", "_TYPE_ _NAME_");
ELSE IF VARNUM(dsid, "_TYPE_") NE 0 THEN
CALL SYMPUT("_DSTYPE_VARS_", "_TYPE_");
ELSE IF VARNUM(dsid, "_NAME_") NE 0 THEN
CALL SYMPUT("_DSTYPE_VARS_", "_NAME_");
ELSE
CALL SYMPUT("_DSTYPE_VARS_", "");
END;
rc = CLOSE(dsid);
STOP;
RUN;
/* -------------------------------------------------------------------
Il est inutile de trier la table WORK.'DATASET FP'n.
------------------------------------------------------------------- */
DATA WORK.SORTTEMPTABLESORTED_0002 &_EG_DSTYPE_ / VIEW=WORK.SORTTEMPTABLESORTED_0002;
SET WORK.'DATASET FP'n;
RUN;
TITLE;
TITLE1 "Results of Global Linear Regression";
FOOTNOTE;
FOOTNOTE1 "Généré par SAS (&_SASSERVERNAME, &SYSSCPL) le %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) à %TRIM(%QSYSFUNC(TIME(), NLTIMAP25.))";
PROC REG DATA=WORK.SORTTEMPTABLESORTED_0002
PLOTS(ONLY)=RESIDUALHISTOGRAM
PLOTS(ONLY)=RESIDUALBYPREDICTED
PLOTS(ONLY)=OBSERVEDBYPREDICTED
PLOTS(ONLY)=QQPLOT
PLOTS(ONLY)=RFPLOT
PLOTS(ONLY)=DIAGNOSTICSPANEL
PLOTS(ONLY)=RESIDUALPANEL
;
Linear_Regression_Model: MODEL "Y - GDP per capita (current US$)"n = "Access to electricity (% of popu"n "Individuals using the Internet ("n "Secure Internet servers (per 1 m"n "Compulsory education, duration ("n "Foreign direct investment, net i"n "Merchandise exports (current US$"n "Urban population (% of total pop"n "Net migration"n "International tourism, number of"n "Life expectancy at birth, total"n "Infant deaths per birth"n
/ SELECTION=NONE
CLB
ALPHA=0.01
;
OUTPUT OUT=WORK.PREDLINREGPREDICTIONS_0002(LABEL="Prédictions et statistiques de régression linéaire pour WORK.'DATASET FP'n")
PREDICTED="predicted_Y - GDP per capita (c
RESIDUAL="residual_Y - GDP per capita (cu
STUDENT="student_Y - GDP per capita (cur
RSTUDENT="rstudent_Y - GDP per capita (cu
LCL="lcl_Y - GDP per capita (current
LCLM="lclm_Y - GDP per capita (curren
UCL="ucl_Y - GDP per capita (current
UCLM="uclm_Y - GDP per capita (curren ;
RUN;
QUIT;
/* -------------------------------------------------------------------
Fin du code de la tâche
------------------------------------------------------------------- */
RUN; QUIT;
%_eg_conditional_dropds(WORK.SORTTEMPTABLESORTED_0002,
WORK.TMP1TempTableForPlots);
TITLE; FOOTNOTE;
ODS GRAPHICS OFF;
Do you need anything else ?
Well, yes, I do need something else, and I didn't really ask for this. I want to see the entire LOG, not just the error messages, but the entire SAS log, so we can match up the error message with the actual location in the code where the error occurs.
But it seems that @Kurt_Bremser has found serious problems, which you need to address.
... View more