IWKDUDS | 3 Sep 2007 17:56
Picon
Favicon

Deadline Approaching - ACM SAC 2008 - Data Streams Track

*** Deadline Approaching ***

ACM Symposium on Applied Computing
The 23rd Annual ACM Symposium on Applied Computing
in Fortaleza, Ceara, Brazil, March 16 - 20, 2008.

Data Streams Track
http://www.liaad.up.pt/~jgama/SAC08/

Call for Papers
For the past twenty years, the ACM Symposium on Applied Computing has
been a primary gathering forum for applied computer scientists,
computer engineers, software engineers, and application developers
from around the world.  SAC 2008 is sponsored by the ACM Special
Interest Group on Applied Computing, and is hosted by the the
University of Fortaleza (UNIFOR) and the Federal University of Ceara
(UFC).

IMPORTANT DATES
Paper Paper Submission: 8 September, 2007
Paper Author Notification: 16 October, 2007
Paper camera-ready Copy: 30 October, 2007

TOPICS OF INTEREST
We are looking for all possible contributions related to incremental
learning algorithms on data streams. Topics include (but are not
restricted to:

Data Stream Models
Data Stream Management Systems
(Continue reading)

John Pitchard | 3 Sep 2007 20:07

nlminb with more constraints

 
Dear all,
 
Thanks to those that replied to my last mail about nlminb. I have another question related to nlminb. I'm trying to calculate the optimal asset mix of a portfolio - the asset mix proportions are values between 0 and 1 and the sum of the asset mix proportions sum to 1, e.g. if x(1),..., x(n) are asset mix proportions then each 0<=x(i)<=1 and x(1)+...+x(n)=1.
 
I'm trying to minimise the 95th percentile of a calculated distribution (call this PERCENT(95), thus my objective function is to min PERCENT(95)). However, I want the mean of the distribution to be greater than a specific value, e.g. MEAN>=c, where c is some constant.
 
I would like to know how to achieve this using S-Plus? Should I be minimising the following:
 
objective = PERCENT(95) - lambda(MEAN - c)
 
using a Lagrange multiplier.
 
Any help would be much appreciated.
 
Regards,
John
Hillary Robison | 5 Sep 2007 07:02
Picon

MANOVA: specifying contrasts properly

Hi all,

I sent a post out last week, but I forgot to leave my e-mail address
(hrobison <at> unr.nevada.edu).  In case any of you have insights into my question,
I am re-sending my post.

I having trouble specifying MANOVA (in the GUI of S-plus 6.2) that allows the
contrasts I'd like.

I was hoping the MANOVA would let me test for differences among levels of "Pop"
(my X variable with 32 levels) with respect to my repeated measurements for
each "Pop", my Ys ("logk2.k1", "logk3.k1", "logk4.k1", "logk5.k1", "logk6.k1",
"logk7.k1", "logk8.k1", "logk9.k1", "logk10.k1", "logk11.k1").  My Ys were
measured 5 times in each "Pop."  The output gives me an overall p-value for
"Pop", but does not give me p-values for the contrasts among my levels of
"Pop."

How do I specify this?

What I did in the S-plus GUI was:

Statisitics -> Multivariate -> MANOVA dialog box

In the "Model" tab of the MANOVA dialog box I specified:
Dataset: group
Formula : cbind(logk2.k1, logk3.k1, logk4.k1, logk5.k1, logk6.k1, logk7.k1,
logk8.k1, logk9.k1, logk10.k1, logk11.k1) ~ Pop

In the "Options" tab of the MANOVA dialog box I specified:
Assign Contrast: Helmert
to Variables: Pop
Contrasts: Pop=contr.helmert

In the "Results" tab of the MANOVA dialog box I specified:
Short Output
ANOVA Table
Testing with "pillai"
Estimated Coefficients
Estimated K Coef. for K-level Factor
Save In: group
Fitted Values
Residuals

The Report gives me:

Call:  manova(formula = cbind(logk2.k1, logk3.k1, logk4.k1, logk5.k1, logk6.k1,
logk7.k1, logk8.k1, logk9.k1, logk10.k1, logk11.k1) ~ Pop, data = clusters,
contrasts = list(Pop = contr.helmert), na.action = na.exclude)

Terms:
                Pop Residuals
Deg. of Freedom  32       132

Estimated effects are balanced

Analysis of Variance Table:
           Df Pillai Trace approx. F num df    den df    P-value
      Pop 32  4.426        3.275       320      1320         0
Residuals 132

Followed by the estimated coefficients for "logk2.k1", "logk3.k1", "logk4.k1",
"logk5.k1", "logk6.k1", "logk7.k1", "logk8.k1", "logk9.k1", "logk10.k1",
"logk11.k1" for each "Pop."

Thank you for your thoughts on this.

Hillary Robison (hrobison <at> unr.nevada.edu)
--------------------------------------------------------------------
This message was distributed by s-news <at> lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request <at> lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news

David L Lorenz | 5 Sep 2007 15:46
Picon
Favicon

Re: Making a Graphsheet Page Active


Walt,
  There was a thread related to your question a little while ago. The major conclusion was that it is not clear how to manage pages in graphsheets.
  The best advice that I can give now is to set up a graphics device that will create output files in the format that you want and not create a graph window.
Dave



"Walter R. Paczkowski" <dataanalytics <at> earthlink.net>
Sent by: s-news-owner <at> lists.biostat.wustl.edu

08/31/2007 04:18 PM

To
s-news <at> lists.biostat.wustl.edu
cc
Subject
[S] Making a Graphsheet Page Active





Hi,

I wrote a function that generates 50 graphs at once in one graphsheet called GSD2.  I often do this and then export the pages to PowerPoint using the Create PowerPoint option from the graph window menu.  This time, however, I wanted to export the pages in GSD2 using the export.graph function inside another function.  The problem that I have is that the export.graph function only exports the active page, which certainly may not be the page I want.  How do I activate a page programmatically inside a function so that repeated calls to export.graph will export the pages one at a time?

Thanks,

Walt Paczkowski

_________________________________

Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ  08536
(V) 609-936-8999
(F) 609-936-3733

Richard M. Heiberger | 5 Sep 2007 20:02
Picon
Favicon

Re: Making a Graphsheet Page Active

You can probably build something based on the GSremove function
in the HH library

### remove graph sheet pages, equivalent to right-click delete on the tab.
###  GSremove(c(3,4,5,6,8,9,12,13))

GSremove <- function(pages, sheet="GSD2$Page")
  for (i in paste(sheet, pages, sep=""))
  guiRemove( "GraphSheetPage", Name = i, ShiftLeft = F)
--------------------------------------------------------------------
This message was distributed by s-news <at> lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request <at> lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news

Thompson, David (MNR | 6 Sep 2007 20:19
Picon
Favicon

Re: Making a Graphsheet Page Active

################################
"Walter R. Paczkowski" <dataanalytics <at> earthlink.net> 
Sent by: s-news-owner <at> lists.biostat.wustl.edu 08/31/2007 04:18 PM 
To		s-news <at> lists.biostat.wustl.edu 
cc	
Subject	[S] Making a Graphsheet Page Active

Hi,

I wrote a function that generates 50 graphs at once in one graphsheet
called GSD2.  I often do this and then export the pages to PowerPoint
using the Create PowerPoint option from the graph window menu.  This
time, however, I wanted to export the pages in GSD2 using the
export.graph function inside another function.  The problem that I have
is that the export.graph function only exports the active page, which
certainly may not be the page I want.  How do I activate a page
programmatically inside a function so that repeated calls to
export.graph will export the pages one at a time?

Thanks,

Walt Paczkowski 
_________________________________
Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ  08536
(V) 609-936-8999
(F) 609-936-3733

################################
Walt,

Here are a pair of scripts that may have the functionality you seek:

###
#
gspexport <- function(prefix='', ext='.wmf', extype='WMF'){
	# Export all pages on current graphsheet to individual WMF
files.
	# can't remember why, but need to reassign passed parameters to
local vars
	prefix <- prefix ; ext <- ext ; extype <- extype
	# gsname is graphsheetpage names
	gsname <- list(guiGetObjectNames('GraphSheetPage',
guiGetGSName()))
	# pname is graphsheetpage names trimmed of the leading '$$' (if
memory serves)
	pname <- lapply(gsname, function(i) substring(i,
nchar(guiGetGSName())+2) )
	# fname is output file names
	fname <- lapply(pname, function(i, x, y) paste(x, i, y, sep=''),
x  = prefix, y = ext)
	
	# for each graphsheet name in gsname . . .
	lapply(1:length(gsname[[1]]), function(i, x, y, z){
		# . . . activate desired graphsheetpage . . .
		guiModify('GraphSheet', Name=guiGetGSName(),
CurrentPage=x[[1]][i])
		# . . . and export active graphsheetpage to file with
same name plus extension.
		export.graph(FileName=y[[1]][i], Name=guiGetGSName(),
ExportType=z)
		}, x = pname, y = fname, z = extype)
}	#	gspexport(prefix='', ext='', extype='')
#
###

###
#
gsprename <- function(){
	# Rename all pages on current graphsheet to new graphsheetpage
names hard-coded into pname[[2]].
	gsname <- list(guiGetObjectNames('GraphSheetPage',
guiGetGSName()))
	pname <- lapply(gsname, function(x) substring(x,
nchar(guiGetGSName())+2) )
	# matching length list of arbitrary new graphsheetpage names
hard-coded to suit.
	pname[[2]] <- c('L00', 'L04', 'bd00', 'bd04', 'ht00', 'ht04',
'r00', 'r04', 'rhg00', 'rhg04', 'vol00', 'vol04', 'vph00', 'vph04')

	# change the name of a page
	lapply(1:length(gsname[[1]]), function(i, x)
		guiModify( 'GraphSheetPage', Name = x[[1]][i], NewName =
x[[2]][i])
		, x = pname)
	invisible()
}	#	gsprename()
#
###

This little sequence has been handy for exploring classes available and
their arguments and properties:
###
# list ALL arguments for all gui classes, then property names
	xxx <- guiGetClassNames()
	names(xxx) <- guiGetClassNames()
	lapply(xxx, function(x) {guiGetArgumentNames(x)})
	lapply(xxx, function(x) {guiGetPropertyNames(x)})
#
###

All this I derived from an awesome post by Tony Plate . . .
###
# 
http://www.biostat.wustl.edu/archives/cgi-bin/mesg.cgi?a=s-news&i=438478
6F.8000505%40blackmesacapital.com
Subject: 	Re: dev.copy on tabbed graphsheet device
From: 		Tony Plate <tplate <at> blackmesacapital.com>

# The first three functions in this list are what you need to cycle
through the pages in a tabbed graphsheet.
# to get the name of the currently active graphsheet (replace 'GSD2'
below by guiGetGSName())
guiGetGSName()

# to get the names of all the pages in the active graphsheet
guiGetObjectNames('GraphSheetPage', guiGetGSName())

# sets the currently displayed page in a graphsheet
guiModify('GraphSheet', Name=guiGetGSName(), CurrentPage='Page1')

# get the name of a plot (default 1) on a page (default 1) in the
current graphsheet
guiGetPlotName(guiGetGSName(), GraphNum=1, PlotNum=1)

# returns the name of the currently displayed page in the graphsheet
guiGetPropertyValue('GraphSheet', Name=guiGetGSName(), 'CurrentPage')

# set the name of the graphsheet when creating it
graphsheet(Name='FooBar', ...)

# change the name of current graphsheet
guiModify( 'GraphSheet', Name = guiGetGSName(), NewName = 'MyGraph')

# change the name of a page (graphsheet name remains same)
guiModify( 'GraphSheetPage', Name = paste(guiGetGSName(), '1', sep='$'),
NewName = 'MyPage')

# create a new graphsheet page
guiCreate( 'GraphSheetPage', Name = paste(guiGetGSName(), 'Page1',
sep='$'))

# print some pages from a graphsheet (help page says that pages must be
specified as numbers, don't know if this is true)
guiPrint(Name=guiGetGSName(), StartPage=??, EndPage=??)

# saves the whole graphsheet (all pages) in a file
guiSave('GraphSheet', Name=guiGetGSName(), FileName='file.sgr')

# saves the currently active page as an EPS file (many other types are
available)
export.graph(FileName=paste(guiGetGSName(), '.eps', sep='$'),
Name=guiGetGSName(), ExportType='EPS')

# remove the contents of the current page (note that 'Clear' on the
popup-menu on the page tab appears not to work properly)
guiRemoveContents('GraphSheet', Name=guiGetGSName())

# remove a page from the graphsheet (get page names using
guiGetObjectNames('GraphSheetPage', guiGetGSName())). Warning: removing
the last page seems to make the graphsheet non-functional.
guiRemove('GraphSheetPage', Name=page.name)
#
####
###
--------------------------------------------------------------------
This message was distributed by s-news <at> lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request <at> lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news

Tat, Tri Vi (TGRD | 7 Sep 2007 15:21

S-plus: Adding abline to bwplot or boxplot with log scales

Dear splus users

I wish to produce a boxplot with a log scale (because it’s a proportional difference) and with an overlaid abline (set at 1)

 

1. The splus boxplot command ignores log=”y”.

2. The splus bwplot command allows log scale via specifying scales=(list(log=F)), but then it ignores the command abline or panel.abline when the scale is logged.

 

I can achieve the plot in R using boxplot because it recognises the log=”y” option.

How do I do it in splus?

 

Thanks for your anticipated advice.

Tri

 

 

 

### This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. ###
Tat, Tri Vi (TGRD | 7 Sep 2007 17:25

Re: S-plus: Adding abline to bwplot or boxplot with log scales

Dear splus users
I wish to produce a boxplot with a log scale (because it's a 
proportional difference) and with an overlaid abline (set at 1)

1. The splus boxplot command ignores log="y".
2. The splus bwplot command allows log scale via specifying 
scales=(list(log=F)), but then it ignores the command abline or 
panel.abline when the scale is logged.

I can achieve the plot in R using boxplot because it recognises the 
log="y" option.
How do I do it in splus? 
Please find code below.

Thanks for your anticipated advice.
Tri
========================================
Example code:

#Data 
data<-data.frame(values=exp(rnorm(20, .2, .5)), # within-subject
proportional differences
	group=rep(c("A","B"),each=10) # stratification
) 

#boxplot -- fails because it ignores the log scale request
boxplot(split(data$values,data$group),log="y")
abline(h=1,lwd=1,lty=4,col=5) 

# bwplot -- fails because it ignores abline
bwplot(group~values,data=data,
	scales=list(x=list(log=T)),
)
abline(v=1,lwd=1,lty=4,col=5)

# bwplot -- again fails because it ignores abline
bwplot(group~values,data=data,
	panel=function(x,y,...){
		panel.bwplot(x,y)
		panel.abline(v=1,lwd=1,lty=4,col=5)
	}
)

Whereas in R, the following is successful because it recognises log="y":
boxplot(split(data$values,data$group),log="y")
abline(h=1,lwd=1,lty=4,col=5)

###
This message is for the designated recipient only and may contain privileged or confidential
information.  If you have received it in error, please notify the sender immediately and delete the
original.  Any other use of the email by you is prohibited.

###

--------------------------------------------------------------------
This message was distributed by s-news <at> lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request <at> lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news

Overstreet, Jason | 8 Sep 2007 00:10

Duplicate and Unique Data Frame Question

The following example is created for demonstrative purposes for unique and duplicated rows in a data frame.  Given the following command lines:


> x <- c("a", "a", "b", "b", "c", "c", "c","d","e","f")

> y <- c(1,2,3,4,5,6,7,8,9,10)

>

> xy<-data.frame(x,y)

> xy

   x  y

1  a  1

2  a  2

3  b  3

4  b  4

5  c  5

6  c  6

7  c  7

8  d  8

9  e  9

10 f 10

How does one create separate data frames for the duplicated rows ( lines 1 through 7 )  and the unique rows (lines 8 through 10)?  


Jason Overstreet

Statistician

ASQ: CRE, CQE

A.O. Smith

106 Adkisson Street

Ashland, TN 37015

Office: (615) 792-6253

Cell: (615) 495-6144

Fax: (615) 792-2121

Email: joverstreet <at> hotwater.com


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
carol white | 8 Sep 2007 15:03
Picon
Favicon

onverting a file name to the name of a table, disabling quote and converting into matrix

Hi,
I have converted the file names to data frames by "assign" and disabling the quote in read.table. now if i can convert the generated data frame into matrix by "as.matrix", the quoting gets enables (matrix elements are quoted). If I don't use
assign (i, as.matrix(get(i)), pos = 1), the matrix elements are not quoted and they are if assign, as.matrix is used


So Why does quoting get enabled with as.matrix?

files.lst = list.files(".")
    for (i in files.lst){
          assign( i, read.table(i, check.names=F,header=T,comment.char = "", quote = ""), pos = 1)
        assign (i, as.matrix(get(i)), pos = 1)
    }

Building a website is a piece of cake.
Yahoo! Small Business gives you all the tools to get online.

Gmane