Recently in the SAS Community Library: SAS' @Sundaresh1 highlights a sometimes overlooked task when applying document embeddings for purposes of similarity-based search. Normalisation of vectors helps obtain relevant matches.
Proc export giving additional quotes to the quoted char values.and if u use data step for that it is giving a space or . To numeric values which is not required . Needs to change nothing.now it is , , but want ,, no space no .for missing numeric value.
... View more
Can someone please explain difference between bquote and str in sas with a working example.I am aware of theoretical difference between them.
But ,I want to understand with example which shows why str can't be used in place of bquote
... View more
I have a data file describing users (ID), time periode a service is in use (FromYrMon-ToYrMon) and hours of services (hours). There are two problems. First, the time periods partly overlap. There are also some gaps between the time periods but that is probably correct. Second, the hours of services are not consistently coded in the sense that the same time period (or parts of it) may have differences in hours. The file I want, includes for each ID, one observation per month, the maximum of hours for that month and 0 for months where there are gaps between time periods. I guess the solution will be something like 1) transposing, 2) fill in gaps and 3) pick the highest number of hours for each month.
data have;
input ID FromYrMon YYMMN6 ToYrMon YYMMN6. Hours comma4.2;
datalines;
1 201701 201711 0.75
1 201704 201711 1.20 1 201801 201802 4.00 2 201710 201802 2.00 ; Data want; ID YYMon Hours 1 201701 0.75 1 201702 0.75 1 201703 0.75 1 201704 1.20 1 201705 1.20 1 201706 1.20 1 201707 1.20 1 201708 1.20 1 201709 1.20 1 201710 1.20 1 201711 1.20 1 201712 0.00 (NB) 1 201801 4.00 1 201802 4.00 2 201701 0.00 2 201702 0.00 2 201703 0.00 2 201704 0.00 2 201705 0.00 2 201706 0.00 2 201707 0.00 2 201708 0.00 2 201709 0.00 2 201710 2.00 2 201711 2.00 2 201712 2.00 2 201801 2.00 2 201802 2.00
... View more
Feedback option in proc sql statement we use to display columns in logs. so what is use of it?There is any benefit to see columns in log files.
... View more
Hi, How can I obtain the p-value of the ADF test, which uses AIC or BIC to determine the lag for residuals, in order to test the stationarity of the residuals of a linear regression model? I have tried proc arima but don’t know how to set the AIC/BIC option for lag length. The input data and my code: data df;
input month dep ind1 ind2 ind3;
cards;
1 -4.66344 0.5337595 1.533904 -0.1824561
2 -4.27203 0.5371667 1.638746 -0.2840759
3 -4.31303 0.5187737 1.708084 -0.208212
4 -3.46126 0.501581 1.773411 0.7434088
5 -3.10906 0.5024615 -0.7010086 0.4447428
6 -2.83321 0.50575 0.7289928 0.2619768
7 -2.74544 0.4943883 0.7419567 0.7679318
8 -3.30505 0.4825768 0.7544792 0.273685
9 -3.28185 0.468799 0.9924411 -0.1544852
10 -3.54578 0.4705212 1.133435 0.6179188
;
run;
proc reg
data=df;
model dep = ind1 ind2 ind3 ;
OUTPUT OUT=model_output_c predicted= pred residual=resid;
run;
proc arima data=model_output_c;
identify var=resid STATIONARITY=(ADF) ;
run;
Thank you!
... View more