comp.soft-sys.sas - The SAS statistics package.
Hello, I have a question regarding limiting the number of decimal values. In a SAS dataset I have 8 variables whose values need to be restricted to 4 places and 2 variables whose values need to be restricted to 2 places. If x = 54.46698 in the current SAS dataset, I want x = 54.4669. I have used put function do over pd; pd = put(pd,11.4); end; which gives me a value of 54.467. How can I avoid this rounding off and get the precise value, and limit the decimal places. Any help will be great.Thank You.
Out of the list of these statistics that come out of proc univariate, which should typically have the extra decimal place that STD and STDMEAN have? Is it only those variables starting with STD? Stated another way, if I were to group variables into the MEAN camp and the STD camp so that one set used the same format applied to MEAN and one set used the format applied to STD then what variables should fall into the STD camp apart from those which start with STD? CSS CV KURTOSIS MAX MEAN MIN MODE N NMISS NOBS RANGE SKEWNESS STD STDMEAN SUM SUMWGT USS VAR P1 P5 P10 Q1 MEDIAN Q3 P90 P95 P99 QRANGE GINI MAD QN SN STD_GINI STD_MAD STD_QN STD_QRANGE STD_SN MSIGN NORMALTEST SIGNRANK PROBM PROBN PROBS PROBT T
My dataset has three numerical variables, when printed, they are 5 decimal places after the period. I added an variable AVG, through the mean function: DATA mydata; ... AVG=MEAN( OF VAR1 VAR2 VAR3); PROC PRINT DATA=mydata; RUN; The new variable only has 4 decimal places, how do I control this behavior? i.e., I want all numbers with 5 decimal place. Thanks, Jindan
Hi, Im going to write out SAS data in to txt format (delimiter is space) and while doing that I would like to keep the decimal points for different numeric variables as 2 only. Presently I have variables from Var32 to Var56 and they have different widths (scales are different) and different number of decimal places. I want to tamper around with the number of decimal places only. Please suggest a way to do the same. (Once am in front of SAS, I will try to see whether pasting from Log of Proc export and changing the number of decimal places would do the trick). Regards, Hari India