OUTPUT WEIBULL STD

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

OUTPUT WEIBULL STD

Hi,

I've looked all over SAS website and the community forum for help on output std for weibull distribution, but I can't find any documentation.

I was able to output normal standard deviation like so

proc univeriate data=mydata noprint;

var myvar;

output out=myout std=std;

But how do I output the std from the following code?  I don't know what to put in place of "???" in order to get the std dev of weibull;

proc univariate data=mydata noprint;

var myvar;

histogram / weibull;

output out=myout ???=weibull_std;

Would it help if I provide the data? Also, is there another procedure that has the ability to output the weibull std into a dataset?

many thanks!


Accepted Solutions
Solution
‎12-12-2012 11:29 AM
Super User
Posts: 19,822

Re: OUTPUT WEIBULL STD

Add in the ODS Table statement like below and that will capture the estimates into a dataset called pestimates for you.

title 'Distribution of Plate Gaps';

ods select ParameterEstimates GoodnessOfFit FitQuantiles MyHist;

ods table parameterestimates=pestimates;

proc univariate data=Plates;

  var Gap;

  histogram / midpoints=0.2 to 1.8 by 0.2

  lognormal

  weibull

  gamma

  vaxis = axis1

  name = 'MyHist';

  inset n mean(5.3) std='Std Dev'(5.3) skewness(5.3)

  / pos = ne header = 'Summary Statistics';

  axis1 label=(a=90 r=0);

run;

View solution in original post


All Replies
Super User
Posts: 19,822

Re: OUTPUT WEIBULL STD

What are you defining as the Weibull std?

The Weibull distribution has 3 parameters, shape, location and scale and the standard deviation is a function of the shape parameter.

New Contributor
Posts: 3

Re: OUTPUT WEIBULL STD

Hi there,

Thank you for the quick response.

I wanted to capture the STD for the weibull fit which I found the example at the link pasted below.

Base SAS(R) 9.2 Procedures Guide: Statistical Procedures, Third Edition

I believe the example defined shape to be 1.961159  and I want to output the "Std Dev 0.339248" on that print out to a dataset.  The value can be found in "Output 4.22.3 Summary of Fitted Weibull Distribution".   Is it possible to output the value 0.339248 to a dataset?  Or is there another proc that I should look at to output the std value?

I truly appreciate your response.

Solution
‎12-12-2012 11:29 AM
Super User
Posts: 19,822

Re: OUTPUT WEIBULL STD

Add in the ODS Table statement like below and that will capture the estimates into a dataset called pestimates for you.

title 'Distribution of Plate Gaps';

ods select ParameterEstimates GoodnessOfFit FitQuantiles MyHist;

ods table parameterestimates=pestimates;

proc univariate data=Plates;

  var Gap;

  histogram / midpoints=0.2 to 1.8 by 0.2

  lognormal

  weibull

  gamma

  vaxis = axis1

  name = 'MyHist';

  inset n mean(5.3) std='Std Dev'(5.3) skewness(5.3)

  / pos = ne header = 'Summary Statistics';

  axis1 label=(a=90 r=0);

run;

New Contributor
Posts: 3

Re: OUTPUT WEIBULL STD

Hi Reeza,

That crucial line is exactly what I was looking for.  One more thing, I will be putting this code into a loop (n=1000+) and I need to set NOPRINT option.  I've put NOPRINT in the line

ods table parameterestimates=pestimates noprint;

but it does not seem to suppress the print out in the results window.  Is there a way to suppress the print out?

many thanks,

Van

Super User
Posts: 19,822

Re: OUTPUT WEIBULL STD

That's not where you put the noprint option.

that goes in proc univariate line, but then that table doesn't get created so you lose your output.

You then need to move the line of code inside your dataset and I think it changes from ods table to ods output ...

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 273 views
  • 6 likes
  • 2 in conversation