Home All Groups Group Topic Archive Search About

Problems using LinRegR2

Author
17 Aug 2006 7:20 PM
Ash
Hi All,

I'm currently trying to use LinRegSlope as follows:

LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)

I would like to regress the growth_avg measure against the following
series (1,2,3,...,60).  So, essentially I'm regressing against a time
series from 1 to 60.  I cannot seem to figure out how to fill in the
question marks with a set of numbers going from 1 to 60.

Any help would be appreciated.

Author
17 Aug 2006 10:26 PM
Arnie Rowland
I'm a little confused about your request.

It would help us better assist you if you could include table DDL, query strategy used so far, sample data in the form of INSERT statements, and an illustration of the desired results. (For help with that refer to: http://www.aspfaq.com/5006 )



The less 'set up' work we have to do, the more likely you are going to have folks tackle your problem and help you. Without this effort from you, we are just playing guessing games.


Is it that you want to execute LinRegR2 in a loop, 60 times, each time with an increasing value in the last position? Or do you want to replace the question marks with a comma delimited series of numbers, i.e., 1,2,3,4,5...?

Perhaps something like this:

DECLARE Counter int
SET Counter = 1

WHILE Counter <= 60
   BEGIN
      EXECUTE LinRegR2(lastperiods(60), [Measures].[Growth_Avg], Counter)
      SET Counter = ( Counter + 1 )
   END

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


Show quote
"Ash" <ashv***@gmail.com> wrote in message news:1155842409.256941.221370@h48g2000cwc.googlegroups.com...
> Hi All,
>
> I'm currently trying to use LinRegSlope as follows:
>
> LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)
>
> I would like to regress the growth_avg measure against the following
> series (1,2,3,...,60).  So, essentially I'm regressing against a time
> series from 1 to 60.  I cannot seem to figure out how to fill in the
> question marks with a set of numbers going from 1 to 60.
>
> Any help would be appreciated.
>
Author
18 Aug 2006 12:58 PM
Ash
Hi Arnie,

Thanks for your response.

Yes, I would like to replace the question marks with a comma delimited
series of numbers(1,2,3,...,60).  Is it as simple as that?  Can I
simply enter in manually the series from 1 to 60?

Thanks



Arnie Rowland wrote:
Show quote
> I'm a little confused about your request.
>
> It would help us better assist you if you could include table DDL, query strategy used so far, sample data in the form of INSERT statements, and an illustration of the desired results. (For help with that refer to: http://www.aspfaq.com/5006 )
>
>
>
> The less 'set up' work we have to do, the more likely you are going to have folks tackle your problem and help you. Without this effort from you, we are just playing guessing games.
>
>
> Is it that you want to execute LinRegR2 in a loop, 60 times, each time with an increasing value in the last position? Or do you want to replace the question marks with a comma delimited series of numbers, i.e., 1,2,3,4,5...?
>
> Perhaps something like this:
>
> DECLARE Counter int
> SET Counter = 1
>
> WHILE Counter <= 60
>    BEGIN
>       EXECUTE LinRegR2(lastperiods(60), [Measures].[Growth_Avg], Counter)
>       SET Counter = ( Counter + 1 )
>    END
>
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
>
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
>
> "Ash" <ashv***@gmail.com> wrote in message news:1155842409.256941.221370@h48g2000cwc.googlegroups.com...
> > Hi All,
> >
> > I'm currently trying to use LinRegSlope as follows:
> >
> > LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)
> >
> > I would like to regress the growth_avg measure against the following
> > series (1,2,3,...,60).  So, essentially I'm regressing against a time
> > series from 1 to 60.  I cannot seem to figure out how to fill in the
> > question marks with a set of numbers going from 1 to 60.
> >
> > Any help would be appreciated.
> >
> ------=_NextPart_000_0AE6_01C6C211.8268B2D0
> Content-Type: text/html; charset=iso-8859-1
> Content-Transfer-Encoding: quoted-printable
> X-Google-AttachSize: 4199
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
> <META content="MSHTML 6.00.5296.0" name=GENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY>
> <DIV><FONT face=Arial size=2>I'm a little confused about your
> request.</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV>
> <P class=MsoNormal
> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: yes">It
> would help us better assist you if you could include table DDL, query strategy
> used so far, sample data in the form of INSERT statements, and an illustration
> of the desired results. (For help with that refer to: http://www.aspfaq.com/5006
> ) <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office"
> /><o:p></o:p></SPAN></P>
> <P class=MsoNormal
> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
> <P class=MsoNormal
> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof: yes">The
> less 'set up' work we have to do, the more likely you are going to have folks
> tackle your problem and help you. Without this effort from you, we are just
> playing guessing games. <o:p></o:p></SPAN></P></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>Is it that you want to execute LinRegR2 in a loop,
> 60 times, each time with an increasing value in the last position? Or do you
> want to replace the question marks with a comma delimited series of numbers,
> i.e., 1,2,3,4,5...?</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>Perhaps&nbsp;something like this:</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face="Courier New" size=2>DECLARE Counter int</FONT></DIV>
> <DIV><FONT face="Courier New" size=2>SET Counter = 1</FONT></DIV>
> <DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face="Courier New" size=2>WHILE Counter &lt;= 60</FONT></DIV>
> <DIV><FONT face="Courier New" size=2>&nbsp;&nbsp; BEGIN</FONT></DIV>
> <DIV><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXECUTE
> LinRegR2(lastperiods(60), [Measures].[Growth_Avg],
> Counter)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET Counter = ( Counter + 1
> )</FONT></DIV>
> <DIV><FONT face="Courier New" size=2>&nbsp;&nbsp; END</FONT></DIV>
> <DIV><BR><FONT face=Arial size=2>-- <BR>Arnie Rowland, Ph.D.<BR>Westwood
> Consulting, Inc</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>Most good judgment comes from experience. <BR>Most
> experience comes from bad judgment. <BR>- Anonymous</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>"Ash" &lt;</FONT><A
> href="mailto:ashv***@gmail.com"><FONT face=Arial
> size=2>ashv***@gmail.com</FONT></A><FONT face=Arial size=2>&gt; wrote in message
> </FONT><A
> href="news:1155842409.256941.221***@h48g2000cwc.googlegroups.com"><FONT
> face=Arial
> size=2>news:1155842409.256941.221370@h48g2000cwc.googlegroups.com</FONT></A><FONT
> face=Arial size=2>...</FONT></DIV><FONT face=Arial size=2>&gt; Hi All,<BR>&gt;
> <BR>&gt; I'm currently trying to use LinRegSlope as follows:<BR>&gt; <BR>&gt;
> LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)<BR>&gt; <BR>&gt; I
> would like to regress the growth_avg measure against the following<BR>&gt;
> series (1,2,3,...,60).&nbsp; So, essentially I'm regressing against a
> time<BR>&gt; series from 1 to 60.&nbsp; I cannot seem to figure out how to fill
> in the<BR>&gt; question marks with a set of numbers going from 1 to 60.<BR>&gt;
> <BR>&gt; Any help would be appreciated.<BR>&gt;</FONT></BODY></HTML>
>
> ------=_NextPart_000_0AE6_01C6C211.8268B2D0--
Author
18 Aug 2006 5:00 PM
Arnie Rowland
Unfortunately, it's not quite that simple.

Can you provide the code for LinRegR2()?

I suspect that it may be possible to pass a parameter indicating 'number of
periods', and the 'looping' can occur in the procedure/function.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


Show quote
"Ash" <ashv***@gmail.com> wrote in message
news:1155905892.104941.276690@74g2000cwt.googlegroups.com...
> Hi Arnie,
>
> Thanks for your response.
>
> Yes, I would like to replace the question marks with a comma delimited
> series of numbers(1,2,3,...,60).  Is it as simple as that?  Can I
> simply enter in manually the series from 1 to 60?
>
> Thanks
>
>
>
> Arnie Rowland wrote:
>> I'm a little confused about your request.
>>
>> It would help us better assist you if you could include table DDL, query
>> strategy used so far, sample data in the form of INSERT statements, and
>> an illustration of the desired results. (For help with that refer to:
>> http://www.aspfaq.com/5006 )
>>
>>
>>
>> The less 'set up' work we have to do, the more likely you are going to
>> have folks tackle your problem and help you. Without this effort from
>> you, we are just playing guessing games.
>>
>>
>> Is it that you want to execute LinRegR2 in a loop, 60 times, each time
>> with an increasing value in the last position? Or do you want to replace
>> the question marks with a comma delimited series of numbers, i.e.,
>> 1,2,3,4,5...?
>>
>> Perhaps something like this:
>>
>> DECLARE Counter int
>> SET Counter = 1
>>
>> WHILE Counter <= 60
>>    BEGIN
>>       EXECUTE LinRegR2(lastperiods(60), [Measures].[Growth_Avg], Counter)
>>       SET Counter = ( Counter + 1 )
>>    END
>>
>> --
>> Arnie Rowland, Ph.D.
>> Westwood Consulting, Inc
>>
>> Most good judgment comes from experience.
>> Most experience comes from bad judgment.
>> - Anonymous
>>
>>
>> "Ash" <ashv***@gmail.com> wrote in message
>> news:1155842409.256941.221370@h48g2000cwc.googlegroups.com...
>> > Hi All,
>> >
>> > I'm currently trying to use LinRegSlope as follows:
>> >
>> > LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)
>> >
>> > I would like to regress the growth_avg measure against the following
>> > series (1,2,3,...,60).  So, essentially I'm regressing against a time
>> > series from 1 to 60.  I cannot seem to figure out how to fill in the
>> > question marks with a set of numbers going from 1 to 60.
>> >
>> > Any help would be appreciated.
>> >
>> ------=_NextPart_000_0AE6_01C6C211.8268B2D0
>> Content-Type: text/html; charset=iso-8859-1
>> Content-Transfer-Encoding: quoted-printable
>> X-Google-AttachSize: 4199
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>> <HTML><HEAD>
>> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
>> <META content="MSHTML 6.00.5296.0" name=GENERATOR>
>> <STYLE></STYLE>
>> </HEAD>
>> <BODY>
>> <DIV><FONT face=Arial size=2>I'm a little confused about your
>> request.</FONT></DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV>
>> <P class=MsoNormal
>> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
>> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof:
>> yes">It
>> would help us better assist you if you could include table DDL, query
>> strategy
>> used so far, sample data in the form of INSERT statements, and an
>> illustration
>> of the desired results. (For help with that refer to:
>> http://www.aspfaq.com/5006
>> ) <?xml:namespace prefix = o ns =
>> "urn:schemas-microsoft-com:office:office"
>> /><o:p></o:p></SPAN></P>
>> <P class=MsoNormal
>> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
>> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof:
>> yes"><o:p>&nbsp;</o:p></SPAN></P>
>> <P class=MsoNormal
>> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
>> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof:
>> yes">The
>> less 'set up' work we have to do, the more likely you are going to have
>> folks
>> tackle your problem and help you. Without this effort from you, we are
>> just
>> playing guessing games. <o:p></o:p></SPAN></P></DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face=Arial size=2>Is it that you want to execute LinRegR2 in a
>> loop,
>> 60 times, each time with an increasing value in the last position? Or do
>> you
>> want to replace the question marks with a comma delimited series of
>> numbers,
>> i.e., 1,2,3,4,5...?</FONT></DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face=Arial size=2>Perhaps&nbsp;something like
>> this:</FONT></DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face="Courier New" size=2>DECLARE Counter int</FONT></DIV>
>> <DIV><FONT face="Courier New" size=2>SET Counter = 1</FONT></DIV>
>> <DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face="Courier New" size=2>WHILE Counter &lt;= 60</FONT></DIV>
>> <DIV><FONT face="Courier New" size=2>&nbsp;&nbsp; BEGIN</FONT></DIV>
>> <DIV><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>> EXECUTE
>> LinRegR2(lastperiods(60), [Measures].[Growth_Avg],
>> Counter)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET Counter = ( Counter + 1
>> )</FONT></DIV>
>> <DIV><FONT face="Courier New" size=2>&nbsp;&nbsp; END</FONT></DIV>
>> <DIV><BR><FONT face=Arial size=2>-- <BR>Arnie Rowland, Ph.D.<BR>Westwood
>> Consulting, Inc</FONT></DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face=Arial size=2>Most good judgment comes from experience.
>> <BR>Most
>> experience comes from bad judgment. <BR>- Anonymous</FONT></DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face=Arial size=2>"Ash" &lt;</FONT><A
>> href="mailto:ashv***@gmail.com"><FONT face=Arial
>> size=2>ashv***@gmail.com</FONT></A><FONT face=Arial size=2>&gt; wrote in
>> message
>> </FONT><A
>> href="news:1155842409.256941.221***@h48g2000cwc.googlegroups.com"><FONT
>> face=Arial
>> size=2>news:1155842409.256941.221370@h48g2000cwc.googlegroups.com</FONT></A><FONT
>> face=Arial size=2>...</FONT></DIV><FONT face=Arial size=2>&gt; Hi
>> All,<BR>&gt;
>> <BR>&gt; I'm currently trying to use LinRegSlope as follows:<BR>&gt;
>> <BR>&gt;
>> LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)<BR>&gt;
>> <BR>&gt; I
>> would like to regress the growth_avg measure against the
>> following<BR>&gt;
>> series (1,2,3,...,60).&nbsp; So, essentially I'm regressing against a
>> time<BR>&gt; series from 1 to 60.&nbsp; I cannot seem to figure out how
>> to fill
>> in the<BR>&gt; question marks with a set of numbers going from 1 to
>> 60.<BR>&gt;
>> <BR>&gt; Any help would be appreciated.<BR>&gt;</FONT></BODY></HTML>
>>
>> ------=_NextPart_000_0AE6_01C6C211.8268B2D0--
>
Author
18 Aug 2006 5:16 PM
Tom Cooper
Since LinRegR2 is an Analysis Services function, you probably should try
posting this question in microsoft.public.sqlserver.olap.

Tom

Show quote
"Ash" <ashv***@gmail.com> wrote in message
news:1155905892.104941.276690@74g2000cwt.googlegroups.com...
> Hi Arnie,
>
> Thanks for your response.
>
> Yes, I would like to replace the question marks with a comma delimited
> series of numbers(1,2,3,...,60).  Is it as simple as that?  Can I
> simply enter in manually the series from 1 to 60?
>
> Thanks
>
>
>
> Arnie Rowland wrote:
>> I'm a little confused about your request.
>>
>> It would help us better assist you if you could include table DDL, query
>> strategy used so far, sample data in the form of INSERT statements, and
>> an illustration of the desired results. (For help with that refer to:
>> http://www.aspfaq.com/5006 )
>>
>>
>>
>> The less 'set up' work we have to do, the more likely you are going to
>> have folks tackle your problem and help you. Without this effort from
>> you, we are just playing guessing games.
>>
>>
>> Is it that you want to execute LinRegR2 in a loop, 60 times, each time
>> with an increasing value in the last position? Or do you want to replace
>> the question marks with a comma delimited series of numbers, i.e.,
>> 1,2,3,4,5...?
>>
>> Perhaps something like this:
>>
>> DECLARE Counter int
>> SET Counter = 1
>>
>> WHILE Counter <= 60
>>    BEGIN
>>       EXECUTE LinRegR2(lastperiods(60), [Measures].[Growth_Avg], Counter)
>>       SET Counter = ( Counter + 1 )
>>    END
>>
>> --
>> Arnie Rowland, Ph.D.
>> Westwood Consulting, Inc
>>
>> Most good judgment comes from experience.
>> Most experience comes from bad judgment.
>> - Anonymous
>>
>>
>> "Ash" <ashv***@gmail.com> wrote in message
>> news:1155842409.256941.221370@h48g2000cwc.googlegroups.com...
>> > Hi All,
>> >
>> > I'm currently trying to use LinRegSlope as follows:
>> >
>> > LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)
>> >
>> > I would like to regress the growth_avg measure against the following
>> > series (1,2,3,...,60).  So, essentially I'm regressing against a time
>> > series from 1 to 60.  I cannot seem to figure out how to fill in the
>> > question marks with a set of numbers going from 1 to 60.
>> >
>> > Any help would be appreciated.
>> >
>> ------=_NextPart_000_0AE6_01C6C211.8268B2D0
>> Content-Type: text/html; charset=iso-8859-1
>> Content-Transfer-Encoding: quoted-printable
>> X-Google-AttachSize: 4199
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>> <HTML><HEAD>
>> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
>> <META content="MSHTML 6.00.5296.0" name=GENERATOR>
>> <STYLE></STYLE>
>> </HEAD>
>> <BODY>
>> <DIV><FONT face=Arial size=2>I'm a little confused about your
>> request.</FONT></DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV>
>> <P class=MsoNormal
>> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
>> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof:
>> yes">It
>> would help us better assist you if you could include table DDL, query
>> strategy
>> used so far, sample data in the form of INSERT statements, and an
>> illustration
>> of the desired results. (For help with that refer to:
>> http://www.aspfaq.com/5006
>> ) <?xml:namespace prefix = o ns =
>> "urn:schemas-microsoft-com:office:office"
>> /><o:p></o:p></SPAN></P>
>> <P class=MsoNormal
>> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
>> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof:
>> yes"><o:p>&nbsp;</o:p></SPAN></P>
>> <P class=MsoNormal
>> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
>> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof:
>> yes">The
>> less 'set up' work we have to do, the more likely you are going to have
>> folks
>> tackle your problem and help you. Without this effort from you, we are
>> just
>> playing guessing games. <o:p></o:p></SPAN></P></DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face=Arial size=2>Is it that you want to execute LinRegR2 in a
>> loop,
>> 60 times, each time with an increasing value in the last position? Or do
>> you
>> want to replace the question marks with a comma delimited series of
>> numbers,
>> i.e., 1,2,3,4,5...?</FONT></DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face=Arial size=2>Perhaps&nbsp;something like
>> this:</FONT></DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face="Courier New" size=2>DECLARE Counter int</FONT></DIV>
>> <DIV><FONT face="Courier New" size=2>SET Counter = 1</FONT></DIV>
>> <DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face="Courier New" size=2>WHILE Counter &lt;= 60</FONT></DIV>
>> <DIV><FONT face="Courier New" size=2>&nbsp;&nbsp; BEGIN</FONT></DIV>
>> <DIV><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>> EXECUTE
>> LinRegR2(lastperiods(60), [Measures].[Growth_Avg],
>> Counter)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET Counter = ( Counter + 1
>> )</FONT></DIV>
>> <DIV><FONT face="Courier New" size=2>&nbsp;&nbsp; END</FONT></DIV>
>> <DIV><BR><FONT face=Arial size=2>-- <BR>Arnie Rowland, Ph.D.<BR>Westwood
>> Consulting, Inc</FONT></DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face=Arial size=2>Most good judgment comes from experience.
>> <BR>Most
>> experience comes from bad judgment. <BR>- Anonymous</FONT></DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>> <DIV><FONT face=Arial size=2>"Ash" &lt;</FONT><A
>> href="mailto:ashv***@gmail.com"><FONT face=Arial
>> size=2>ashv***@gmail.com</FONT></A><FONT face=Arial size=2>&gt; wrote in
>> message
>> </FONT><A
>> href="news:1155842409.256941.221***@h48g2000cwc.googlegroups.com"><FONT
>> face=Arial
>> size=2>news:1155842409.256941.221370@h48g2000cwc.googlegroups.com</FONT></A><FONT
>> face=Arial size=2>...</FONT></DIV><FONT face=Arial size=2>&gt; Hi
>> All,<BR>&gt;
>> <BR>&gt; I'm currently trying to use LinRegSlope as follows:<BR>&gt;
>> <BR>&gt;
>> LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)<BR>&gt;
>> <BR>&gt; I
>> would like to regress the growth_avg measure against the
>> following<BR>&gt;
>> series (1,2,3,...,60).&nbsp; So, essentially I'm regressing against a
>> time<BR>&gt; series from 1 to 60.&nbsp; I cannot seem to figure out how
>> to fill
>> in the<BR>&gt; question marks with a set of numbers going from 1 to
>> 60.<BR>&gt;
>> <BR>&gt; Any help would be appreciated.<BR>&gt;</FONT></BODY></HTML>
>>
>> ------=_NextPart_000_0AE6_01C6C211.8268B2D0--
>
Author
18 Aug 2006 7:34 PM
Arnie Rowland
Duh...

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


Show quote
"Tom Cooper" <tom.no.spam.please.cooper@comcast.net> wrote in message
news:NPSdnbPY7_ZyaHjZnZ2dnUVZ_vWdnZ2d@comcast.com...
> Since LinRegR2 is an Analysis Services function, you probably should try
> posting this question in microsoft.public.sqlserver.olap.
>
> Tom
>
> "Ash" <ashv***@gmail.com> wrote in message
> news:1155905892.104941.276690@74g2000cwt.googlegroups.com...
>> Hi Arnie,
>>
>> Thanks for your response.
>>
>> Yes, I would like to replace the question marks with a comma delimited
>> series of numbers(1,2,3,...,60).  Is it as simple as that?  Can I
>> simply enter in manually the series from 1 to 60?
>>
>> Thanks
>>
>>
>>
>> Arnie Rowland wrote:
>>> I'm a little confused about your request.
>>>
>>> It would help us better assist you if you could include table DDL, query
>>> strategy used so far, sample data in the form of INSERT statements, and
>>> an illustration of the desired results. (For help with that refer to:
>>> http://www.aspfaq.com/5006 )
>>>
>>>
>>>
>>> The less 'set up' work we have to do, the more likely you are going to
>>> have folks tackle your problem and help you. Without this effort from
>>> you, we are just playing guessing games.
>>>
>>>
>>> Is it that you want to execute LinRegR2 in a loop, 60 times, each time
>>> with an increasing value in the last position? Or do you want to replace
>>> the question marks with a comma delimited series of numbers, i.e.,
>>> 1,2,3,4,5...?
>>>
>>> Perhaps something like this:
>>>
>>> DECLARE Counter int
>>> SET Counter = 1
>>>
>>> WHILE Counter <= 60
>>>    BEGIN
>>>       EXECUTE LinRegR2(lastperiods(60), [Measures].[Growth_Avg],
>>> Counter)
>>>       SET Counter = ( Counter + 1 )
>>>    END
>>>
>>> --
>>> Arnie Rowland, Ph.D.
>>> Westwood Consulting, Inc
>>>
>>> Most good judgment comes from experience.
>>> Most experience comes from bad judgment.
>>> - Anonymous
>>>
>>>
>>> "Ash" <ashv***@gmail.com> wrote in message
>>> news:1155842409.256941.221370@h48g2000cwc.googlegroups.com...
>>> > Hi All,
>>> >
>>> > I'm currently trying to use LinRegSlope as follows:
>>> >
>>> > LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)
>>> >
>>> > I would like to regress the growth_avg measure against the following
>>> > series (1,2,3,...,60).  So, essentially I'm regressing against a time
>>> > series from 1 to 60.  I cannot seem to figure out how to fill in the
>>> > question marks with a set of numbers going from 1 to 60.
>>> >
>>> > Any help would be appreciated.
>>> >
>>> ------=_NextPart_000_0AE6_01C6C211.8268B2D0
>>> Content-Type: text/html; charset=iso-8859-1
>>> Content-Transfer-Encoding: quoted-printable
>>> X-Google-AttachSize: 4199
>>>
>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>>> <HTML><HEAD>
>>> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
>>> <META content="MSHTML 6.00.5296.0" name=GENERATOR>
>>> <STYLE></STYLE>
>>> </HEAD>
>>> <BODY>
>>> <DIV><FONT face=Arial size=2>I'm a little confused about your
>>> request.</FONT></DIV>
>>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>>> <DIV>
>>> <P class=MsoNormal
>>> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
>>> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof:
>>> yes">It
>>> would help us better assist you if you could include table DDL, query
>>> strategy
>>> used so far, sample data in the form of INSERT statements, and an
>>> illustration
>>> of the desired results. (For help with that refer to:
>>> http://www.aspfaq.com/5006
>>> ) <?xml:namespace prefix = o ns =
>>> "urn:schemas-microsoft-com:office:office"
>>> /><o:p></o:p></SPAN></P>
>>> <P class=MsoNormal
>>> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
>>> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof:
>>> yes"><o:p>&nbsp;</o:p></SPAN></P>
>>> <P class=MsoNormal
>>> style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
>>> style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-no-proof:
>>> yes">The
>>> less 'set up' work we have to do, the more likely you are going to have
>>> folks
>>> tackle your problem and help you. Without this effort from you, we are
>>> just
>>> playing guessing games. <o:p></o:p></SPAN></P></DIV>
>>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>>> <DIV><FONT face=Arial size=2>Is it that you want to execute LinRegR2 in
>>> a loop,
>>> 60 times, each time with an increasing value in the last position? Or do
>>> you
>>> want to replace the question marks with a comma delimited series of
>>> numbers,
>>> i.e., 1,2,3,4,5...?</FONT></DIV>
>>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>>> <DIV><FONT face=Arial size=2>Perhaps&nbsp;something like
>>> this:</FONT></DIV>
>>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>>> <DIV><FONT face="Courier New" size=2>DECLARE Counter int</FONT></DIV>
>>> <DIV><FONT face="Courier New" size=2>SET Counter = 1</FONT></DIV>
>>> <DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
>>> <DIV><FONT face="Courier New" size=2>WHILE Counter &lt;= 60</FONT></DIV>
>>> <DIV><FONT face="Courier New" size=2>&nbsp;&nbsp; BEGIN</FONT></DIV>
>>> <DIV><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>>> EXECUTE
>>> LinRegR2(lastperiods(60), [Measures].[Growth_Avg],
>>> Counter)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET Counter = ( Counter + 1
>>> )</FONT></DIV>
>>> <DIV><FONT face="Courier New" size=2>&nbsp;&nbsp; END</FONT></DIV>
>>> <DIV><BR><FONT face=Arial size=2>-- <BR>Arnie Rowland, Ph.D.<BR>Westwood
>>> Consulting, Inc</FONT></DIV>
>>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>>> <DIV><FONT face=Arial size=2>Most good judgment comes from experience.
>>> <BR>Most
>>> experience comes from bad judgment. <BR>- Anonymous</FONT></DIV>
>>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>>> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
>>> <DIV><FONT face=Arial size=2>"Ash" &lt;</FONT><A
>>> href="mailto:ashv***@gmail.com"><FONT face=Arial
>>> size=2>ashv***@gmail.com</FONT></A><FONT face=Arial size=2>&gt; wrote in
>>> message
>>> </FONT><A
>>> href="news:1155842409.256941.221***@h48g2000cwc.googlegroups.com"><FONT
>>> face=Arial
>>> size=2>news:1155842409.256941.221370@h48g2000cwc.googlegroups.com</FONT></A><FONT
>>> face=Arial size=2>...</FONT></DIV><FONT face=Arial size=2>&gt; Hi
>>> All,<BR>&gt;
>>> <BR>&gt; I'm currently trying to use LinRegSlope as follows:<BR>&gt;
>>> <BR>&gt;
>>> LinRegR2(lastperiods(60), [Measures].[Growth_Avg], ?????)<BR>&gt;
>>> <BR>&gt; I
>>> would like to regress the growth_avg measure against the
>>> following<BR>&gt;
>>> series (1,2,3,...,60).&nbsp; So, essentially I'm regressing against a
>>> time<BR>&gt; series from 1 to 60.&nbsp; I cannot seem to figure out how
>>> to fill
>>> in the<BR>&gt; question marks with a set of numbers going from 1 to
>>> 60.<BR>&gt;
>>> <BR>&gt; Any help would be appreciated.<BR>&gt;</FONT></BODY></HTML>
>>>
>>> ------=_NextPart_000_0AE6_01C6C211.8268B2D0--
>>
>
>

AddThis Social Bookmark Button