<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Rick_SAS Tracker</title>
    <link>https://communities.sas.com/kntur85557/tracker</link>
    <description>Rick_SAS Tracker</description>
    <pubDate>Sat, 29 Aug 2026 19:01:11 GMT</pubDate>
    <dc:date>2026-08-29T19:01:11Z</dc:date>
    <item>
      <title>Re: What is collinearity and why does it matter?</title>
      <link>https://communities.sas.com/t5/SAS-Communities-Library/What-is-collinearity-and-why-does-it-matter/tac-p/991343#M12151</link>
      <description>&lt;P&gt;For more details and examples of collinearity in regression data, and how to use the COLLIN option and diagnostic statistics in SAS, see&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://blogs.sas.com/content/iml/2020/01/23/collinearity-regression-collin-option.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2020/01/23/collinearity-regression-collin-option.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://blogs.sas.com/content/iml/2020/01/29/collinearity-diagnostics-centering.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2020/01/29/collinearity-diagnostics-centering.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://blogs.sas.com/content/iml/2020/02/17/visualize-collinearity-diagnostics.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2020/02/17/visualize-collinearity-diagnostics.html&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 27 Jul 2026 12:58:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Communities-Library/What-is-collinearity-and-why-does-it-matter/tac-p/991343#M12151</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-07-27T12:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Model-Based Clustering (Part 1): Exploring Its Significance</title>
      <link>https://communities.sas.com/t5/SAS-Communities-Library/Model-Based-Clustering-Part-1-Exploring-Its-Significance/tac-p/991207#M12138</link>
      <description>&lt;P&gt;To learn more about Model-Based Clustering and the algorithm behind it (the E-M algorithm), see&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2020/07/23/fit-multivariate-gaussian-mixture-em-algorithm.html" target="_blank"&gt;Fit a multivariate Gaussian mixture model by using the expectation-maximization (EM) algorithm - The DO Loop&lt;/A&gt;&amp;nbsp;The article uses SAS 9.4.&amp;nbsp; I do not claim it is a replacement for PROC MBC, but it shows the main ideas.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2026 13:20:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Communities-Library/Model-Based-Clustering-Part-1-Exploring-Its-Significance/tac-p/991207#M12138</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-07-23T13:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Mean and Standard Deviation for Large Amounts of Data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Mean-and-Standard-Deviation-for-Large-Amounts-of-Data/m-p/989936#M49491</link>
      <description>&lt;P&gt;The Welford method is more useful for simulation studies than for data analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The MEANS and SUMMARY procedures are the usual methods in SAS 9.4 for descriptive statistics. They excel at producing statistics across BY groups and CLASS variables (including n-way crosstabulations), which is a common situation in demographics. They also compute standard errors and confidence intervals for the population quantities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SUMMARY and HPSUMMARY procedures use multithreading to divide the computations across threads. You can get almost perfect parallelization since both procedures are essentially summations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Have;
array mu[100] _temporary_ (1:100);
array x[100];
do i=1 to 1E6;
  do j=1 to dim(x);
     x[j] = rand("Normal", mu[j], 20);
     if (rand("Bern", 0.01)) then x[j]=.;  /* add some missing values */
  end;
  output;
end;
run;

options fullstimer;
proc hpsummary data=Have mean std;
   var x:;
   output out=Summary;
run;
options nofullstimer;

proc print data=Summary;
   where _STAT_ in ("N" "MEAN" "STD");
   format _numeric_ best6.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 20 Jun 2026 15:28:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Mean-and-Standard-Deviation-for-Large-Amounts-of-Data/m-p/989936#M49491</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-06-20T15:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ODS OUTPUT with PROC DATASETS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-ODS-OUTPUT-with-PROC-DATASETS/m-p/989283#M380187</link>
      <description>&lt;P&gt;I agree with Quentin and Tom. An ODS SELECT/OUTPUT statement must go before the statement that generates the table (or graph). In this case, it is the PROC DATASETS statement itself that creates the output. Run this example WITHOUT any RUN or QUIT statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class1 class2;
  set sashelp.class(obs=3);
run;
ods trace on;
proc datasets lib=work memtype=data;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Even though there is no RUN or QUIT statement, you can see from the ODS trace statement that the output is created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was not aware of this behavior. In my 2024 article about interactive procedures (&lt;A href="https://blogs.sas.com/content/iml/2024/10/09/interactive-procedures-sas.html" target="_blank"&gt;Interactive procedures in SAS - The DO Loop&lt;/A&gt;), I stated the following information from the PROC DATASETS documentation:&lt;BR /&gt;&lt;EM&gt;The interactive nature of PROC DATASETS is a different from other SAS procedures. The documentation states that it supports RUN-group processing, but "the DATASETS procedure supports four types of RUN groups.... &lt;STRONG&gt;Some statements in PROC DATASETS act as implied RUN statements&lt;/STRONG&gt; because they cause the RUN group preceding them to execute."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have boldfaced the statement that applies in this case. When I wrote the article, I don't think I fully appreciated what that boldfaced statement was telling us.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2026 21:05:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-ODS-OUTPUT-with-PROC-DATASETS/m-p/989283#M380187</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-06-04T21:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: CV for ridge regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CV-for-ridge-regression/m-p/987696#M49427</link>
      <description>&lt;P&gt;I haven't done this myself, but there is an example in the GLMSELECT documentation that appears to use the ELASTICNET method to do what you want. Here are some links that I hope will be useful:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_glmselect_details12.htm" target="_blank"&gt;SAS Help Center: Elastic Net Selection (ELASTICNET)&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_glmselect_syntax07.htm#statug.glmselect.glsselection" target="_blank"&gt;SAS Help Center: MODEL Statement&lt;/A&gt;&amp;nbsp;See the SELECTION=ELASTICNET method and the various "L2" options. The default search option for the optimal ridge parameter are L2LOW=0, L2HIGH=1,&amp;nbsp; L2STEPS=50, and L2SEARCH=GRID.&amp;nbsp; These look like good defaults to me.&lt;/LI&gt;
&lt;LI&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_glmselect_examples06.htm" target="_blank"&gt;SAS Help Center: Elastic Net and External Cross Validation&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 11 May 2026 09:45:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CV-for-ridge-regression/m-p/987696#M49427</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-05-11T09:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: MLEs of GE</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MLEs-of-GE/m-p/986227#M6594</link>
      <description>&lt;P&gt;Is there anything else we can help you with? If not, please close this thread.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2026 09:44:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MLEs-of-GE/m-p/986227#M6594</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-04-13T09:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: MLEs of GE</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MLEs-of-GE/m-p/986105#M6593</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; I&amp;nbsp;still get the same error:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;ERROR: NEWRAP Optimization cannot be completed.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;WARNING: Optimization routine cannot improve the function value.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;A more accurate statement is, "For about 10% of the random samples of size N=25, the optimization does not converge."&lt;/P&gt;
&lt;P&gt;This is typical behavior for three-parameter models, especially those with a threshold parameter. In some cases, the log-likelihood does not have a maximum on the feasible domain. The parameter estimates (especially the xi parameter for GEV) are very sensitive to samples whose shapes deviate from the distribution. For example, if the random sample generates too many or too few observations from the tail of the distribution, or few observations close to the threshold, then the MLE might not converge.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can find many papers and textbooks that discuss these issues. For example, see Rosian, Na, and Gabda (2020), whose abstract begins with the sentence, "The standard method of the maximum likelihood has poor performance in GEV parameter&lt;BR /&gt;estimates for small sample data."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess the important question to ask is, "what are you trying to accomplish or learn by running this simulation study?"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2026 14:06:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MLEs-of-GE/m-p/986105#M6593</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-04-08T14:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code Errors</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-Code-Errors-for-MLE/m-p/984993#M6587</link>
      <description>&lt;P&gt;First, I made a mistake. The statement that subsets the good indices should be&amp;nbsp;&lt;BR /&gt;Est = Est[good_idx, ];&amp;nbsp; /* Note the comma! */&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;To answer your questions:&lt;BR /&gt;&lt;EM&gt;&amp;gt; 1.&amp;nbsp;the mean of estimates of betas are far away from the true values. Is it acceptable?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;I don't know what "acceptable" means. What is your goal? Your estimates will be far away from the true mean regardless of which optimization method you use.&lt;/P&gt;
&lt;P&gt;If your goal is to show that the regression estimates for this model are highly variable and should not be trusted for samples of size n=25, then, yes, I think this simulation demonstrates that fact very well. If you plot your parameter estimates, there are many extreme values, which will, of course,&amp;nbsp;strongly influence the Monte Carlo mean and standard deviation. A more robust Monte Carlo estimate would be the median of the columns. You should always graph the parameter estimates to visualize their variability.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;colMedian=t(median(Est));
print colMedian;

title "Graph of parameter estimates from NLPNRA";
call scatter(Est[,1], Est[,2]);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The graph might cause you to ask whether the computations in the simulation are wrong. You can answer that question by performing the same computation for larger sample sizes. Many of your "problems" with nonconvergence and highly variable estimates will go away&amp;nbsp;if you increase the sample size, to, say, n=100.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Yes, the Monte Carlo estimate is based on the 997 estimates that converged&lt;/P&gt;
&lt;P&gt;3. Yes, you can increase the value of the 'replicate' variable to obtain additional Monte Carlo samples. But the math doesn't care if you use 997 or 1000. The math says that the mean of the estimates (however many you have) is the Monte Carlo estimate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In summary, your "problems" are caused because the sample size in the simulation is so small. You can "fix" your problems by using a larger sample size.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2026 09:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-Code-Errors-for-MLE/m-p/984993#M6587</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-03-19T09:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code Errors</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-Code-Errors-for-MLE/m-p/984931#M6585</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;I got the following error 3 times in the log window when n=25:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;ERROR: NEWRAP Optimization cannot be completed.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;ERROR: NEWRAP needs more than 200 iterations or 500 function calls.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;How can I fix this?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This error message appears for 3 out of 1000 simulation trials. Errors like this appear in simulation studies when a random sample contains extreme values or is otherwise not representative. For those samples, the MLE step does not converge. This does not indicate a problem in your code, but rather a hazard when you are simulating small data sets (in your example, n=25). For details and a discussion, see&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2015/08/26/convergence-sim.html" target="_blank" rel="noopener"&gt;Monitor convergence during simulation studies in SAS - The DO Loop&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are two ways to address your concern:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Unless you are specifically interested in Newton-Raphson optimization, you can switch optimization schemes. For example, the quasi-Newton optimization in NLPQN might be faster and more robust. Since quasi-Newton methods do not require Hessian computations, you can replace your call to NLPNRA with&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;call nlpqn(rc, res, "SUMLOGLHF", initial_param,opt) grd="driv"; /*Use quasi-Newton algorithm that minimizes negative log likelihood function */&lt;BR /&gt;&lt;/STRONG&gt;This is what I would do.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;If, for some reason, Newton iteration is important, you can keep track of the return code (rc) and remove the results from samples for which the MLE does not converge. This is the suggestion in the blog post, as applied to your IML program. This requires allocating a vector for the return codes, then using the LOC function to keep only the results from MLE that converged:&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;rc_status = j(replicate,1);
do k=1 to replicate;
...
   call nlpnra(rc, res, "SUMLOGLHF", initial_param, opt) grd="driv" hes="HessLogLik";
   Est[k,]=res;
   rc_status[k] = rc;
end;

/* find trials that converged */
good_idx = loc(rc_status &amp;gt; 0);
Est = Est[good_idx, ];
nSim = nrow(Est);
colMean=t(mean(Est));
colStanddev=t(std(Est));
print nSim colMean colStanddev;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Mar 2026 09:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-Code-Errors-for-MLE/m-p/984931#M6585</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-03-19T09:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAS runs slower with each macro call simulated power</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-runs-slower-with-each-macro-call-simulated-power/m-p/984906#M379763</link>
      <description>&lt;P&gt;Chapter 6 "Strategies for Efficient and Effective Simulation" of Wicklin (2013) has a lot of techniques for efficient simulation. Another technique that applies to you is the value of running a small preliminary study (pp. 94-95). In your study, you could initially run 1000 (instead of 10,000) simulations while you develop and debug the program, and as you search for the optimal parameter values. That will enable you to conjecture that the optimal sample size is approximately &lt;SPAN&gt;N=470. You can then increase the number of simulations to 10,000&amp;nbsp;&lt;/SPAN&gt;and re-run the simulations for a limited range of sample sizes such as [465, 475].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To quote Wicklin, p. 95:&lt;BR /&gt;&lt;EM&gt;In summary, when you begin a large simulation study, resist the urge to immediately write and&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;run the entire simulation. Start small. Debug and optimize the simple cases. Run a small-scale&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;simulation. These techniques provide important information that you can incorporate into the final&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;study.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2026 19:09:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-runs-slower-with-each-macro-call-simulated-power/m-p/984906#M379763</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-03-17T19:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS runs slower with each macro call simulated power</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-runs-slower-with-each-macro-call-simulated-power/m-p/984904#M379761</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;I'm using the old Display Manager. Only a two-way proc freq and the four observation dataset generated by it is going to the output window.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you expand the control widgets for the PROC FREQ in the Results window, you will see that you are generating 2 x 10,000 little control widgets every time you run the macro.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Put&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="sas"&gt;ods noresults;&lt;/PRE&gt;
&lt;P&gt;at the top of your macro and&amp;nbsp;&lt;/P&gt;
&lt;PRE class="sas"&gt;ods results;&lt;/PRE&gt;
&lt;P&gt;at the end.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2026 18:39:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-runs-slower-with-each-macro-call-simulated-power/m-p/984904#M379761</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-03-17T18:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS runs slower with each macro call simulated power</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-runs-slower-with-each-macro-call-simulated-power/m-p/984901#M379758</link>
      <description>&lt;P&gt;What client or editor are you using to run this program? SAS EG? SAS Studio? The old Windows Display Manager?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From your description, it sounds like some resource is accumulating, which is why the process slows down. If you are seeing output to the log, an ODS output destination, or even the Results window in the old Display Manager. See&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2013/05/24/turn-off-ods-for-simulations.html" target="_blank"&gt;Turn off ODS when running simulations in SAS - The DO Loop&lt;/A&gt;&amp;nbsp;for a discussion and some tricks.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2026 18:20:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-runs-slower-with-each-macro-call-simulated-power/m-p/984901#M379758</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-03-17T18:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Code Errors</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-Code-Errors-for-MLE/m-p/984837#M6583</link>
      <description>&lt;P&gt;The statement&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;z = max(-700, min(700, z));/*Prevents exp() overflow/underflow*/&lt;/LI-CODE&gt;
&lt;P&gt;is wrong.&lt;/P&gt;
&lt;P&gt;The MIN and the MAX function return a scalar value. So instead of z being a vector, it is a scalar.&lt;/P&gt;
&lt;P&gt;The correct way to clip a vector of values into an interval is shown in the article&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2026/02/04/clip-values.html" target="_self"&gt;"Clip values into an interval"&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The article contains this little IML helper function:&lt;/P&gt;
&lt;PRE class="sas"&gt;&lt;SPAN&gt;/* use the elementwise minimum (&amp;gt;&amp;lt;) and elementwise maximum (&amp;lt;&amp;gt;) operators to 
   truncate elements of a vector into an interval. See&lt;BR /&gt;   https://blogs.sas.com/content/iml/2026/02/04/clip-values.html&lt;BR /&gt;*/&lt;/SPAN&gt;
start Clip&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;x&lt;/SPAN&gt;, ab&lt;SPAN&gt;)&lt;/SPAN&gt;;
   a = ab&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;; b = ab&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;;
   &lt;SPAN&gt;return&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt; a &amp;lt;&amp;gt; &lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;x&lt;/SPAN&gt; &amp;gt;&amp;lt; b&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;)&lt;/SPAN&gt;;
finish;&lt;/PRE&gt;
&lt;P&gt;Use that function instead of your nested MAX-MIN statement. For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;start SUMLOGLHF(beta) global(n,x,y);
z = x*t(beta);
z = Clip(z, {-700 700}); /*Prevents exp() overflow/underflow*/
...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There might be other issues, but fix this issue first.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2026 18:02:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-Code-Errors-for-MLE/m-p/984837#M6583</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-03-16T18:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: PCA : correltaion</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PCA-correltaion/m-p/984808#M49332</link>
      <description>&lt;P&gt;If you need a refresher on the matrix operations behind creating scores plots, see "A classical principal component analysis in SAS/IML" in the article, &lt;A href="https://blogs.sas.com/content/iml/2017/08/09/robust-principal-components-sas.html" target="_self"&gt;"Robust PCA in SAS."&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2026 09:26:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PCA-correltaion/m-p/984808#M49332</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-03-16T09:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: proc princomp : labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-princomp-labels/m-p/983958#M379626</link>
      <description>&lt;P&gt;Ah! Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;for pointing out that the OP wants to plot variable LABELS, not names.&amp;nbsp; I agree that there is no built-in option to make the ODS graphics from PROC PRINTCOMP use labels. The OP will need to use the VALIDVARNAME=ANY option to rename variables as n-literals. Here is an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* What are the labels for the variables? */
proc contents data=sashelp.iris varnum;
   ods select Position;
run;

/* create a copy of the data and use VALIDVARNAME=ANY to rename the 
   variables to their label values */
option validvarname=ANY;
data Iris;
   set sashelp.iris;
   rename 
   PetalLength = 'Petal Length (mm)'n
   PetalWidth  = 'Petal Width (mm)'n
   SepalLength = 'Sepal Length (mm)'n
   SepalWidth  = 'Sepal Width (mm)'n;
run;

/* run PCA on the new data set */
ods graphics on;
proc princomp data=Iris
     plots=pattern(vector circles=25 50 75 100);
var _numeric_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PatternPlot30.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113336iF155CD18A45BC85B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PatternPlot30.png" alt="PatternPlot30.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;PatternPlot30.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I assume this is a one-time task, but if you need to incorporate it into a process, you can write a macro that uses the output of PROC CONTENTS tp automatically create the new variable (with long n-literal names) as copies of the original variables. See&amp;nbsp;&lt;A href="https://support.sas.com/kb/35/973.html" target="_blank"&gt;35973 - Display variable labels instead of variable names in procedure results&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Feb 2026 11:06:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-princomp-labels/m-p/983958#M379626</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-02-24T11:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: proc princomp : labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-princomp-labels/m-p/983900#M379613</link>
      <description>&lt;P&gt;It's hard to tell from the image you posted, but it looks like you want a "Pattern Plot" (somtimes called a "loadings Plot").&amp;nbsp; Try imitating this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;ods graphics on;
proc princomp data=sashelp.iris plots=pattern(vector circles=25 50 75 100);
var _numeric_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you need a refresher on how to interpret a pattern plot, see&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2019/11/04/interpret-graphs-principal-components.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2019/11/04/interpret-graphs-principal-components.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2026 21:12:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-princomp-labels/m-p/983900#M379613</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-02-23T21:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: predicting outcome values with lsmeans in quadratic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/predicting-outcome-values-with-lsmeans-in-quadratic-regression/m-p/983828#M49294</link>
      <description>&lt;P&gt;In addition to what KSharp said in his reply, the observed DM values are not important when scoring the model.&amp;nbsp;The predicted values depend only on the explanatory variable(s). The DM is only used during the fitting processes. It is also used to form residuals, which are useful for assessing the goodness of the fit.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Feb 2026 11:23:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/predicting-outcome-values-with-lsmeans-in-quadratic-regression/m-p/983828#M49294</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-02-21T11:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgscatter display issues (for 18 variables)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sgscatter-display-issues-for-18-variables/m-p/983802#M379575</link>
      <description>&lt;P&gt;Assuming that you want at least 200 pixels for each graph, a 1000x1000 plot can only hold 5 plots in each dimension. If you are trying to create a matrix that shows the pairwise scatter plot of 18 variables, you are only getting 55 pixels per plot, which is very small.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are you hoping to see in this display, which is going to have 153 scatter plots? Depending upon your goals it might be better to plot subsets of your data instead of trying to see it all at once. For example, there are 10 numeric variables in the SASHELP.CARS data set. If I want to see how all variables are related to the MPG_CITY variable, I can create a big panel, but sometimes it is better to display multiple panels that each have 5-6 graphs, like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics / height=640px width=480px;
title "First group of vars";
proc sgscatter data=sashelp.cars;
  compare y=(MSRP Invoice EngineSize Cylinders Horsepower)
          x=(mpg_city);
run;

title "Second group of vars";
proc sgscatter data=sashelp.cars;
  compare y=(MPG_Highway Weight Wheelbase Length)
          x=(mpg_city);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Feb 2026 16:55:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sgscatter-display-issues-for-18-variables/m-p/983802#M379575</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-02-20T16:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: predicting outcome values with lsmeans in quadratic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/predicting-outcome-values-with-lsmeans-in-quadratic-regression/m-p/983683#M49286</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* create fake data set that has the same names as the OP's data */
%let Orig_Data = sashelp.class;
data poly_data;
set &amp;amp;Orig_Data;
DM = Weight;
hedonic = Age;
hedonic2 = hedonic**2;
hedonic3 = hedonic**3;
keep DM hedonic hedonic2 hedonic3;
run;

proc glm data=poly_data;
    model DM = hedonic hedonic2 hedonic3/p solution alpha=.05 clparm;
    output out=GLMOut Predicted=Pred;
quit; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Of course, any obs with the same value of hedonic will have the same predicted value. If you want to see only the unique predictions, you can sort by hedonic and then output only the first observation for each level:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=GLMOut;
by hedonic;
run;

data GLMOut_NoDups;
set GLMOut;
by hedonic;
if first.hedonic;
run;

proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Feb 2026 13:45:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/predicting-outcome-values-with-lsmeans-in-quadratic-regression/m-p/983683#M49286</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-02-19T13:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Are Studentized Residuals a Better Measure for Assessing Model Normalcy Than Plain Vanilla Resid</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Are-Studentized-Residuals-a-Better-Measure-for-Assessing-Model/m-p/983628#M49279</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;&amp;nbsp;it conforms with our shared expectation that OLS basically requires residuals to “be iid normally distributed.”&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Just to clarify, OLS does not depend on iid normal residual for prediction. That assumption is used for inferential statistics such as confidence limits for parameters. So "iid normal" is sometimes considered to be an optional assumption that is useful for some analyses.&lt;/P&gt;
&lt;P&gt;For more on this topic, see&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2018/08/27/on-the-assumptions-and-misconceptions-of-linear-regression.html" target="_blank"&gt;On the assumptions (and misconceptions) of linear regression - The DO Loop&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2026 16:33:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Are-Studentized-Residuals-a-Better-Measure-for-Assessing-Model/m-p/983628#M49279</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-02-17T16:33:14Z</dc:date>
    </item>
  </channel>
</rss>

