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
- /
- SAS Procedures
- /
- variance and confidence intervals

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

10-29-2010 10:32 AM

Hello

I have two sources of data that should both over the month have totals very close.

What is the best procedures to use to compute the variance of the difference and compute a confidence interval around that difference?

Help Please.

Fred

I have two sources of data that should both over the month have totals very close.

What is the best procedures to use to compute the variance of the difference and compute a confidence interval around that difference?

Help Please.

Fred

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

Posted in reply to fredbell

10-29-2010 12:16 PM

Are you looking to compare the totals, which are two numbers or a series of numbers?

ie data set1

month1 3

month2 5

month3 5

data set2

month1 4

month2 9

month3 3

If so use the Procedure TTEST with paired options, but you will have to combine the data first.

Proc compare will compare the differences between two dataset values, but not variance.

If just two values you can't calculate variance.

ie data set1

month1 3

month2 5

month3 5

data set2

month1 4

month2 9

month3 3

If so use the Procedure TTEST with paired options, but you will have to combine the data first.

Proc compare will compare the differences between two dataset values, but not variance.

If just two values you can't calculate variance.

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

Posted in reply to Reeza

10-31-2010 04:11 PM

Example of two different data sources of same information.

Actual date range would be for example Jan-01-10 through Mar-01-10.

Source A Source B

Date Amount Date Amount

Jan-01-10 123231 Jan-01-10 123231

Jan-02-10 272626 Jan-02-10 272726

Jan-03-10 263736 Jan-03-10 263736

Jan-04-10 264564 Jan-04-10 264564

Jan-05-10 352435 Jan-05-10 352445

Jan-06-10 736355 Jan-06-10 736320

Jan-07-10 142336 Jan-07-10 141336

Jan-08-10 112435 Jan-08-10 112500

Fred

Actual date range would be for example Jan-01-10 through Mar-01-10.

Source A Source B

Date Amount Date Amount

Jan-01-10 123231 Jan-01-10 123231

Jan-02-10 272626 Jan-02-10 272726

Jan-03-10 263736 Jan-03-10 263736

Jan-04-10 264564 Jan-04-10 264564

Jan-05-10 352435 Jan-05-10 352445

Jan-06-10 736355 Jan-06-10 736320

Jan-07-10 142336 Jan-07-10 141336

Jan-08-10 112435 Jan-08-10 112500

Fred

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

Posted in reply to fredbell

11-01-2010 09:24 AM

Fred, this example of data doesn't answer any of my questions.

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

Posted in reply to fredbell

10-29-2010 12:25 PM

> What is the best procedures to use to compute the

> variance of the difference and compute a confidence

> interval around that difference?

Variance of the difference of means?

Variance of the difference of totals?

Variance of the differences of the individual month data?

Compare variance of group 1 to variance of group 2 (which would not be done via a difference)? Message was edited by: Paige

> variance of the difference and compute a confidence

> interval around that difference?

Variance of the difference of means?

Variance of the difference of totals?

Variance of the differences of the individual month data?

Compare variance of group 1 to variance of group 2 (which would not be done via a difference)? Message was edited by: Paige

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

Posted in reply to Paige

11-01-2010 09:48 AM

Sorry Paige the boss did not confirm, will it effect the Proc ttest paired that was suggested by Reeza?

Fred Message was edited by: fredbell

Fred Message was edited by: fredbell

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

Posted in reply to fredbell

11-01-2010 10:28 AM

> Sorry Paige the boss did not confirm, will it effect

> the Proc ttest paired that was suggested by Reeza?

If you do a t-test and answer the wrong question, the results are meaningless.

> the Proc ttest paired that was suggested by Reeza?

If you do a t-test and answer the wrong question, the results are meaningless.

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

Posted in reply to fredbell

11-01-2010 01:57 PM

Paige is correct.

It really depends on the type of question you're trying to answer.

Looking at your data I see two possible questions:

1) Are the two data sources the same?

2) Are the monthly values the same for different areas of a call center?

I interpreted this as 2, but it could easily be 1 and it changes how you deal with things. Or any number of things I can't even think of...and you previously mentioned monthly totals but have daily data

Perhaps state the LOGIC/business problem you're trying to solve, along with the SAS steps you're having issues? Helping you do the wrong thing doesn't help anyone.

It really depends on the type of question you're trying to answer.

Looking at your data I see two possible questions:

1) Are the two data sources the same?

2) Are the monthly values the same for different areas of a call center?

I interpreted this as 2, but it could easily be 1 and it changes how you deal with things. Or any number of things I can't even think of...and you previously mentioned monthly totals but have daily data

Perhaps state the LOGIC/business problem you're trying to solve, along with the SAS steps you're having issues? Helping you do the wrong thing doesn't help anyone.

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

Posted in reply to fredbell

11-02-2010 02:17 AM

Hi.

From your data structure ,I guess your data is matched data,right?

if it is so, then first calculate the difference of these two variables ( i.e. dif=var1-var1),

then for this dif using proc ttest or using proc n1parway Wilcoxon-rank-sum-test(strongly reference to, for the sake of nonparameter method).

Ksharp

From your data structure ,I guess your data is matched data,right?

if it is so, then first calculate the difference of these two variables ( i.e. dif=var1-var1),

then for this dif using proc ttest or using proc n1parway Wilcoxon-rank-sum-test(strongly reference to, for the sake of nonparameter method).

Ksharp

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

Posted in reply to Ksharp

11-02-2010 08:04 AM

> Hi.

> From your data structure ,I guess your data is

> matched data,right?

> if it is so, then first calculate the difference of

> these two variables ( i.e. dif=var1-var1),

> then for this dif using proc ttest or using proc

> n1parway Wilcoxon-rank-sum-test(strongly reference

> to, for the sake of nonparameter method).

All of this might make sense in some situations, but the original request was to compute a variance, not compare means. Which is why I keep asking for clarification on exactly what the user wants.

Message was edited by: Paige

Message was edited by: Paige Message was edited by: Paige

> From your data structure ,I guess your data is

> matched data,right?

> if it is so, then first calculate the difference of

> these two variables ( i.e. dif=var1-var1),

> then for this dif using proc ttest or using proc

> n1parway Wilcoxon-rank-sum-test(strongly reference

> to, for the sake of nonparameter method).

All of this might make sense in some situations, but the original request was to compute a variance, not compare means. Which is why I keep asking for clarification on exactly what the user wants.

Message was edited by: Paige

Message was edited by: Paige Message was edited by: Paige

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

Posted in reply to Paige

11-02-2010 09:30 PM

:-)