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
- /
- Analytics
- /
- Stat Procs
- /
- How can I calculate the beta of a trend functions ...

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

04-30-2013 04:54 PM

How can I calculate the beta of a trend functions over several columns in SAS 9.3?

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

04-30-2013 04:57 PM

What's a beta? Is it the slope?

Can you provide more information, specifically, what does your data look like and what values you might expect.

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

04-30-2013 05:32 PM

yes, it is the slope. I have account information, and I would like to estimate how the amount changes over time in order to see if the account is active or not. So I have the account information distributed over sever columns according to the month.

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

04-30-2013 05:38 PM

I don't believe there's a single function to do that in SAS.

Other options that come to mind though are variance and checking the number of non missing.

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

04-30-2013 05:52 PM

good point!

But a bit disappointing for SAS - Excel offers this option.

Thank you!

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

04-30-2013 05:56 PM

What function? Slope?

You could transpose your data and run regressions if you were really interested.

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

05-01-2013 09:25 AM

The OP could try doing the regressions in PROC GLM. Supposing that the dependent variables are in columns 2 through N, and the independent variable in column 1, and that variables are named by column (e.g. COL_1, COL_2,..., COL_N), then I think the following will give what is needed:

proc glm data=datasetname;

model col_2 - col_n = col_1/solution;

quit;

If there is a desire to consider this as a multivariate analysis, that is pretty easy to gin up from here.

Steve Denham

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

05-02-2013 10:59 AM

Thank you very much - I will try this solution and let you know!

Bernard

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

05-02-2013 11:24 AM

OP, SAS indeed can find the Betas of your variables. This is an example of one of my regression models:

proc reg data=regress;

model cprod = year q2 q3 q4;

run;

So the 'cprod' is my dependent variable and *year, q2, q3, *and *q4* are my independent variables.

The Betas are going to come through under the section *Parameter Estimate* along with some other useful stats (t values, p values, etc.)

If I had your variable names, I could be a little more helpful, but this is at least a good start to the Proc Reg capabilities.

Best,

Regulator

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

05-02-2013 11:51 AM

Hi Regulator,

my variables are:

BalanceDic BalanceJan BalanceFeb BalanceMar

and the idea is to estimate the slope of the trend.

Thank you very much and kind regards,

Bernard

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

05-02-2013 03:00 PM

So, my interpretation of your data and what you are trying to do with it is that you have account balances, and their corresponding months. Thinking about it, your goal would to see that a contributing month's Beta would be zero. Then if they are zero for several months in a row, you might be able to argue that an account is inactive, is that correct?

If so, do you have data for the entire year? if so, how familiar are you with collinearity and dummy variables?

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

05-02-2013 03:50 PM

Your interpretation is completely correct and I'm pretty familiar with collinearity and dummy variables.

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

05-02-2013 08:09 PM

But you would expect a different slope for every account, wouldn't you.

You can transpose your data and run regressions as I've mentioned above. So change your data to be like the following:

Account Month Balance

Then run a regression

proc reg data=have;

by account;

balance=month;

run;

Or I'm totally missing the point.

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

05-03-2013 11:17 AM

You are not missing the point! I will let you know if it worked.

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

05-02-2013 03:51 PM

at this moment we just took data for 4 month, but we could increase the numbers of the months.