Correlation of arrays

K

Kevin199

I would like to calculate and report from my database the correlation for two
number arrays that are pulled from tables in my database. I assume I will
have to kick this into ms excel and run correl() on the arrays and get the
answer back into ms access. I don't know how to do this. Help!
 
J

Jeff Boyce

Calculating the correlation coeffient between two "arrays" makes sense if
you are working with one-dimensional arrays (i.e., lists of values). You
could approach this by exporting two lists to Excel, running Correl(Array1,
Array2), and returning to Access.

Another approach is to reference the Excel object model to gain access (no
pun) to the Correl() function from within Access. The potential difficulty
is that you'd need to provide a way to "feed" the arrays into the function
(and it appears the function only works on cell-addresses -- something that
Access doesn't have.

I'm thinking the first approach is your most like solution. Conceptually,
you'llneed a way to derive the two lists, to automate Excel and stuff the
lists into cells, run Correl(), capture the results, and return to "normal
programming" in Access. I don't have any code handy to do all that, and it
will probably take some time and trouble-shooting to work it through.

Perhaps one of the other newsgroup readers has done this already? ... and
cares to share?

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
A

aaron.kempf

I join arrays in SQL Server all the time.

It's called the split function
www.novicksoftware.com

I don't remember or care what he called it.. I took his function and
renamed it fnSplit so I can do this

Select * from dbo.fnSplit("1,3,5,6", ",") Where Item Not In (Select *
from dbo.fnSplit("1,2,3", ","))

-Aaron
 
B

bcap

Aaron, you're a halfwit. He's not trying to do something as trivial as
that, he's trying to correlate the arrays. Use your brain for once in your
life (or at least Google).


I join arrays in SQL Server all the time.

It's called the split function
www.novicksoftware.com

I don't remember or care what he called it.. I took his function and
renamed it fnSplit so I can do this

Select * from dbo.fnSplit("1,3,5,6", ",") Where Item Not In (Select *
from dbo.fnSplit("1,2,3", ","))

-Aaron
 
A

aaron.kempf

this is something that's not possible with Jet and it could be exactly
what he's trying to do.
At least it would get him closer to what he's looking to do.

I write mortgage applications using SQL Server.
Where you're the kinda idiot that would do it in Excel.

jamming data from Access-->Excel-->Access should never be necessary.
Not for any reason.

So sorry that your database doesn't support fnSplit.

-Aaron
 
J

James A. Fortune

Kevin199 said:
I would like to calculate and report from my database the correlation for two
number arrays that are pulled from tables in my database. I assume I will
have to kick this into ms excel and run correl() on the arrays and get the
answer back into ms access. I don't know how to do this. Help!

Excel is not necessary. See the following post (and the thread to which
it links) for ideas about how to compute least-squares coefficients and
their corresponding correlation coefficient:

http://groups.google.com/group/comp.databases.ms-access/msg/9a648215b934b049

James A. Fortune
(e-mail address removed)
 
B

bcap

this is something that's not possible with Jet and it could be exactly
what he's trying to do.
At least it would get him closer to what he's looking to do.

You clearly don't have the least idea what correlating actually means.
I write mortgage applications using SQL Server.

In your dreams. You couldn't write a mortgage application with a ball-point
pen.
Where you're the kinda idiot that would do it in Excel.

Tell ya what, launch Excel (if you know how) and look up the Correl()
function in Help. It might at least give you a first clue as to what the OP
is trying to do.
jamming data from Access-->Excel-->Access should never be necessary.
Not for any reason.

Still not learned to read then, Aaron? That surprises me, in my country
prisons have literacy classes for poorly-educated felons, is that not so in
your country?
So sorry that your database doesn't support fnSplit.

What database would that be then, oh mighty fount of all that is stupid and
juvenile?
 
A

aaron.kempf

bcap;

I don't know where you get off-- calling me a liar.
I am NOT a felon, thank you very much!

Remember I got those charges DROPPED.

-Aaron
 
A

aaron.kempf

and so sorry that Jet doesn't support the SPLIT function
and so sorry that Jet doesn't support the SPLIT function
and so sorry that Jet doesn't support the SPLIT function
and so sorry that Jet doesn't support the SPLIT function
and so sorry that Jet doesn't support the SPLIT function
and so sorry that Jet doesn't support the SPLIT function
 
J

Jeff Boyce

For the record, be aware that Access, in later versions at least, offers a
Split() function that lets you provide an input string and splits it apart
on the character you designate (e.g., on the ","s for comma-separated
fields).

Also, depending on the definition, "splitting" is the term used to describe
separating the data from all the other components (e.g., splitting the
database).

I'm not sure you need to resort to a custom "splitting" function, since
these are built-in.

And James F. is quite right, you can create a least-squares function to
calculate the correlation, if you understand the statisitics behind the
calculations.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
T

Tony Toews [MVP]

I don't know where you get off-- calling me a liar.
I am NOT a felon, thank you very much!

You may not be a felon as your lawyer got the cyber stalking charge reduced to a
misdemeanor.
Remember I got those charges DROPPED.

Yes, you got the Intimidating a Public Servant charges dropped. But you pleaded
guilty to cyber-stalking.

Start here: http://dw.courts.wa.gov/index.cfm?fa=home.home

Click on Name Search, accept the agreement, and enter Aaron's name.

Look at item #24:
Kempf, Aaron Alexander
Defendant King Co Superior Ct
07-1-05748-6 07-05-2007

Now look at item #27 in the listing:
27 10-25-2007 STTDFG Statement Of Defendant,plea Guilty

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
B

bcap

and so sorry that Jet doesn't support the SPLIT function
and so sorry that Jet doesn't support the SPLIT function
and so sorry that Jet doesn't support the SPLIT function
and so sorry that Jet doesn't support the SPLIT function
and so sorry that Jet doesn't support the SPLIT function
and so sorry that Jet doesn't support the SPLIT function

Question: how do you concatenate the following three strings in any
programming language:

"Aaron"
" is "
"stupid"

Aaron's answer:

Install SQL Server, and submit the following query to it:

SELECT 'Aaron' + ' is ' + 'stupid' AS the_truth
 
A

aaron.kempf

I didn't plead guilty to _ANYTHING_ that they charged me with.

So sorry that you think that you know more about the legal system than
all the judges and attorneys in court.

I am not a felon, I did not plead guilty.

LEGALLY... THE CHARGES NEVER EXISTED
 
J

Jeff Boyce

Tony

Don't argue the law with him ... he's obviously also an expert on this
subject...

Jeff B.
 
A

aaron.kempf

Tony;

you're full of shit.
you don't know what you're talking about.

I never plead guilty to anything.. Especially not anything that they
charged me with!!!!!!!!!!!
I never plead guilty to anything.. Especially not anything that they
charged me with!!!!!!!!!!!
I never plead guilty to anything.. Especially not anything that they
charged me with!!!!!!!!!!!

-Aaron

http://www.pierce.ctc.edu/whamilto/DPHistory.htm

1975 - The Birth of Deferred Prosecution

Deferred prosecution was originally designed as a treatment
alternative to incarceration.
It authorized individuals charged with misdemeanor and gross
misdemeanor offenses to petition the court to have prosecution
deferred if they get treatment for an alcohol, drug, or mental
"problem".
Signed into law by Governor Evans on June 26, 1975.
 
A

aaron.kempf

so sorry that your great victory in court didn't hold!!! maybe you
should try to win battles using your brain, and better arguments-- and
maybe you should drop the whole premise that 'anyone that swears on
the internet is evil'

seriously.. I laugh at you and your failed attempts to promote
censorship on this forum.

**** you Tony.

your actions (following me around, spamming-- harrassing me-- and
building a webpage full of lies) are illegal in many states.

-Aaron
 
T

Tony Toews [MVP]

your actions (following me around, spamming-- harrassing me-- and
building a webpage full of lies) are illegal in many states.

Please, please report me to your local policie department.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tony Toews [MVP]

I never plead guilty to anything.. Especially not anything that they
charged me with!!!!!!!!!!!

There's a gaping difference in meaning between those two sentences.

Your daddy's money paid for the lawyer.s
http://www.pierce.ctc.edu/whamilto/DPHistory.htm

1975 - The Birth of Deferred Prosecution

Deferred prosecution was originally designed as a treatment
alternative to incarceration.
It authorized individuals charged with misdemeanor and gross
misdemeanor offenses to petition the court to have prosecution
deferred if they get treatment for an alcohol, drug, or mental
"problem".

So are you indeed getitng treatment for an alcohol, drug or mental "problem"?

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top