[R] test for equal distributions with small numbes of observations

2003-08-19 Thread Christoph Lehmann
Dear R-pros

I have a problem, for which usually I would apply a chisq.test or a
fisher.test:



40 objects, each given either a 0 or 1, regarding if this object
later on will be remembered by a subject or not.

7 subjects investigated

means: we have a 2x40 matrix, each cell the number of subjects for who
the object i has been given either 0 or 1 e.g.

objects:
1   1   3   39  40
--
0 1   2   2   ..  7   7
1 4   4   5   ..  0   0

over all 40 objects, we have 67% of 1 and 33% of 0

I want to know, if for the 40 objects, the ratio of 0/1 differs or
not, i.e. if they have the same distribution.

I cannot use a chisq.test since the expected frequencies are  5 for the
0 cells.

Fisher.test seems to run for  12h on a PIV 1.8GHz...

what do you recommend me to do?

Many thanks

Christoph
--
 recognition
 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
[1,]122223333 3 3 3 4 4
[2,]445443444 4 3 4 3 3
 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26]
[1,] 4 4 4 4 4 4 5 5 5 5 5 5
[2,] 3 2 3 3 2 3 2 2 2 2 2 2
 [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38]
[1,] 5 5 5 5 5 6 6 6 6 6 6 6
[2,] 2 2 2 2 2 1 1 1 1 1 1 1
 [,39] [,40]
[1,] 7 7
[2,] 0 0

 fisher.test(recognition)


-- 
Christoph Lehmann [EMAIL PROTECTED]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] test for equal distributions with small numbes of observations

2003-08-19 Thread Carlos J. Gil Bellosta
Probably, to check homogenity you only need to consider a vector of 
dimension 8 consisting in the number of times you get any of the 
configurations (0,7), (1,6), (2,5),...(7,0). This is most likely a 
sufficient statistics. Under homogeneity, it should be distributed 
according to a multinomial random variable with probability vector equal 
to the density of a binomial variable of unknown parameter p.

Then you can use standard tests to see if the MVE fits or if it does not 
fit the data.

Carlos J. Gil Bellosta
Sigma Consultores Estadísticos
http://www.consultoresestadisticos.com
Christoph Lehmann wrote:

Dear R-pros

I have a problem, for which usually I would apply a chisq.test or a
fisher.test:


40 objects, each given either a 0 or 1, regarding if this object
later on will be remembered by a subject or not.
7 subjects investigated

means: we have a 2x40 matrix, each cell the number of subjects for who
the object i has been given either 0 or 1 e.g.
objects:
1   1   3   39  40
--
0   1   2   2   ..  7   7
1   4   4   5   ..  0   0
over all 40 objects, we have 67% of 1 and 33% of 0

I want to know, if for the 40 objects, the ratio of 0/1 differs or
not, i.e. if they have the same distribution.
I cannot use a chisq.test since the expected frequencies are  5 for the
0 cells.
Fisher.test seems to run for  12h on a PIV 1.8GHz...

what do you recommend me to do?

Many thanks

Christoph
--
 

recognition
   

[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
[1,]122223333 3 3 3 4 4
[2,]445443444 4 3 4 3 3
[,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26]
[1,] 4 4 4 4 4 4 5 5 5 5 5 5
[2,] 3 2 3 3 2 3 2 2 2 2 2 2
[,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38]
[1,] 5 5 5 5 5 6 6 6 6 6 6 6
[2,] 2 2 2 2 2 1 1 1 1 1 1 1
[,39] [,40]
[1,] 7 7
[2,] 0 0
 

fisher.test(recognition)
   



 

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] WARNING. You tried to send a potential virus or unauthorisedcode

2003-08-19 Thread alert
The MessageLabs SkyScan Anti-Virus service discovered a possible virus
or unauthorised code (such as a joke program or trojan) in an email sent
by you.

The email has now been quarantined and was not delivered.

Please read the whole of this email carefully.  It explains what has
happened to your email, which suspected virus has been caught and what
to do if you need help addressing the problem.

To help identify the quarantined email:

The message sender was 
[EMAIL PROTECTED]

The message recipients were 
[EMAIL PROTECTED]

The message title was Your details 
The message date was Tue, 19 Aug 2003 12:57:34 +0200
The virus or unauthorised code identified in the email is
/var/qmail/queue/split/1/attach/570489_2X_PM4_EMS_MA-OCTET=2DSTREAM__movie0045.pif
Found the W32/[EMAIL PROTECTED] virus !!!


Some viruses forge the sender address. For more information please
visit the link to the virus FAQ's at the bottom of this page.

The message was diverted into the virus holding pen on
mail server server-16.tower-1.messagelabs.com (pen id 570489_1061292374)
and will be held for 30 days before being destroyed

Corporate Users:
If you sent the email from a corporate network, you should first
contact your local IT Helpdesk or System Administrator for advice.
They will be able to help you disinfect your workstation.

If you would like further information on how to subscribe to MessageLabs
SkyScan AV service, a proactive anti-virus service working around the 
clock, around the globe, please visit 
http://www.messagelabs.com/page.asp?id=323

Personal or Home users:
If you sent the email from a personal or home account, you will need
to disinfect your computer yourself.  Please contact your anti-virus
software vendor for support.

You may like to read the virus FAQ's at:
http://www.messagelabs.com/page.asp?id=628
which will answer most virus related questions.


This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Re: Thank you!

2003-08-19 Thread The MathWorks Inc. Documentation


Thank you very much for your comments about the documentation.  

We will correct any errors in the next version of the documentation. 
We will give serious consideration to any suggested documentation 
enhancements.

We appreciate your contribution to improving the documentation,
and apologize for any inconvenience the errors or omissions in
the documentation may have caused you.



Greg Bartlett
Documentation Manager
[EMAIL PROTECTED]
508-647-7575
508-647-7002 (FAX)

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Command line R / PHP?

2003-08-19 Thread Thomas W Blackwell
On Wed, 20 Aug 2003, Zitan Broth wrote:
  . . .

 What I am trying to do is use R as part of a web-based system and call R
 from PHP.  The common method of interfacing from PHP to many systems is via
 the command line (although I could use swig to access R directly but that is
 phase 2 ;-) ).  I found in the install notes that I could call
 Rterm.exe --no-restore --no-save  infile  outfile (windows, although I
 will be rolling out to *nix) however I cannot find a reference of how to
 call r-functions from the command line with this -- or perhaps I've missed
 the point ?

infile is an ascii file of R commands - the same commands and same syntax
which you would type in the R command line window.  Frequently the first
line sets some session options using  options(),  the second line reads
some data from a separate, named file into an R object, and the third and
subsequent lines operate on that data and print out the results.

For example:

options(digits=4, width=88, length=1e+8)
object - read.table(data.file)
summary(lm(y ~ 1 + a + b, object)

(This assumes that data.file contains columns named a, b, y in any
order.  It does a linear regression and prints out the results .. in
the command line window if you were working interactively, but to
outfile if R is running noninteractively with the call above.)

(Gosh, my recollection is that in unix the call is R BATCH infile outfile,
but I could be mistaken.  That's on the unix man page for R if you forget.)

 I did find in the FAQ: 7.22 How can I get command line editing to work?  But
 I'm not sure I understand the answer ..

If running R non-interactively, you don't care.

 So say as a simple example I want to call sd() (standard deviation) from the
 command line what would I type ... or do I need to write some R code and
 call this .. ?

Need code to read in the data, then a one line command  sd(object).
The returned value is printed automatically if it is not assigned.

 I will continue to read  Z.

HTH  -  tom blackwell  -  u michigan medical school  -  ann arbor  -

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] R-1.7.1 gets installed without default packages withoutreadline

2003-08-19 Thread Laurent Faisnel
Hi all,

Trying to install R-1.7.1 on a RedHat 8.0 platform, I have a few problems.

R gets installed without default packages (but base and ctest) : make 
script fails at the end of the procedure (configure is made 
successfully). This is the (translated) log I have :

/gcc -I../../../../include /usr/include/mysql  -D__NO_MATH_INLINES 
-mieee-fp  -fPIC  -g -O2 -c ansari.c -o ansari.o
gcc: cannot specify -o with -c or -S and multiple compilations
make[5]: *** [ansari.o] Error 1
make[5]: Leaving directory `/usr/local/R-1.7.1/src/library/ctest/src'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/usr/local/R-1.7.1/src/library/ctest/src'
make[3]: *** [all] Error 1
make[3]: Leaving directory `/usr/local/R-1.7.1/src/library/ctest'
make[2]: *** [R] Error 1
make[2]: Leaving directory `/usr/local/R-1.7.1/src/library'
make[1]: *** [R] Error 1
make[1]: Leaving directory// `/usr/local/R-1.7.1/src'
make: *** [R] Error 1
/
However it's possible to start R but I have only base and ctest, and 
subsequently many warnings are displayed at startup. The only solution I 
found was to copy-paste libraries from a RPM version (which gets 
installed without trouble). Probably not a good solution. I already read 
carefully R-admin. What should I try now ?

Moreover, I have a problem with readline. First I did not manage to make 
the configure script satisfied about readline. I found in R archives 
that readline-devel should be present too. I downloaded it, indeed the 
configure script is now OK with readline. But I still have no 
command-line facilities enabled under R. Why ?

[EMAIL PROTECTED] home]# rpm -qva | grep readline
readline-4.3-3
readline-devel-4.3-3
readline41-4.1-14
Thanks for any help.

Laurent

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R-1.7.1 gets installed without default packages withoutreadline

2003-08-19 Thread Peter Dalgaard BSA
Laurent Faisnel [EMAIL PROTECTED] writes:

 Hi all,
 
 Trying to install R-1.7.1 on a RedHat 8.0 platform, I have a few problems.
 
 R gets installed without default packages (but base and ctest) : make
 script fails at the end of the procedure (configure is made
 successfully). This is the (translated) log I have :
 
 /gcc -I../../../../include /usr/include/mysql  -D__NO_MATH_INLINES
 -mieee-fp  -fPIC  -g -O2 -c ansari.c -o ansari.o
 gcc: cannot specify -o with -c or -S and multiple compilations
 make[5]: *** [ansari.o] Error 1
 make[5]: Leaving directory `/usr/local/R-1.7.1/src/library/ctest/src'
 make[4]: *** [all] Error 2
 make[4]: Leaving directory `/usr/local/R-1.7.1/src/library/ctest/src'
 make[3]: *** [all] Error 1
 make[3]: Leaving directory `/usr/local/R-1.7.1/src/library/ctest'
 make[2]: *** [R] Error 1
 make[2]: Leaving directory `/usr/local/R-1.7.1/src/library'
 make[1]: *** [R] Error 1
 make[1]: Leaving directory// `/usr/local/R-1.7.1/src'
 make: *** [R] Error 1
 /
 However it's possible to start R but I have only base and ctest, and
 subsequently many warnings are displayed at startup. The only solution
 I found was to copy-paste libraries from a RPM version (which gets
 installed without trouble). Probably not a good solution. I already
 read carefully R-admin. What should I try now ?
 
 Moreover, I have a problem with readline. First I did not manage to
 make the configure script satisfied about readline. I found in R
 archives that readline-devel should be present too. I downloaded it,
 indeed the configure script is now OK with readline. But I still have
 no command-line facilities enabled under R. Why ?
 
 [EMAIL PROTECTED] home]# rpm -qva | grep readline
 readline-4.3-3
 readline-devel-4.3-3
 readline41-4.1-14

You may need a make distclean step to purge what got messed up on
previous builds. 

The other issue seems to be due to a missepecification of your header
files. I think there wants to be a -I infront of /usr/include/mysql
there.

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Re: glmmPQL() and memory limitations

2003-08-19 Thread Elliott Moreton
Hi,

Thanks to all who have responded so far.  I'll try your suggested 
solutions, and post a summary to the list.  (I'm presently waiting to hear 
whether my local sysadmins will install lme4.)

Best regards,
Elliott Moreton

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Command line R / PHP?

2003-08-19 Thread Martin Maechler
 ThomasB == Thomas W Blackwell [EMAIL PROTECTED]
 on Tue, 19 Aug 2003 08:14:45 -0400 (EDT) writes:

ThomasB On Wed, 20 Aug 2003, Zitan Broth wrote:
ThomasB . . .

 What I am trying to do is use R as part of a web-based system and call R
 from PHP.  The common method of interfacing from PHP to many systems is via
 the command line (although I could use swig to access R directly but that is
 phase 2 ;-) ).  I found in the install notes that I could call
 Rterm.exe --no-restore --no-save  infile  outfile (windows, although I
 will be rolling out to *nix) however I cannot find a reference of how to
 call r-functions from the command line with this -- or perhaps I've missed
 the point ?

ThomasB infile is an ascii file of R commands - the same
ThomasB commands and same syntax which you would type in
ThomasB the R command line window.  Frequently the first
ThomasB line sets some session options using options(), the
ThomasB second line reads some data from a separate, named
ThomasB file into an R object, and the third and subsequent
ThomasB lines operate on that data and print out the
ThomasB results.

ThomasB For example:

ThomasB options(digits=4, width=88, length=1e+8)
ThomasB object - read.table(data.file)
ThomasB summary(lm(y ~ 1 + a + b, object)

ThomasB (This assumes that data.file contains columns
ThomasB named a, b, y in any order.  It does a linear
ThomasB regression and prints out the results .. in the
ThomasB command line window if you were working
ThomasB interactively, but to outfile if R is running
ThomasB noninteractively with the call above.)

Thanks a lot, Thomas, for the nice explanation..

ThomasB (Gosh, my recollection is that in unix the call is
ThomasB R BATCH infile outfile, but I could be mistaken.
ThomasB That's on the unix man page for R if you forget.)

Both work in Unix (after replacing Rterm.exe by R). 
Even R BATCH infile does.
The --no-restore --no-save in all versions, since the S-back
compatible way is to work with `persistent' objects (via an .RData file).
This persistence if often undesired when working with scripts,
and I'd recommend the above switches and using save(.. , file=) and
load(file=..) if desired, with carefully chosen file names
.rda.

 I did find in the FAQ: 7.22 How can I get command line
 editing to work?  But I'm not sure I understand the
 answer ..

ThomasB If running R non-interactively, you don't care.

 So say as a simple example I want to call sd() (standard deviation) from the
 command line what would I type ... or do I need to write some R code and
 call this .. ?

ThomasB Need code to read in the data, then a one line
ThomasB command sd(object).  The returned value is printed
ThomasB automatically if it is not assigned.

 I will continue to read  Z.

ThomasB HTH  -  tom blackwell  -  u michigan medical school  -  ann arbor  -
Martin Maechler

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] R Install on Solaris 9

2003-08-19 Thread Akpodigha Filatei
Thanks for your response. I actually realized this and downloaded gcc 3.3, compiled it 
an used it for R compilation and everything worked fine.

-Original Message-
From: Brian D Ripley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 19, 2003 1:52 AM
To: Akpodigha Filatei
Subject: Re: [R] R Install on Solaris 9


I've seen this: it usually indicates a broken compiler.
You are using a compiler for Solaris 9 (and not, say 2.6)?


 I am trying to install R-1.7.1 or R-1.6.2 on solaris 9 but the configure
 is failing on me: Below is the error.  Anybody with similar experience
 out there? Your help will be appreciated highly!


 checking for an ANSI C-conforming const... yes
 checking for int... yes
 checking size of int... configure: error: cannot compute sizeof (int),
 77

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R-1.7.1 gets installed without default packages withoutreadline

2003-08-19 Thread Thomas W Blackwell
Laurent  -

I had no trouble with configuring, compiling and running R under
Redhat 8.0.  My system now gives

uname -a
  Linux host 2.4.18-14smp #1 SMP Wed Sep4 12:34:47 EDT 2002 i686 i686 i386 GNU/Linux

rpm -qa | grep readline
  readline41-4.1-14
  readline-4.3-4
  readline-devel-4.3-3

The only difference I can see is that I have  readline-4.3-4,
while you show  readline-4.3-3.  So now I remember:  on CRAN,
somewhere near the R source rpm for linux when I downloaded it
there is a special readline rpm, and a readme file from Martyn
Plummer which says, in part,

Graeme Ambler has kindly provided patched rpms. His gpg ID is
62897321 and his public key is available from pgp.net (see below).

Somehow, I got readline-4.3-4 out of that rpm.  H.  All seems
to work fine for me.

-  tom blackwell  -  u michigan medical school  -  ann arbor  -

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R-1.7.1 gets installed without default packages withoutreadline

2003-08-19 Thread Laurent Faisnel
Thomas W Blackwell wrote:

Laurent  -

I had no trouble with configuring, compiling and running R under
Redhat 8.0.  My system now gives
uname -a
 Linux host 2.4.18-14smp #1 SMP Wed Sep4 12:34:47 EDT 2002 i686 i686 i386 GNU/Linux
I have the same

rpm -qa | grep readline
 readline41-4.1-14
 readline-4.3-4
 readline-devel-4.3-3
The only difference I can see is that I have  readline-4.3-4,
while you show  readline-4.3-3.  So now I remember:  on CRAN,
somewhere near the R source rpm for linux when I downloaded it
there is a special readline rpm, and a readme file from Martyn
Plummer which says, in part,
Graeme Ambler has kindly provided patched rpms. His gpg ID is
62897321 and his public key is available from pgp.net (see below).
I've found all this, thanks. In fact, there is also a newer version of 
readline-devel (4.3-4). I updated both libraries. But unfortunately I 
still have the same problems. Is it so hard to switch from R's rpm 
version to the compiled one ? Source version allows you to choose 
compilation options and this may become necessary for me.

Somehow, I got readline-4.3-4 out of that rpm.  H.  All seems
to work fine for me.
-  tom blackwell  -  u michigan medical school  -  ann arbor  -



 

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] On the Use of the nnet Library

2003-08-19 Thread yukihiro ishii
Dear List,
(B
(BI am trying to solve a problem by the neural network method(library:
(Bnnet). The problem is to express Weight in terms of Age , Sex and Height
(Bfor twenty people. The data frame consists of 20 observations with four
(Bvariables: Sex, Age, Height and Weight. Sex is treated as a factor, Age
(Band Weight are variables normalized to unity, as usual. I wanted to
(Bconstruct a neural network, and so I ran the following code:
(B
(Blibrary(nnet)
(Bnet1-nnet(Weight~Age+Sex+Height, size=2, linout=T,maxit=1000)
(B
(BI repeated this thirteen times.  I used the default initial parameters
(Bunless otherwise noted. The result is as follows, where init and final
(Bmean initial and final RSS's, and NIT means the number of iterations
(Bbefore reaching convergence or noncovergence:
(B
(BRun#initNIT final
(B1   71991.1 30  995.1 
(B2   70870.0 370 33.1 
(B3   72755.8 10 2134.3 
(B4   69840.6 10 2134.3 
(B5   70368.8 190 39.7 
(B6   70368.8 270 41.0 
(B7   71101.2 190 39.7 
(B8   71606.1 10 2134.3 
(B9   72076.1 10 2134.3 
(B10  72249.1 300 15.0 
(B11  71424.1 10 2134.3 
(B12  68483.8 130 39.7 
(B13  71435.9 1000   4.6 
(B
(B
(BAs you can see, the result is far from stable.
(B
(BMy question is:
(B
(BHow can I reach a stable answer?
(B
(B.I know that initial parameters are crucially important in my case, and I
(Bmust choose proper parameter values, but I do not know I can do that.
(B
(BMy second question is related to the response analysis of this data. I
(Bdo not know an effective method to evaluate the response to
(B the variance of each explanatory variable. Is there such a function in
(Bthe library, nnet? Such a function may help me reduce the number of the
(Bexplanatory variables.
(B
(BI wonder if anyone could help me in such elementary questions.
(B
(B
(B It's elementary, Watson!
(B
(BI remain an obedient Watson, hoping for Holmes' wisdom.
(B
(B
(B-- 
(BYukihiro Ishii [EMAIL PROTECTED]
(B2-3-28$B!!(BTsurumaki-minami, Hadano
(B257-0002 Japan
(BTel +81 463 69 1922
(BFax +81 463 69 1922
(B
(B__
(B[EMAIL PROTECTED] mailing list
(Bhttps://www.stat.math.ethz.ch/mailman/listinfo/r-help

[R] Mgw: Blocked mail Re: Your application fromr-help@lists.r-project.org

2003-08-19 Thread mailmarshal
The mail scanner blocked the following message:

   Message: B000157964.0001.mml
   From:[EMAIL PROTECTED]
   To:  [EMAIL PROTECTED]
   Subject: Re: Your application

Because the intended recipient may not receive messages with
certain potentially dangerous file types attached.

If this message is business related please contact the 
individuals you sent the mail message to and request that
the message be released.
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Return Message: Thank you!

2003-08-19 Thread ORAPOST
The included message could not be delivered to the following invalid mail names.  
Please verify these names and try them again.

Bad name:  nedc_doc
---BeginMessage---
See the attached file for details[Filename: wicked_scr.scr, Content-Type: application/octet-stream]
[WARNING] - A potentially hazardous attachment was removed from this message by 
Oracle's Mail System.  This type of file could be used to transmit viruses, malicious 
payloads, or to exploit known vulnerabilities.  Please do not report this message as 
SPAM.
---End Message---
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread Padmanabhan, Sudharsha

Hello,

I am running a few simulations for clinical trial anlysis. I want some help 
regarding the following.

We know trhat as the sample size increases, the variance should decrease, but 
I am getting some unexpected results. SO I ran a code (shown below) to check 
the validity of this.

large-array(1,c(1000,1000))
small-array(1,c(100,1000))
for(i in 1:1000){large[i,]-rnorm(1000,0,3)}
for(i in 1:1000){small[i,]-rnorm(100,0,3)}}
yy-array(1,100)
for(i in 1:100){yy[i]-var(small[i,])}
y1y-array(1,1000)
for(i in 1:1000){y1y[i]-var(large[i,])}
mean(yy);mean(y1y);
[1] 8.944
[1] 9.098


This shows that on an average,for 1000 such samples of 1000 Normal numbers, 
the variance is higher than that of a 100 samples of 1000 random numbers.

Why is this so?


Can someone please help me out

Thanks.

Regards

~S.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread Padmanabhan, Sudharsha

Hello,

I am running a few simulations for clinical trial anlysis. I want some help 
regarding the following.

We know trhat as the sample size increases, the variance should decrease, but 
I am getting some unexpected results. SO I ran a code (shown below) to check 
the validity of this.

large-array(1,c(1000,1000))
small-array(1,c(100,1000))
for(i in 1:1000){large[i,]-rnorm(1000,0,3)}
for(i in 1:1000){small[i,]-rnorm(100,0,3)}}
yy-array(1,100)
for(i in 1:100){yy[i]-var(small[i,])}
y1y-array(1,1000)
for(i in 1:1000){y1y[i]-var(large[i,])}
mean(yy);mean(y1y);
[1] 8.944
[1] 9.098


This shows that on an average,for 1000 such samples of 1000 Normal numbers, 
the variance is higher than that of a 100 samples of 1000 random numbers.

Why is this so?


Can someone please help me out

Thanks.

Regards

~S.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Variance Computing - HELP

2003-08-19 Thread Thomas W Blackwell
The variance of Xbar decreases as 1/n;  the sample variance
of X does not.

-  tom blackwell  -  u michigan medical school  -  ann arbor  -

On Tue, 19 Aug 2003, Padmanabhan, Sudharsha wrote:

 I am running a few simulations for clinical trial anlysis. I want some help
 regarding the following.

 We know trhat as the sample size increases, the variance should decrease, but
 I am getting some unexpected results. SO I ran a code (shown below) to check
 the validity of this.

 large-array(1,c(1000,1000))
 small-array(1,c(100,1000))
 for(i in 1:1000){large[i,]-rnorm(1000,0,3)}
 for(i in 1:1000){small[i,]-rnorm(100,0,3)}}
 yy-array(1,100)
 for(i in 1:100){yy[i]-var(small[i,])}
 y1y-array(1,1000)
 for(i in 1:1000){y1y[i]-var(large[i,])}
 mean(yy);mean(y1y);
 [1] 8.944
 [1] 9.098

 This shows that on an average,for 1000 such samples of 1000 Normal numbers,
 the variance is higher than that of a 100 samples of 1000 random numbers.

 Why is this so?
 Can someone please help me out


__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread Jonathan Baron
On 08/19/03 17:42, Padmanabhan, Sudharsha wrote:

Hello,

I am running a few simulations for clinical trial anlysis. I want some help 
regarding the following.

We know trhat as the sample size increases, the variance should decrease, but 
I am getting some unexpected results. SO I ran a code (shown below) to check 
the validity of this.

large-array(1,c(1000,1000))
small-array(1,c(100,1000))
for(i in 1:1000){large[i,]-rnorm(1000,0,3)}
for(i in 1:1000){small[i,]-rnorm(100,0,3)}}
yy-array(1,100)
for(i in 1:100){yy[i]-var(small[i,])}
y1y-array(1,1000)
for(i in 1:1000){y1y[i]-var(large[i,])}
mean(yy);mean(y1y);
[1] 8.944
[1] 9.098


This shows that on an average,for 1000 such samples of 1000 Normal numbers, 
the variance is higher than that of a 100 samples of 1000 random numbers.

Why is this so?

Don't know, but it could be a fluke.  You don't say how many
times you did it.

I did the following, with 1000 in each test.  You have 100 in the
small test and 1000 in the big one.  My numbers look pretty
close.

 bigmat - matrix(rnorm(100),1000,1000) # 1000 rows of 1000 each
 smallmat - matrix(rnorm(10),1000,100) # 1000 rows of 100 each
 mean(apply(bigmat,1,var)) # get variance of each row, then take mean
[1] 0.344
 mean(apply(smallmat,1,var))
[1] 0.9967427

-- 
Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page:http://www.sas.upenn.edu/~baron
R page:   http://finzi.psych.upenn.edu/

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread Liaw, Andy
First of all, your subscripting is wrong.  The first index is for row, and
the second for column.  Thus large[i,] refers to the i-th row of large,
rather than the i-th column.  Also, the code as you provided contain syntax
error.

Try:

set.seed(311)  ## Always a good idea to set seed for simulation!
large - matrix(rnorm(1000*1000), 1000, 1000)
small - matrix(rnorm(100*1000), 100, 1000)
var.large - apply(large, 2, var)  ## Apply the var function to each column
var.small - apply(small, 2, var)

The result looks like:
 summary(var.large); summary(var.small)
   Min. 1st Qu.  MedianMean 3rd Qu.Max. 
 0.8617  0.9705  1.0010  1.0020  1.0320  1.1520 
   Min. 1st Qu.  MedianMean 3rd Qu.Max. 
 0.5846  0.9021  0.9948  0.9990  1.0850  1.5360 

as expected:  The mean is about the same, but the spread is much smaller for
larger sample size.

This sort of things can be computed exactly using basic math stat, BTW.

Andy


 -Original Message-
 From: Padmanabhan, Sudharsha [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 19, 2003 1:43 PM
 To: [EMAIL PROTECTED]
 Subject: [R] Variance Computing- - HELP!!
 
 
 
 Hello,
 
 I am running a few simulations for clinical trial anlysis. I 
 want some help 
 regarding the following.
 
 We know trhat as the sample size increases, the variance 
 should decrease, but 
 I am getting some unexpected results. SO I ran a code (shown 
 below) to check 
 the validity of this.
 
 large-array(1,c(1000,1000))
 small-array(1,c(100,1000))
 for(i in 1:1000){large[i,]-rnorm(1000,0,3)}
 for(i in 1:1000){small[i,]-rnorm(100,0,3)}}
 yy-array(1,100)
 for(i in 1:100){yy[i]-var(small[i,])}
 y1y-array(1,1000)
 for(i in 1:1000){y1y[i]-var(large[i,])}
 mean(yy);mean(y1y);
 [1] 8.944
 [1] 9.098
 
 
 This shows that on an average,for 1000 such samples of 1000 
 Normal numbers, 
 the variance is higher than that of a 100 samples of 1000 
 random numbers.
 
 Why is this so?
 
 
 Can someone please help me out
 
 Thanks.
 
 Regards
 
 ~S.
 
 __
 [EMAIL PROTECTED] mailing list 
 https://www.stat.math.ethz.ch/mailman/listinfo /r-help
 

--
Notice:  This e-mail message, together with any attachments, contains
information of Merck  Co., Inc. (Whitehouse Station, New Jersey, USA), and/or
its affiliates (which may be known outside the United States as Merck Frosst,
Merck Sharp  Dohme or MSD) that may be confidential, proprietary copyrighted
and/or legally privileged, and is intended solely for the use of the
individual or entity named on this message.  If you are not the intended
recipient, and have received this message in error, please immediately return
this by e-mail and then delete it.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread James MacDonald
I think you are confused. As sample size increases, the variance of an
estimate based on that sample will decrease asymtotically to zero (e.g.,
the standard error of the mean will go to zero). However the variance of
the sample itself will not change. Any difference you see in your data
is simply due to chance. If you repeat, the larger set may or may not
have a larger variance.

 var(rnorm(1, 0, 3))
[1] 8.958727
 var(rnorm(1, 0, 3))
[1] 9.155332
 var(rnorm(1, 0, 3))
[1] 9.050894
 var(rnorm(1, 0, 3))
[1] 9.282509
 var(rnorm(10, 0, 3))
[1] 8.990778
 var(rnorm(10, 0, 3))
[1] 9.024343
 var(rnorm(10, 0, 3))
[1] 8.999064
 
 var(rnorm(10, 0, 3))
[1] 9.088034


HTH

Jim



James W. MacDonald
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623

 Padmanabhan, Sudharsha [EMAIL PROTECTED] 08/19/03 01:42PM


Hello,

I am running a few simulations for clinical trial anlysis. I want some
help 
regarding the following.

We know trhat as the sample size increases, the variance should
decrease, but 
I am getting some unexpected results. SO I ran a code (shown below) to
check 
the validity of this.

large-array(1,c(1000,1000))
small-array(1,c(100,1000))
for(i in 1:1000){large[i,]-rnorm(1000,0,3)}
for(i in 1:1000){small[i,]-rnorm(100,0,3)}}
yy-array(1,100)
for(i in 1:100){yy[i]-var(small[i,])}
y1y-array(1,1000)
for(i in 1:1000){y1y[i]-var(large[i,])}
mean(yy);mean(y1y);
[1] 8.944
[1] 9.098


This shows that on an average,for 1000 such samples of 1000 Normal
numbers, 
the variance is higher than that of a 100 samples of 1000 random
numbers.

Why is this so?


Can someone please help me out

Thanks.

Regards

~S.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread Tony Plate
Perhaps you were trying for as sample size increases, variance *of the 
mean* decreases (a least when variance is finite).  If you swap mean and 
var in your code, I think you will get what you are looking for.

-- Tony Plate

At Tuesday 05:42 PM 8/19/2003 +, Padmanabhan, Sudharsha wrote:

Hello,

I am running a few simulations for clinical trial anlysis. I want some help
regarding the following.
We know trhat as the sample size increases, the variance should decrease, but
I am getting some unexpected results. SO I ran a code (shown below) to check
the validity of this.
large-array(1,c(1000,1000))
small-array(1,c(100,1000))
for(i in 1:1000){large[i,]-rnorm(1000,0,3)}
for(i in 1:1000){small[i,]-rnorm(100,0,3)}}
yy-array(1,100)
for(i in 1:100){yy[i]-var(small[i,])}
y1y-array(1,1000)
for(i in 1:1000){y1y[i]-var(large[i,])}
mean(yy);mean(y1y);
[1] 8.944
[1] 9.098
This shows that on an average,for 1000 such samples of 1000 Normal numbers,
the variance is higher than that of a 100 samples of 1000 random numbers.
Why is this so?

Can someone please help me out

Thanks.

Regards

~S.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread Wiener, Matthew
Hi.

There is no reason the variance of a normal should decrease as you take
larger samples.  Indeed, in your call itself, you say that you want a sample
from a normal with a standard deviation of 3, and so a variance of 9.  As
expected, both of your estimates of variance are close to 9.

What should decrease is the variance of the estimate of the mean, which is
the variance of the sample divided by the number of elements in your sample.
That will indeed decrease as n increases.
 
Also, a couple of R programming points raised by your example:

You can populate your entire matrix of random numbers with a single call,
with good time savings.  (That probably doesn't matter much in this toy
example, but might if you do larger simulations for some problem.)
For example:  matrix(rnorm(10, 0, 3), nr = 100, nc = 1000) gets you your
matrix small.

Similarly, your loop over the rows for taking variance can be replaced by 
yy - apply(small, 1, var)
Which may not be faster, but is certainly easier to read.  And of course
you'd want to replace the call to var with a function that calculates
standard error.

Hope this helps,

Matt Wiener


-Original Message-
From: Padmanabhan, Sudharsha [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 19, 2003 1:43 PM
To: [EMAIL PROTECTED]
Subject: [R] Variance Computing- - HELP!!



Hello,

I am running a few simulations for clinical trial anlysis. I want some help 
regarding the following.

We know trhat as the sample size increases, the variance should decrease,
but 
I am getting some unexpected results. SO I ran a code (shown below) to check

the validity of this.

large-array(1,c(1000,1000))
small-array(1,c(100,1000))
for(i in 1:1000){large[i,]-rnorm(1000,0,3)}
for(i in 1:1000){small[i,]-rnorm(100,0,3)}}
yy-array(1,100)
for(i in 1:100){yy[i]-var(small[i,])}
y1y-array(1,1000)
for(i in 1:1000){y1y[i]-var(large[i,])}
mean(yy);mean(y1y);
[1] 8.944
[1] 9.098


This shows that on an average,for 1000 such samples of 1000 Normal numbers, 
the variance is higher than that of a 100 samples of 1000 random numbers.

Why is this so?


Can someone please help me out

Thanks.

Regards

~S.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

--
Notice:  This e-mail message, together with any attachments, contains
information of Merck  Co., Inc. (Whitehouse Station, New Jersey, USA), and/or
its affiliates (which may be known outside the United States as Merck Frosst,
Merck Sharp  Dohme or MSD) that may be confidential, proprietary copyrighted
and/or legally privileged, and is intended solely for the use of the
individual or entity named on this message.  If you are not the intended
recipient, and have received this message in error, please immediately return
this by e-mail and then delete it.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] for those of you who want a patent...

2003-08-19 Thread A.J. Rossini

Alvaro Munoz (Hopkins Epi) is patenting the diamond graph. 

http://www.jhsph.edu/Press_Room/Press_Releases/Munoz_diamond_graph.html

There is enough prior art (hexagonal binning, among others) to make
this amusing, except that it probably will get a patent.  It's a reasonable
graphical technique, but patentable?

best,
-tony

-- 
A.J. Rossini
[EMAIL PROTECTED]http://www.analytics.washington.edu/ 
Biomedical and Health Informatics   University of Washington
Biostatistics, SCHARP/HVTN  Fred Hutchinson Cancer Research Center
UW   :  FAX=206-543-3461 | moving soon to a permanent office
FHCRC: 206-667-7025 FAX=206-667-4812 | Voicemail is pretty sketchy/use Email

CONFIDENTIALITY NOTICE: This e-mail message and any attachme...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] On the Use of the nnet Library

2003-08-19 Thread yukihiro ishii
Dear List,
(B
(BI am trying to solve a problem by the neural network method(library:
(Bnnet). The problem is to express Weight in terms of Age , Sex and Height
(Bfor twenty people. The data frame consists of 20 observations with four
(Bvariables: Sex, Age, Height and Weight. Sex is treated as a factor, Age
(Band Weight are variables normalized to unity, as usual. I wanted to
(Bconstruct a neural network, and so I ran the following code:
(B
(Blibrary(nnet)
(Bnet1-nnet(Weight~Age+Sex+Height, size=2, linout=T,maxit=1000)
(B
(BI repeated this thirteen times.  I used the default initial parameters
(Bunless otherwise noted. The result is as follows, where init and final
(Bmean initial and final RSS's, and NIT means the number of iterations
(Bbefore reaching convergence or noncovergence:
(B
(BRun#initNIT final
(B1   71991.1 30  995.1 
(B2   70870.0 370 33.1 
(B3   72755.8 10 2134.3 
(B4   69840.6 10 2134.3 
(B5   70368.8 190 39.7 
(B6   70368.8 270 41.0 
(B7   71101.2 190 39.7 
(B8   71606.1 10 2134.3 
(B9   72076.1 10 2134.3 
(B10  72249.1 300 15.0 
(B11  71424.1 10 2134.3 
(B12  68483.8 130 39.7 
(B13  71435.9 1000   4.6 
(B
(B
(BAs you can see, the result is far from stable.
(B
(BMy question is:
(B
(BHow can I reach a stable answer?
(B
(B.I know that initial parameters are crucially important in my case, and I
(Bmust choose proper parameter values, but I do not know I can do that.
(B
(BMy second question is related to the response analysis of this data. I
(Bdo not know an effective method to evaluate the response to
(B the variance of each explanatory variable. Is there such a function in
(Bthe library, nnet? Such a function may help me reduce the number of the
(Bexplanatory variables.
(B
(BI wonder if anyone could help me in such elementary questions.
(B
(B
(B It's elementary, Watson!
(B
(BI remain an obedient Watson, hoping for Holmes' wisdom.
(B
(B
(B-- 
(BYukihiro Ishii [EMAIL PROTECTED]
(B2-3-28$B!!(BTsurumaki-minami, Hadano
(B257-0002 Japan
(BTel +81 463 69 1922
(BFax +81 463 69 1922
(B
(B__
(B[EMAIL PROTECTED] mailing list
(Bhttps://www.stat.math.ethz.ch/mailman/listinfo/r-help

[R] logistic regression without intercept

2003-08-19 Thread Ross Boylan
I want to do a logistic regression without an intercept term.  This
option is absent from glm, though present in some of the inner functions
glm uses.  I gather glm is the standard way to do logistic regression in
R.

Hoping it would be passed in, I said
 r - glm(brain.cancer~epilepsy+other.cancer, c3, 
family=binomial(link=logit), intercept=FALSE)
which produced
Error in glm.control(...) : unused argument(s) (intercept ...)

Is there an easy way to do this?  I suppose I could start hacking away
at glm so it would take the argument and pass it on, but is it absent
for a reason?

Also, I noticed that S-Plus but not R has a glim routine that uses
maximum likelihood.  What would be the equivalent?

Thanks.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Variance Computing-

2003-08-19 Thread Frank Roberts - SOTL
Hi All:

Many servers, routers, and firewall have the configuration files set such that 
if the word HELP appears in the subject line the message is not delivered to 
the addressee but is delivered to they system operator.

Re: [R] Variance Computing-  - HELP!!

Thanks
Frank

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] logistic regression without intercept

2003-08-19 Thread Thomas Lumley
On Tue, 19 Aug 2003, Ross Boylan wrote:

 I want to do a logistic regression without an intercept term.  This
 option is absent from glm, though present in some of the inner functions
 glm uses.  I gather glm is the standard way to do logistic regression in
 R.

 Hoping it would be passed in, I said
  r - glm(brain.cancer~epilepsy+other.cancer, c3,
 family=binomial(link=logit), intercept=FALSE)
 which produced
 Error in glm.control(...) : unused argument(s) (intercept ...)

 Is there an easy way to do this?  I suppose I could start hacking away
 at glm so it would take the argument and pass it on, but is it absent
 for a reason?

Yes. You specify no intercept  with the formula:
r - glm(brain.cancer~epilepsy+other.cancer+0, c3,
family=binomial(link=logit), intercept=FALSE)
or
r - glm(brain.cancer~epilepsy+other.cancer-1, c3,
family=binomial(link=logit), intercept=FALSE)

The latter is S-PLUS compatible

 Also, I noticed that S-Plus but not R has a glim routine that uses
 maximum likelihood.  What would be the equivalent?

glm.

-thomas

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] logistic regression without intercept

2003-08-19 Thread Spencer Graves
Did you try the following:

r - glm(brain.cancer~epilepsy+other.cancer-1, c3,
   family=binomial(link=logit) )
The construct -1 on the right hand side of a formula means to exclude 
the intercept.  See, e.g., model formulae in the index to Modern 
Applied Statistics with S by Venables  Ripley.  I don't remember doing 
this with glm, but I've done it with lm.

hope this helps.  spencer graves

Ross Boylan wrote:
I want to do a logistic regression without an intercept term.  This
option is absent from glm, though present in some of the inner functions
glm uses.  I gather glm is the standard way to do logistic regression in
R.
Hoping it would be passed in, I said

r - glm(brain.cancer~epilepsy+other.cancer, c3, 
  family=binomial(link=logit), intercept=FALSE)
which produced
Error in glm.control(...) : unused argument(s) (intercept ...)
Is there an easy way to do this?  I suppose I could start hacking away
at glm so it would take the argument and pass it on, but is it absent
for a reason?
Also, I noticed that S-Plus but not R has a glim routine that uses
maximum likelihood.  What would be the equivalent?
Thanks.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Variance Computing-

2003-08-19 Thread A.J. Rossini
Frank Roberts - SOTL [EMAIL PROTECTED] writes:

 Many servers, routers, and firewall have the configuration files set such that 
 if the word HELP appears in the subject line the message is not delivered to 
 the addressee but is delivered to they system operator.

Gosh, lets hope that those systems can learn from their mistakes,
then.

best,
-tony

-- 
A.J. Rossini
[EMAIL PROTECTED]http://www.analytics.washington.edu/ 
Biomedical and Health Informatics   University of Washington
Biostatistics, SCHARP/HVTN  Fred Hutchinson Cancer Research Center
UW   :  FAX=206-543-3461 | moving soon to a permanent office
FHCRC: 206-667-7025 FAX=206-667-4812 | Voicemail is pretty sketchy/use Email

CONFIDENTIALITY NOTICE: This e-mail message and any attachme...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Variance Computing-

2003-08-19 Thread Frank Roberts - SOTL
It is not a mistake. 

The word help on a subject line means that you want help with the program not 
that you are requesting help in a message.

Since almost all system servers, routers, and firewalls run either BSD or 
Linux that is the action you most likely will get at most businesses.

Frank

On Tuesday 19 August 2003 18:42, A.J. Rossini wrote:
 Frank Roberts - SOTL [EMAIL PROTECTED] writes:
  Many servers, routers, and firewall have the configuration files set such
  that if the word HELP appears in the subject line the message is not
  delivered to the addressee but is delivered to they system operator.

 Gosh, lets hope that those systems can learn from their mistakes,
 then.

 best,
 -tony

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Variance Computing-

2003-08-19 Thread A.J. Rossini
Frank Roberts - SOTL [EMAIL PROTECTED] writes:

 It is not a mistake. 

It is a mistake.

 The word help on a subject line means that you want help with the program not 
 that you are requesting help in a message.

This comprehension is the mistake.  

 Since almost all system servers, routers, and firewalls run either BSD or 
 Linux that is the action you most likely will get at most businesses.

Most routers don't filter SMTP.  Most firewalls don't sort SMTP
traffic by subject.

and the point of this mailing list is...?  r-help ?

-- 
A.J. Rossini
[EMAIL PROTECTED]http://www.analytics.washington.edu/ 
Biomedical and Health Informatics   University of Washington
Biostatistics, SCHARP/HVTN  Fred Hutchinson Cancer Research Center
UW   :  FAX=206-543-3461 | moving soon to a permanent office
FHCRC: 206-667-7025 FAX=206-667-4812 | Voicemail is pretty sketchy/use Email

CONFIDENTIALITY NOTICE: This e-mail message and any attachme...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] compare two linear regression slopes

2003-08-19 Thread John Christie
On Tuesday, August 19, 2003, at 09:20  PM, Simon Blomberg wrote:

You need to look at Analysis of Covariance in any basic stats book. 
Basically, if you have y versus x for 2 groups (group is a factor), 
use lm to fit the model:

fit - lm(y ~ group + x + x:group, data=your.dat)
but, my situation is two separate regressions with different collected 
Y's and a predicted X.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] question for loop on matrix row level.

2003-08-19 Thread Lily
For the 1000 simulations, a matrix will be generated
each time. And, I need to choose the first row of the
generated matrix. The following loop doesn't work
though:

for (i in 1:1000) {

aval[i]- matrixname[1,]

}

Any solution? thanks!

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] question for loop on matrix row level.

2003-08-19 Thread Spencer Graves
Have you considered making aval an array with the same number of 
columns as matrixname?  Try the following:

aval - array(NA, dim=c(2,2))
for(i in 1:2){
matrixname - array(i+(1:4), dim=c(2,2))
aval[i,] - matrixname[1,]
}
aval
hope this helps.  spencer graves

Lily wrote:
For the 1000 simulations, a matrix will be generated
each time. And, I need to choose the first row of the
generated matrix. The following loop doesn't work
though:
for (i in 1:1000) {

aval[i]- matrixname[1,]

}

Any solution? thanks!

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread Richard A. O'Keefe
Padmanabhan, Sudharsha [EMAIL PROTECTED]
We know trhat as the sample size increases, the variance should
decrease,

Should it?

I can paraphrase his test case thus:

v100 - sapply(1:100, function(i) var(rnorm(100, 0, 3)))
# We expect the elements of v100 to cluster around 3^2
v1000 - sapply(1:1000, function(i) var(rnorm(1000, 0, 3)))
# We expect the elements of v1000 to cluster around 3^2 too.
fivenum(v100)
=  [1]  6.469134  7.884637  8.916314 10.189463 13.897817
#
fivenum(v1000)
=  [1]  7.874345  8.692326  8.967684  9.268955 10.503038
#

The population parameter sigma-squared is 3^2 = 9.
The estimates are 8.92 in one case and 8.97 in the other;
sounds about right to me.

Looking at density(v100) and density(v1000) is enlightening.

Means and standard deviations:

mean(v100)  var(v100)
=  9.0806762.376193
mean(v1000) var(v1000)
=  8.98147 0.1721246

Are these not pretty much as expected?  Not that a t-test is the
ideal test for the distributions involved, but it's familiar and
since the distribution is pretty bell-shaped, it may be usable as
a rough guide to whether to be worried or not.

 t.test(v100, v1000)

Welch Two Sample t-test

data:  v100 and v1000 
t = 0.6413, df = 100.439, p-value = 0.5228
alternative hypothesis: true difference in means is not equal to 0 
95 percent confidence interval:
 -0.2077100  0.4061231 
sample estimates:
mean of x mean of y 
 9.080676  8.981469

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] test for equal distributions with small numbes of observations

2003-08-19 Thread kjetil brinchmann halvorsen
On 19 Aug 2003 at 10:15, Christoph Lehmann wrote:

 Dear R-pros
 
 I have a problem, for which usually I would apply a chisq.test or a
 fisher.test:
 

try 
?chisq.test

which tells you you can say 
chisq.test(..., sim=TRUE, B=2)

and the simulation will be very fast!

Kjetil Halvorsen

 
 
 40 objects, each given either a 0 or 1, regarding if this object
 later on will be remembered by a subject or not.
 
 7 subjects investigated
 
 means: we have a 2x40 matrix, each cell the number of subjects for who
 the object i has been given either 0 or 1 e.g.
 
 objects:
   1   1   3   39  40
   --
 0   1   2   2   ..  7   7
 1   4   4   5   ..  0   0
 
 over all 40 objects, we have 67% of 1 and 33% of 0
 
 I want to know, if for the 40 objects, the ratio of 0/1 differs or
 not, i.e. if they have the same distribution.
 
 I cannot use a chisq.test since the expected frequencies are  5 for the
 0 cells.
 
 Fisher.test seems to run for  12h on a PIV 1.8GHz...
 
 what do you recommend me to do?
 
 Many thanks
 
 Christoph
 --
  recognition
  [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
 [1,]122223333 3 3 3 4 4
 [2,]445443444 4 3 4 3 3
  [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26]
 [1,] 4 4 4 4 4 4 5 5 5 5 5 5
 [2,] 3 2 3 3 2 3 2 2 2 2 2 2
  [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38]
 [1,] 5 5 5 5 5 6 6 6 6 6 6 6
 [2,] 2 2 2 2 2 1 1 1 1 1 1 1
  [,39] [,40]
 [1,] 7 7
 [2,] 0 0
 
  fisher.test(recognition)
 
 
 -- 
 Christoph Lehmann [EMAIL PROTECTED]
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] for those of you who want a patent...

2003-08-19 Thread Patrick Connolly
On Tue, 19-Aug-2003 at 09:41AM -0700, A.J. Rossini wrote:

| 
| Alvaro Munoz (Hopkins Epi) is patenting the diamond graph. 
| 
| http://www.jhsph.edu/Press_Room/Press_Releases/Munoz_diamond_graph.html
| 

| There is enough prior art (hexagonal binning, among others) to make
| this amusing, except that it probably will get a patent.  It's a
| reasonable graphical technique, but patentable?

Maybe so.  I read a story once that the idea of using different
colours to annotate a word processor document is patented.  This one
sounds at least as original, though not as original as a sunflower
plot.

Reckon I'll stick to contour plots rather than pay a licensing fee for
diamond graphs.  

[thinks maybe the way I use contour plots is unique ... maybe I
should bung in a patent application]


-- 
Patrick Connolly
HortResearch
Mt Albert
Auckland
New Zealand 
Ph: +64-9 815 4200 x 7188
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
I have the world`s largest collection of seashells. I keep it on all
the beaches of the world ... Perhaps you`ve seen it.  ---Steven Wright 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help