Frank,
Don't really understand your question. Should be no problem to calculate
anything once. Just write your algorithm. The problem comes in when you
try to calculate it for a set of data. SQLite like MySQL doesn't have
SQL 2003/2008 Window Functions. Oracle recently stated they will not be
adding Window Functions to MySQL. That leaves just Oracle, DB2, and
PostgreSQL for Window Functions. I often access my SQLite data from the
GNU R programming language using the RSQLite package. In R you can also
slice and dice your data but it's not as easy as SQL. R is the best for
Statistics. Then, you can write back to the database using UPDATE or
INSERT.
Here's an example from "Demo_R_to_SQLite.R"
========================================
# Load Libraries
require(DBI) # for database
require(RSQLite) # for database
# Connect to Database
drv <- dbDriver("SQLite")
my_sqlite_ex1_RW <- dbConnect(drv, dbname = "my_sqlite_ex1.db",
flags=SQLITE_RW)
my_sqlite_ex2_RO <- dbConnect(drv, dbname = "my_sqlite_ex2.db",
flags=SQLITE_RO)
# Do something --> SQL queries (it's simple to make SQL calls) --> check
the documentation
dbDisconnect(my_sqlite_ex1_RW)
dbDisconnect(my_sqlite_ex2_RO)
dbUnloadDriver(drv)
========================================
Joe Fisher
Oregon State University
--------------------
Would anyone know how to use SQLITE to calculate the streakedness of data?
The definition of streakedness is how many deviations away from the
mean(i.e running average a numerical data streak is Thank you for your help.
A variable R can be used to indicate how many deviations away from the mean
a particular streak is. According to the disclosed embodiment, the level of
a streak can be defined not just in (integer*deviation) distances from the
mean but also as (integer*fraction_of_deviation) distances. To accomplish
this, a variable R-factor can be used. The R-factor indicates the
separation between two successive R-levels in terms of a fraction of the
deviation. By varying the R-factor, streaks can be ranked as required.
However, the "credibility" of the streak should also be considered, and
included in a ranking mechanism. The deviation within the streak is an
obvious measure of how staggered the data is within the streak. A good
streak should be less staggered, or in other words, have less deviation.
For this reason, a very high level streak is considered to be good, even if
its deviation is more than what would normally be desired. Thus, while the
level R influences the ranking positively, the deviation within the streak
influences it negatively.
--------------------
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users