<?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>topic PROC LIFEREG: How do I compute predicted value for out of sample observations? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-LIFEREG-How-do-I-compute-predicted-value-for-out-of-sample/m-p/978514#M49062</link>
    <description>&lt;P&gt;Here's my SAS code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on;
ods graphics on/imagemap=on;

/* ods output/classlevels corrB covB modelinfo nobs fitstatistics FitStatisticsUL ConvergenceStatus
Type3Analysis ParameterEstimates ProbPlot; */
proc lifereg data=health.E_Ltestvar1_10_70_firms plots=probplot 
		outest=health.estimates covout;
	a: model wks_surv*censoring(0)=ln_AGE complex mmso preneg prepack RSA clntbase 
		DIP mgtresign fraud / distribution=weibull alpha=0.05 corrb covb;
	output out=health.residuals sres=s_residuals; 
	output out=health.xbeta Xbeta=xbeta;
	output out=health.new cdf=probe;
	probplot ppout ppos=mkm npintervals=simul;
	inset nobs="Sample Size" left="Number of left-censored observations" 
		right="number of right-censored observations" 
		interval="Number of interval-censored observations" 
		nmiss="Number of observations with missing values" dist="Distribution" shape 
		confidence="Confidence coefficient for all confidence intervals";
	probplot ppos=km npintervals=point;
	inset;
run;

ods trace off;
ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are my SAS datasets.&amp;nbsp; I'm having trouble figuring out how to write the code.&amp;nbsp; I want to take the parameter estimates from the SAS code above and compute the predicted values for the observations (3) in the outsample.sas7bdat file.&amp;nbsp; Then, I want to compare the predicted values to the actual values.&amp;nbsp; The actual values are in the outsample.sas7bdat file and the variable name is wks_surv.&amp;nbsp; How do I do this?&amp;nbsp; Any help is appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Nov 2025 15:48:46 GMT</pubDate>
    <dc:creator>PaulN</dc:creator>
    <dc:date>2025-11-07T15:48:46Z</dc:date>
    <item>
      <title>PROC LIFEREG: How do I compute predicted value for out of sample observations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-LIFEREG-How-do-I-compute-predicted-value-for-out-of-sample/m-p/978514#M49062</link>
      <description>&lt;P&gt;Here's my SAS code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on;
ods graphics on/imagemap=on;

/* ods output/classlevels corrB covB modelinfo nobs fitstatistics FitStatisticsUL ConvergenceStatus
Type3Analysis ParameterEstimates ProbPlot; */
proc lifereg data=health.E_Ltestvar1_10_70_firms plots=probplot 
		outest=health.estimates covout;
	a: model wks_surv*censoring(0)=ln_AGE complex mmso preneg prepack RSA clntbase 
		DIP mgtresign fraud / distribution=weibull alpha=0.05 corrb covb;
	output out=health.residuals sres=s_residuals; 
	output out=health.xbeta Xbeta=xbeta;
	output out=health.new cdf=probe;
	probplot ppout ppos=mkm npintervals=simul;
	inset nobs="Sample Size" left="Number of left-censored observations" 
		right="number of right-censored observations" 
		interval="Number of interval-censored observations" 
		nmiss="Number of observations with missing values" dist="Distribution" shape 
		confidence="Confidence coefficient for all confidence intervals";
	probplot ppos=km npintervals=point;
	inset;
run;

ods trace off;
ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are my SAS datasets.&amp;nbsp; I'm having trouble figuring out how to write the code.&amp;nbsp; I want to take the parameter estimates from the SAS code above and compute the predicted values for the observations (3) in the outsample.sas7bdat file.&amp;nbsp; Then, I want to compare the predicted values to the actual values.&amp;nbsp; The actual values are in the outsample.sas7bdat file and the variable name is wks_surv.&amp;nbsp; How do I do this?&amp;nbsp; Any help is appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Nov 2025 15:48:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-LIFEREG-How-do-I-compute-predicted-value-for-out-of-sample/m-p/978514#M49062</guid>
      <dc:creator>PaulN</dc:creator>
      <dc:date>2025-11-07T15:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC LIFEREG: How do I compute predicted value for out of sample observations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-LIFEREG-How-do-I-compute-predicted-value-for-out-of-sample/m-p/978555#M49064</link>
      <description>Check Rick's blogs:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/02/17/the-missing-value-trick-for-scoring-a-regression-model.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2014/02/17/the-missing-value-trick-for-scoring-a-regression-model.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/08/06/score-quantile-regression-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/08/06/score-quantile-regression-sas.html&lt;/A&gt;</description>
      <pubDate>Sat, 08 Nov 2025 08:15:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-LIFEREG-How-do-I-compute-predicted-value-for-out-of-sample/m-p/978555#M49064</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-11-08T08:15:02Z</dc:date>
    </item>
  </channel>
</rss>

