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
- /
- Linear Regression Log(y)vsLog(x) - equation parame...

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
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-22-2016 03:45 PM

Good afternoon,

A rather dummy question, I transformed both y and x var to do a linear regression of Log(y) vs Log(x) - i got the SAS output on SAS studio v3.4 and want to know what to do with the Intercept value and slope value in order to build the true equation. How should I calculated the intercept and slop exactly please? And is SAS LOG(var) default to base 10, e or LN? I wish to know, from this SAS output, what is the equation to be use to predict data from non transformed data... THANKS TO ALL !!!

Parameter Estimates Variable DF Parameter

Estimate Standard

Error t Value Pr > |t| Standardized

Estimate Intercept 1 log_TT_bps_ 1

0.16525 | 0.50053 | 0.33 | 0.7419 | 0 |

1.04808 | 0.13955 | 7.51 | <.0001 | 0.56709 |

Accepted Solutions

Solution

03-24-2016
12:12 AM

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

Posted in reply to jackice

03-23-2016 10:00 PM

I would suggest you try and we'll be happy to help. @lvm has laid out the calculation - replace the a with your intercept value and b with your slope. X is your independent variable.

The following is the formula in SAS (**=exponent)

`Y = a*(x**B);`

I would also recommend doing it via a data step so you can trace it out if required.

All Replies

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

Posted in reply to jackice

03-22-2016 06:08 PM

The SAS function LOG is natural log (base e). Use Log10 for base 10 or Log2 for base 2.

If you share the code you used to generate the parameters there might be some better options than creating the model equation by hand.

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

Posted in reply to ballardw

03-23-2016 05:32 PM

Using your intercept (a) and slope (b), you have log(y) = a + b*log(x).

So, use:

y = [exp(a)]*(x**b) = A*(x^b),

where A=exp(a).

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

03-23-2016 09:12 PM

Thanks to both ... I changed everything into Log10(y) vs Log10(x) - May lvm explain to me a bit more how to calculate the value then perhaps on a hand writing picture as its confusing with too many characters ;-))

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

Posted in reply to jackice

03-23-2016 09:15 PM

from the sas Regression Log10(y) vs Log10(x)

My new Intercept is 0.00036 (sas output)

My new slope is 1.0075 (sas output)

...Im dreaming of an example calculation on these value PLEASE...will never thank enough ;-0)

My new Intercept is 0.00036 (sas output)

My new slope is 1.0075 (sas output)

...Im dreaming of an example calculation on these value PLEASE...will never thank enough ;-0)

Solution

03-24-2016
12:12 AM

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

Posted in reply to jackice

03-23-2016 10:00 PM

I would suggest you try and we'll be happy to help. @lvm has laid out the calculation - replace the a with your intercept value and b with your slope. X is your independent variable.

The following is the formula in SAS (**=exponent)

`Y = a*(x**B);`

I would also recommend doing it via a data step so you can trace it out if required.

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

Posted in reply to Reeza

03-24-2016 10:18 AM

Here is a clarification to Reeza's post. If a is the intercept from the log(y):log(x) regression, then y is given by

y = (10**a)*(x**b)

if one is using base 10. If one is using base e (natural log), then it is:

y = (e**a)*(x**b)

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

03-24-2016 11:00 AM

Thank you kindly

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

Posted in reply to jackice

03-24-2016 11:03 AM

@jackice @lvm has the correct answer, not me...if you can change it.

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

Posted in reply to Reeza

03-24-2016 11:07 AM

Don’t worry - Im the one reaching out - case closed Tks