turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- OUTPUT WEIBULL STD

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-12-2012 08:59 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-12-2012 11:29 AM

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;

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-12-2012 10:25 AM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-12-2012 11:17 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-12-2012 11:29 AM

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;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-12-2012 11:54 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-13-2012 02:04 PM

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 ...