Re: [R] Fwd: R-Help

2006-12-07 Thread Uwe Ligges
Why do you repost this request to R-help?
I already pointed you to the package maintainer!

Uwe Ligges

amna khan wrote:
 -- Forwarded message --
 From: amna khan [EMAIL PROTECTED]
 Date: Dec 6, 2006 10:28 PM
 Subject: R-Help
 To: [EMAIL PROTECTED]
 
 Respected Sir
 I am a very new user of R. I want to ask a question about the nortest
 package. In this package how we can write the code of ad.test, cvm.test,
 ks.test for other distributions like GEV, GPA etc.
 
 I request you to please  guide to me.
 Kind Regards
 AMNA


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Splitting a dataframe at the results of tapply

2006-12-07 Thread Dimitris Rizopoulos
try this:

dat - data.frame(Id, Noise, Height)
##
dat - dat[order(dat$Id), ]
ind - unlist(tapply(dat$Noise, dat$Id, function(x) x == max(x)))
dat[ind, ]
dat[!ind, ]


I hope it helps.

Best,
Dimitris


Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
 http://www.student.kuleuven.be/~m0390867/dimitris.htm


- Original Message - 
From: E. Gordijn [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Sent: Thursday, December 07, 2006 8:48 AM
Subject: [R] Splitting a dataframe at the results of tapply


I have got a dataframe containing measurement of aircraft noise like
 this:

 Id - c(1,4,5,2,3,6,4,1,2,5,6,3)
 Noise - c(88,94,97,98,92,56,103,102,87,95,92,97)
 Height - c(190, 150, 120, 115, 188, 104, 101, 189, 146, 111, 124,
 126)

 df - data.frame(Id, Noise, Height)
 Now I would like to split this in two new dataframes. The first one
 containing the rows with the maximum Noise for each Id and in the 
 second
 the other rows.

 I manage to find that maximum Noise levels...

 m - tapply(df$Noise, Id.factor, max)
 m
   1   2   3   4   5   6
 102  98  97 103  97  92

 But how do I split my dataframe?


 -- 
Ed Gordijn
Adviseur geluidscapaciteit

Amsterdam Airport Schiphol
Business Area Aviation (A/CAP/EC)
Postbus 7501,  1118 ZG  Schiphol
Bezoekadres: Evert v/d Beekstraat 202, 1118 CP  Schiphol

tel   020 601 32 22
fax  020 601 21 34
e-mail  [EMAIL PROTECTED]

meer informatie is te vinden op www.schiphol.nl
 --


 ---
 This e-mail may contain confidential and privileged 
 material...{{dropped}}

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide 
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Heteroscedasticity consistent standard errors for Spatial error models

2006-12-07 Thread Roger Bivand
On Thu, 7 Dec 2006, Achim Zeileis wrote:

 On Thu, 7 Dec 2006, Samarasinghe, Oshadhi Erandika wrote:
 
  Hello,
 
  Could anyone please tell me how to estimate Heteroscedasticity
  Consistent standard errors for a Spatial error model? All the functions
  I have looked at only works for lm objects.
 
 I assume that you looked also at the sandwich package: The methods there
 do not only work for lm objects but are object-oriented, appropriate
 methods are already provided for a range of different object classes. So,
 in principle, you can plug in other models as well, potentially including
 spatial models if appropriate methods are provided. See
   vignette(sandwich-OOP, package = sandwich)
 
 Disclaimer: I'm not sure whether the spatial structure of spatial models
 will be appropriately captured by the class of estimators implemented in
 sandwich. But someone who knows spatial models and their HC covariances
 should be able to figure that out from the vignette above. I'm also not
 sure what specialized methods exist...

Typically, the use of HC covariances with these kinds of models is an 
inappropriate fix for missing variables and possibly also wrong functional 
forms. Some supervisors want them, but in practice fitting a better 
specified model is superior. It is also possible to sample from the fitted 
model - I've been looking at MH sampling from MCMCpack - and that I feel 
is a way to go if the model is badly specified and you can't do anything 
about it. 

Settings where natural experiments exist are also very helpful, with
shifts in coefficient values and/or standard errors indicating whether the
hypothesised cause of difference actually had an effect.

It can probably be done, and some journals/referees/supervisors etc. want 
HC covariances, but I'm afraid that doesn't necessarily mean that they are 
any use in practice with these pretty rough kinds of models.

Roger

 
 Best,
 Z
 
 
  Thank you very much!
 
  - Oshadhi
 
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: [EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Simulation in R

2006-12-07 Thread justin bem
Dear Alexender !

 In the instruction 
stichproben[i] - samp_i , 
samp_i is a vector while stichproben[i] is vector element 
It can be better to consider stichproben as a list at beginning e.g 
stichproben-list(0,0)
stichproben[[i]]-samp_i  will work 

This instruction is 
  ix - sample(n,200) is also incorrect because n length is equal to 1 and you 
want to extract 200 elements
  ix - ifelse(n=200,sample(1:n, 200),n)

 
Justin BEM
Elève Ingénieur Statisticien Economiste
BP 294 Yaoundé.
Tél (00237)9597295.

- Message d'origine 
De : Alexander Geisler [EMAIL PROTECTED]
À : r-help@stat.math.ethz.ch
Envoyé le : Jeudi, 7 Décembre 2006, 1h20mn 49s
Objet : [R] Simulation in R

Hello!

I have the following problem.

My code:

--snip--

ergebnisse - rep(0, each=2)
stichproben - rep(0, each=2)

for (i in seq(1:2)) {
n - dim(daten)[1]  
ix - sample(n,200) # producing samples
samp_i - daten[ix,]  
stichproben[i] - samp_i # doesn’t works

# Calculation of the model:
posterior_i - MCMClogit(y ~ fbl.ind + fekq3 + febitda4 + fuvs + fkru + 
fzd + fur3, data=samp_i, b0=prior, B0=precision, tune=0.5) # calculation
ergebnisse[i] - summary(posterior_i)  # saving the results (works)
}

--snip--

I have a data set called daten. I produce samples of the size 200. The 
samples are saved in samp_i.

Question:
How is the easiest way to save this samples. My code doesn't work, only 
the first column of the sample samp_i is in stichproben[i]. I understand 
why.
My idea is to define a array stichproben and then save a matrix in the 
particular fields of the array. But things like
y - matrix(c(samp_1),nrow=200, ncol=8)
and then saving y in the array stichproben doesn't work.
How is it possible to define a matrix with the content of my samples 
(samp_i) and but them into an array stichproben?
Or is there an easier way?

With kind regards
Alex

-- 
Alexander Geisler * Kaltenbach 151 * A-6272 Kaltenbach
email: [EMAIL PROTECTED] | [EMAIL PROTECTED]
phone: +43 650 / 811 61 90 | skpye: al1405ex

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.










___ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internaut

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] errors when setting up R2.4.0-win32.exe

2006-12-07 Thread Peter Dalgaard
zhijie zhang wrote:
 Dear Ruser,
   Today, i download R2.4.0-win32.exe, but can't set it up successfully. The
 error informaiton is :
 *0x38e4memory quoted by ox6c7f22b3 can't be readonly.*
 My operating system in WindowXP. Where goes wrong?
 Thanks.


   
If your computer is speaking Chinese, then this may be due to a bug that 
was fixed in R-patched. At this point in time, you might as well try out 
the test build of 2.4.1 beta, at

http://cran.r-project.org/bin/windows/base/rtest.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] beginning my R-learning

2006-12-07 Thread Michael Dewey
At 22:16 04/12/2006, Michael McCulloch wrote:
Hello,
I'm just beginning to learn R. What books/online learning modules 
with datasets would you suggest?
Thank you!

If
a) you already know some statistics
b) you want to use R as a tool in your applied statistical work
then
@BOOK{venables02,
   author = {Venables, W N and Ripley, B D},
   year = 2002,
   title = {Modern applied statistics with {S}},
   publisher = {Springer-Verlag},
   address = {New York},
   keywords = {statistics, general, software}
}
is worth considering. It is quite terse though (it is one of the few 
books I have which I wish were longer) and not so suitable if you are 
also learning statistics at the same time.



Best wishes,
Michael




Michael McCulloch
Pine Street Clinic
Pine Street Foundation
124 Pine Street, San Anselmo, CA 94960-2674
tel 415.407.1357
fax 415.485.1065
email:  [EMAIL PROTECTED]
web:www.pinest.org
 www.pinestreetfoundation.org
 www.medepi.net/meta



Michael Dewey
http://www.aghmed.fsnet.co.uk

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Betr.: Re: Splitting a dataframe at the results of tapply

2006-12-07 Thread E. Gordijn
Hi Dimitris,

This works fine.

Thanks!, Ed
-- 

-- 
Ed Gordijn
Adviseur geluidscapaciteit

Amsterdam Airport Schiphol
Business Area Aviation (A/CAP/EC)
Postbus 7501,  1118 ZG  Schiphol 
Bezoekadres: Evert v/d Beekstraat 202, 1118 CP  Schiphol

tel   020 601 32 22
fax  020 601 21 34
e-mail  [EMAIL PROTECTED] 

meer informatie is te vinden op www.schiphol.nl 
--


---
This e-mail may contain confidential and privileged material...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] POSIX and summer savings time redux

2006-12-07 Thread Derek Eder
When I tried Professor Ripley's example (below), the tz argument 
failed to adjust clock time from UTC.

  (z - ISOdatetime(1970,1,1,0,0,0, tz=UTC)+1165398135729/1000)
[1] 2006-12-06 09:42:15 UTC


  format(z, %Y-%m-%d %H:%M:%OS3,tz = CET)
[1] 2006-12-06 09:42:15.729
# expected CET (Central European Time) clock time is UTC + 1 hour time 
zone adjustment


Am I running into platform dependencies?

(my platform)
platform   i386-pc-mingw32
arch   i386   
os mingw32
system i386, mingw32  
status
major  2  
minor  4.0
year   2006   
month  10 
day03 
svn rev39566  
language   R  
version.string R version 2.4.0 (2006-10-03)


Thank you most sincerely,

Derek Eder



Prof Brian Ripley wrote:
 On Wed, 6 Dec 2006, Derek Eder wrote:

 I have a time stamp in UTC (GMT) time:

   format(ISOdatetime(1970,1,1,0,0,0)+1165398135729/1000,%Y-%m-%d
 %H:%M:%OS3)

 2006-12-06 09:42:18.823  (note millisecond accuracy, but not relevant
 to question here)

 But it is the wrong answer, and not what my system gives.

 Now, this time stamp actually happened at local (Swedish) time one
 hour later (10:42).

 So you need to tell R that it was in UTC, which is what the 'tz' 
 argument is for:

 (z - ISOdatetime(1970,1,1,0,0,0, tz=UTC)+1165398135729/1000)
 [1] 2006-12-06 09:42:15 UTC
 format(z, %Y-%m-%d %H:%M:%OS3, tz=CET)
 [1] 2006-12-06 10:42:15.729

 Regarding summer/winter adjustments in time (spring forward, fall
 back):   Is there a way of automatically recovering the local time
 adjustments for a given date?  E.g., a date/time in springtime = GMT +2
 , else GMT +1

 Is the above not enough?  You can unpick it if you want to get the shift.



-- 
Derek N. Eder

Gothenburg University 
VINKLA - Vigilance and Neurocognition laboratory 

SU/Sahlgrenska
Utvecklingslab 1, Med
Gröna stråket 8
SE 413 45 Göteborg (Gothenburg)
Sverige (Sweden)

+46 (031)* 342 8261 (28261 inom Sahlgrenska)
+46 0704 915 714 (mobile)
+46 (031) 25 97 07 (home)

* omit the 0 when calling from outside Sweden

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] POSIX and summer savings time redux

2006-12-07 Thread Prof Brian Ripley
CET is not a valid timezone *on Windows*: please do RTFM.
E.g. ?Sys.timezone says

  'Sys.timezone' returns an OS-specific character string, possibly
  an empty string.  It may be possible to set the timezone via the
  environment variable 'TZ': see 'as.POSIXlt'. Windows is
  notorious for naming its timezones differently from the official
  names.

and ?as.POSIXlt points you at

  a specification of the form 'GST-1GDT',

which seems to be the same as CET, and that works on my Windows laptop.
It is also possible that tz= works for you: it seems to for me when I 
set my machine to CET.

On Thu, 7 Dec 2006, Derek Eder wrote:

 When I tried Professor Ripley's example (below), the tz argument
 failed to adjust clock time from UTC.

  (z - ISOdatetime(1970,1,1,0,0,0, tz=UTC)+1165398135729/1000)
 [1] 2006-12-06 09:42:15 UTC


  format(z, %Y-%m-%d %H:%M:%OS3,tz = CET)
 [1] 2006-12-06 09:42:15.729
 # expected CET (Central European Time) clock time is UTC + 1 hour time
 zone adjustment


 Am I running into platform dependencies?

 (my platform)
 platform   i386-pc-mingw32
 arch   i386
 os mingw32
 system i386, mingw32
 status
 major  2
 minor  4.0
 year   2006
 month  10
 day03
 svn rev39566
 language   R
 version.string R version 2.4.0 (2006-10-03)


 Thank you most sincerely,

 Derek Eder



 Prof Brian Ripley wrote:
 On Wed, 6 Dec 2006, Derek Eder wrote:

 I have a time stamp in UTC (GMT) time:

  format(ISOdatetime(1970,1,1,0,0,0)+1165398135729/1000,%Y-%m-%d
 %H:%M:%OS3)

 2006-12-06 09:42:18.823  (note millisecond accuracy, but not relevant
 to question here)

 But it is the wrong answer, and not what my system gives.

 Now, this time stamp actually happened at local (Swedish) time one
 hour later (10:42).

 So you need to tell R that it was in UTC, which is what the 'tz'
 argument is for:

 (z - ISOdatetime(1970,1,1,0,0,0, tz=UTC)+1165398135729/1000)
 [1] 2006-12-06 09:42:15 UTC
 format(z, %Y-%m-%d %H:%M:%OS3, tz=CET)
 [1] 2006-12-06 10:42:15.729

 Regarding summer/winter adjustments in time (spring forward, fall
 back):   Is there a way of automatically recovering the local time
 adjustments for a given date?  E.g., a date/time in springtime = GMT +2
 , else GMT +1

 Is the above not enough?  You can unpick it if you want to get the shift.





-- 
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

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] barplot - how to force vertical axis to cover entire plot area

2006-12-07 Thread Uwe Ligges


Etienne wrote:
 I'm using barplot with the following call:
   
 barplot(stat_data[[5]][,],axes=TRUE,axisnames=TRUE,axis.lty=1,xlab=xlab,ylab=ylab,beside=TRUE,las=1,font.lab=2,font.axis=1,legend.text=TRUE)


The example is not reproducible and poorly formatted. Please read the 
posting guide.


 On some data, the vertical axis does not cover the
 whole plot area and the last tick mark is smaller than
 the maximum value.
 
 I tried setting the ylim values but even with that,
 some plots are still not OK, it just shrinks the
 length of the bars.


R tries to make the plot pretty, i.e. stop with some tick mark like 200, 
but not e.g. 242.

Perhaps you want to make a box() around the plot?


Uwe Ligges



 Attached is a png example of the problem.  I hope it
 gets through.
 
 Thanks,
 Etienne
 
 __
 
 
 
 
 
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] lmer, p-values and all that

2006-12-07 Thread Dan Bebber
Hello,
I've just located the illuminating explanation by Douglas Bates on degrees 
of freedom in mixed models.
The take-home message appears to be: don't trust the p-values from lme.
Questions:
Should I give up hypothesis testing for fixed effects terms in mixed models?
Has my time spent reading Pinheiro  Bates been in vain?
Is there a publication on this issue?

Thanks,
Dan Bebber

Department of Plant Sciences
University of Oxford

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] change factor level 1,2,3 to red,blue,dark

2006-12-07 Thread Uwe Ligges


Aimin Yan wrote:
 I am new to R. Maybe this is very simple question.
 I have a dataframe, there is column that is factor.
 This factor has three level that 1,2,3.
 Now I want to change these  level(1,2,3) to level(red,blue,dark).
 Does anybody how to do this job?


levels(dataframe$column) - c(red, blue, dark)

Uwe Ligges

 Thank you very much
 
 Aimin
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] change factor level 1,2,3 to red,blue,dark

2006-12-07 Thread Gregor Gorjanc
Aimin Yan aiminy at iastate.edu writes:
 I am new to R. Maybe this is very simple question.
 I have a dataframe, there is column that is factor.
 This factor has three level that 1,2,3.
 Now I want to change these  level(1,2,3) to level(red,blue,dark).
 Does anybody how to do this job?

levels() help page has entry about this. Try

x - factor(round(runif(n=10, min=1, max=3)))
x
 [1] 3 1 1 3 1 2 2 2 1 2
Levels: 1 2 3

levels(x) - list(red=c(1), blue=c(2), dark=c(3))
x
 [1] dark red  red  dark red  blue blue blue red  blue
Levels: red blue dark

You have factor in data.frame, so you have to use

levels(myDF$x) - ...


Gregor

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Calculating distance given coordinates

2006-12-07 Thread Anirudh V. S. Ruhil
Given the following data (see below) on nest locations (fid.albers = 149, 
148, etc.), I need to (a) calculate the distance between all fid pairs, and 
(b) flag all nests within an user-specified radius. What syntax will 
accomplish both tasks? If it helps, I have the nest locations as eastings 
and northings as well but thought better of estimating distance by 
calculating the root of the hypotenuse between all nest pairs.

 x.albers y.albers fid.albers
[1,]   723557   671748149
[2,]   723384   671867148
[3,]   723375   671757147
[4,]   723363   671824146

best

Ani

Anirudh V. S. Ruhil, Ph.D.
Sr. Research Associate
Voinovich Center for Leadership and Public Affairs
Ohio University
Building 21, The Ridges
Athens, OH 45701-2979
Tel: 740.597.1949 | Fax: 740.597.3057

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Taguchi Design

2006-12-07 Thread İbrahim Mutlay
Dear R Users,

If it is possible, i would like to learn whether a R package that can be
used for Taguchi design is available.

Sincerely

-- 
Ýbrahim Mutlay

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] incidence and adjacency matrix conversion

2006-12-07 Thread Philip Leifeld
Thanks, David. I tried converting my rectangular matrix to a network 
object and then back to a square matrix. This works for a small 
artificial dataset (e.g. 2x5), but when I try this on my 1790x45 or 
transposed 45x1790 matrix, R keeps working for a couple of minutes and 
then crashes completely without having saved any data first. I assume 
something is wrong with my data?

Cheers
Philip

David Barron wrote:
 I think you can do this using the network package.  Look at the
 as.network.matrix and as.matrix.network functions, for example.
 
 how can I convert an m x n incidence matrix into an m x m adjacency
 matrix or an n x n adjacency matrix? The current matrix contains binary
 data, hence the new matrix would contain counts of common occurrences.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Taguchi Design

2006-12-07 Thread İbrahim Mutlay
2006/12/7, Chuck Cleland [EMAIL PROTECTED]:

 Ýbrahim Mutlay wrote:
  Dear R Users,
 
  If it is possible, i would like to learn whether a R package that can be
  used for Taguchi design is available.

 Ibrahim:
   Have you considered functions in the AlgDesign package?

 http://cran.us.r-project.org/doc/packages/AlgDesign.pdf

 http://tolstoy.newcastle.edu.au/R/help/04/02/0217.html

 hope this helps,

 Chuck

  Sincerely
 
 
 
  
 
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.

 --
 Chuck Cleland, Ph.D.
 NDRI, Inc.
 71 West 23rd Street, 8th floor
 New York, NY 10010
 tel: (212) 845-4495 (Tu, Th)
 tel: (732) 512-0171 (M, W, F)
 fax: (917) 438-0894


I must thank you for your advise, i will see it.

-- 
Ýbrahim Mutlay

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Help to understand an Error using summary to an mcmc object

2006-12-07 Thread gsmatos1
Hi, 

I used the MCMCirtKd function of MCMCpack: 

posterior2 - MCMCirtKd(data, dimensions = 2, 
+burnin = 5000, mcmc = 5, thin = 10, 
+ verbose = 1, B0 = .25, store.item = TRUE, item.constraints = 
beta.constraints) 

And after apply the comand summary() I got some erros and warnings that I 
could not understand: 

summary.posterior2 - summary(posterior2) 

Error: NA/NaN/Inf in foreign function call (arg 1) 
In addition: Warning messages: 
1: algorithm did not converge in: glm.fit(x = X, y = Y, weights = weights, 
start = start, etastart = etastart, 
2: step size truncated due to divergence 
Error: NA/NaN/Inf in foreign function call (arg 1) 
In addition: There were 42 warnings (use warnings() to see them) 
Error: NA/NaN/Inf in foreign function call (arg 1) 
In addition: There were 35 warnings (use warnings() to see them) 
Error in glm.fit(x = X, y = Y, weights = weights, start = start, etastart = 
etastart,  : 
inner loop 1; cannot correct step size 
In addition: There were 49 warnings (use warnings() to see them) 
Error: NA/NaN/Inf in foreign function call (arg 1) 
In addition: Warning messages: 
1: algorithm did not converge in: glm.fit(x = X, y = Y, weights = weights, 
start = start, etastart = etastart, 
2: algorithm did not converge in: glm.fit(x = X, y = Y, weights = weights, 
start = start, etastart = etastart, 
3: algorithm did not converge in: glm.fit(x = X, y = Y, weights = weights, 
start = start, etastart = etastart, 
4: algorithm did not converge in: glm.fit(x = X, y = Y, weights = weights, 
start = start, etastart = etastart, 
5: algorithm did not converge in: glm.fit(x = X, y = Y, weights = weights, 
start = start, etastart = etastart, 
6: algorithm did not converge in: glm.fit(x = X, y = Y, weights = weights, 
start = start, etastart = etastart, 
7: algorithm did not converge in: glm.fit(x = X, y = Y, weights = weights, 
start = start, etastart = etastart, 
8: step size truncated due to divergence 
Error: NA/NaN/Inf in foreign function call (arg 1) 
In addition: There were 29 warnings (use warnings() to see them) 

Thanks for any comment. 
Gilberto Matos. 


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] templating library for R

2006-12-07 Thread Ido M. Tamir
Hi,

does anybody know of a templating library for R,
like velocity or freemarker?

It doesn't have to be very fancy just a bit
better than sub in replacing tags in a text (not
necessarily html) file.

thank you very much for your answer.

Ido

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Merging two data sets

2006-12-07 Thread Megh Dal
Dear all R users,
   
  Suppose I have two datasets:
   
  g = 
   
 8/11/200592.75 
 9/11/200592.30 
  10/11/200592.55 
  11/11/200593.90 
  11/14/200594.20 
  11/15/200594.40 
  11/16/200593.90 
  11/22/200594.60 
  11/24/200595.50 
  2/12/2005   101.00 
   
  and, 
   
  h = 
 11/8/200545.930
   11/9/200545.820
  11/10/2005   45.815
  11/11/2005   45.780
  11/12/200545.630
  11/13/200545.630
  11/14/200545.630
  11/15/200545.710
  11/16/200545.715
 11/17/2005 45.815
   
  I want to merge these two dataset like this:
   
 8/11/200592.75  NA
 9/11/200592.30  NA
  10/11/200592.55  NA
  11/11/200593.90 45.780
  11/14/200594.20 45.630
  11/15/200594.40 45.710
  11/16/200593.90 45.715
  11/22/200594.60  NA
  11/24/200595.50  NA
  2/12/2005   101.00   NA
   
  i.e. the length of final dataset should be same as 'g' regardless that of 2nd 
dataset.
   
   
  Can anyone tell me how to do this?
   
  I already used ?merge function like this:
   
  h = merge(g,f, by.x=Date, by.y=Date, sort=F, all.x=T, all.y = F, all=F)
   
  But it is not giving the thing that I want.
   
  Thanks


 
-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] [R-pkgs] trip package on CRAN

2006-12-07 Thread Michael Sumner
 Hello,

 The 'trip' package provides extensions to the 'sp' spatial classes for 
animal track data.

 Trip objects are created from SpatialPointsDataFrame objects by 
specifying the columns containing ID and date-time data. Argos formats 
can be read directly, and there are functions for basic speed filtering 
and spatial gridding of time spent. Tight integration with 'sp' means 
that projections and general I/O can be handled using 'rgdal'. (This 
really is excellent and so I thank the developers of these and 
supporting packages).

Trip is intended for use with location data that are irregularly spaced 
in time - this contrasts with the rationale behind the traj class in 
'adehabitat'. Primarily it has been developed with marine animal data in 
mind, but the validation of trip classes used should general for many 
applications.

 There is a short vignette available from here -  it's not integrated 
into the CRAN-available package yet.

 http://staff.acecrc.org.au/~mdsumner/Rutas/trip.pdf

 Cheers, Michael Sumner

___
R-packages mailing list
R-packages@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-packages

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Merging two data sets

2006-12-07 Thread Leeds, Mark \(IED\)
if you read them in as zoo objects , you can then use merge.zoo but but
I need to
Send you an example of reading them in as zoo objects.
Hold on.

I also have your binders on my shelf ready to send. I've just been
forgetting/busy.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Megh Dal
Sent: Thursday, December 07, 2006 3:35 AM
To: r-help@stat.math.ethz.ch
Subject: [R] Merging two data sets

Dear all R users,
   
  Suppose I have two datasets:
   
  g = 
   
 8/11/200592.75 
 9/11/200592.30 
  10/11/200592.55 
  11/11/200593.90 
  11/14/200594.20 
  11/15/200594.40 
  11/16/200593.90 
  11/22/200594.60 
  11/24/200595.50 
  2/12/2005   101.00 
   
  and, 
   
  h = 
 11/8/200545.930
   11/9/200545.820
  11/10/2005   45.815
  11/11/2005   45.780
  11/12/200545.630
  11/13/200545.630
  11/14/200545.630
  11/15/200545.710
  11/16/200545.715
 11/17/2005 45.815
   
  I want to merge these two dataset like this:
   
 8/11/200592.75  NA
 9/11/200592.30  NA
  10/11/200592.55  NA
  11/11/200593.90 45.780
  11/14/200594.20 45.630
  11/15/200594.40 45.710
  11/16/200593.90 45.715
  11/22/200594.60  NA
  11/24/200595.50  NA
  2/12/2005   101.00   NA
   
  i.e. the length of final dataset should be same as 'g' regardless that
of 2nd dataset.
   
   
  Can anyone tell me how to do this?
   
  I already used ?merge function like this:
   
  h = merge(g,f, by.x=Date, by.y=Date, sort=F, all.x=T, all.y = F,
all=F)
   
  But it is not giving the thing that I want.
   
  Thanks


 
-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Summary shows wrong maximum

2006-12-07 Thread Mike Prager
Bert--

Well, in an attempt to be pithy, I think I lost my message.

The comment was directed not at you specifically, but at the
idea that, given four print positions, one would ever want to
print zeroes instead of data without an explicit warning.

I quite agree with your comments on precision.  However, if more
than those two or three digits are *printed*, I think they
should be as accurate as possible, or accompanied in each place
by a written disclaimer.

Let's say that the mean of the data is not zero, but that the
precision is well within the range of floating point.  Then,
information is being thrown away for no clear reason.  What
makes it nasty in my opinion is that the information *appears*
to be there.  (Maybe this is a problem in semiotics.)  So while
I don't think 1.01e3 is more correct than 1010, it does not
appear to be conveying information that has been stripped from
the result.

Is the following really how we want R to work?

 a - c(19001., 19002., 19003., 19006.)
 summary(a)
   Min. 1st Qu.  MedianMean 3rd Qu.Max. 
  19000   19000   19000   19000   19000   19010 

Respectfully,
--Mike



Bert Gunter [EMAIL PROTECTED] wrote:

 Mike:
 
 I offered no opinion -- and really didn't have any -- about the worthiness
 of any of the comments that were made. I just liked Brian's little quotable
 aside.
 
 But since you bait me a bit ...
 
 In general, I believe that showing th 2-3 most important -- **not
 significant** -- digits **and no more** is desirable. By  most important I
 mean the leftmost digits which are changing in the data (there are some
 caveats in the presence of extreme outliers). Printing more digits merely
 obfuscates the ability of the eye/brain to perceive the patterns of change
 in the data, the presumed intent of displaying it (not of storing it, of
 course). Displaying excessive digits to demonstrate (usually falsely) one's
 precision is evil. Clarity of communications is the standard we should
 aspire to.
 
 These views have been more eloquently expressed by  A.S.C Ehrenburg and
 Howard Wainer among others...
 
 -- Bert
 
 
 Bert Gunter
 Nonclinical Statistics
 7-7374
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Mike Prager
 Sent: Wednesday, December 06, 2006 11:46 AM
 To: r-help@stat.math.ethz.ch
 Subject: Re: [R] Summary shows wrong maximum
 
 I don't know about candidacy, and I'm not going to argue about
 correctness, but it seems to me that the only valid reasons to
 limit precision of printing in a statistics program are (1) to
 save space and (2) to allow for machine limitations. This is
 neither. To chop off information and replace it with zeroes is
 just plain nasty.
 
 
 Bert Gunter [EMAIL PROTECTED] wrote:
 
   
  Folks:
  
  Is 
  
  So this is at best a matter of opinion, 
  and credentials do matter for opinions.
  
  -- Brian Ripley
  
  an R fortunes candidate?
  
  -- Bert Gunter
  
  
  On Tue, 5 Dec 2006, Oliver Czoske wrote:
  
   On Mon, 4 Dec 2006, Uwe Ligges wrote:
   Sebastian Spaeth wrote:
   Hi all,
   I have a list with a numerical column cum_hardreuses. By coincidence
 I
   discovered this:
  
   max(libs[,cum_hardreuses])
   [1] 1793
  
   summary(libs[,cum_hardreuses])
   Min. 1st Qu.  MedianMean 3rd Qu.Max.
  1   2   4  36  141790
  
   (note the max value of 1790) Ouch this is bad! Anything I can do to
  remedy
   this? Known bug?
  
   No, it's a feature! See ?summary: printing is done up to 3 significant
   digits by default.
  
   Unfortunately, '1790' is printed with *four* significant digits, not
   three. The correct representation with three significant digits would
 have
   to employ scientific notation, 1.79e3.
  
  

-- 
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] test of spatial dependence?? - ask an ecologist?

2006-12-07 Thread David Farrar
 
  Although you don't have coordinates, there has to be some kind of information 
on spatial relationships.  (I am likely saying the same thing as Roger.)  
   
  Let me see if I have this right.  Some large area is partitioned into cells 
(polygons in an ArcInfo shape file?) and, within each cell you compute 
something.  Then the distance between any two cells may be zero or one, one for 
any pair of cells that are adjacent, zero for any pair not adjacent.  
   
  It doesn't strike me as that odd a situation and so I think I would like to 
know what is a conventional solution.  One possibility would be to use 
Euclidean distances among centroids of cells.  
   
  I have not reviewed the basis of the Mantel tests used by ecologists.  If 
that is what you need, in looking for a program we would need to be mindful of 
the fact that a probably different Mantel test is used routinely for 
evaluation of disease data, in particular specialized as the logrank test of 
survival analysis.  
   
  regards, 
  Farrar
  

Roger Bivand [EMAIL PROTECTED] wrote:
  On Wed, 6 Dec 2006, Xu Yuan wrote:

 Thanks David and Milton for replies. No, I don't have the coordiates.
 In other words, my data are not point data. But I think there is a way
 to test of spatial dependence for areal data or lattice data. In this
 case, the variable of interest is typically the average value of an
 area instead of a point. Do you how to do this?

But do you know where the areas are in relation to each other? Does the 
spatialCovariance package help?

Roger

 
 Thank you.
 Xu
 
 On 12/6/06, Milton Cezar Ribeiro wrote:
 
  I never used it, but I beleave that it is a job for mantel.rtest() 
  available on ade4 package.
 
  In fact Farrar are right, you will neet the XY coordinates. Give a look at 
  Legendre  Legendre text book.
 
  HTH,
 
  Miltinho
  Brazil
 
  David Farrar escreveu:
 
 
  In addition to the 25 numbers, I assume you have coordinates of each field.
  Otherwise, I don't understand what you are trying to do. I think ecologists 
  like to use a test due to Mantel in this situation.
 
  The prefix auto means self, of course, the idea being that measurements 
  of the same variable under different conditions are correlated. I guess 
  this would be a case of autodependence. For correlation versus 
  dependence, check your intro stats book.
 
  de nada,
  X'X
 
  Farrar
 
 
  Xu Yuan wrote:
  hello R-friends,
 
  I am a R beginner and try to ask a basic question:
 
  How to test the spatial dependence of a column of data? for example, I have
  25 agricultural fields, and I measure the average slope (%) or pH for each
  field. All I have is 25 numbers.
 
  PS, could someone confirm that spatial dependence is equivalent to
  spatial correlation or spatial autocorrelation or not.
 
  Thank you very much.
  XY
 
  [[alternative HTML version deleted]]
 
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
  [[alternative HTML version deleted]]
 
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
 
  
 O Yahoo! está de cara nova. Venha conferir!
 
 
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: [EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] incidence and adjacency matrix conversion

2006-12-07 Thread Philip Leifeld
Thanks, David. I tried converting my rectangular matrix to a network 
object and then back to a square matrix. This works for a small 
artificial dataset (e.g. 2x5), but when I try this on my 1790x45 or 
transposed 45x1790 matrix, R keeps working for a couple of minutes and 
then crashes completely without having saved any data first. I assume 
something is wrong with my data?

Cheers
Philip

David Barron wrote:
  I think you can do this using the network package.  Look at the
  as.network.matrix and as.matrix.network functions, for example.
 
  how can I convert an m x n incidence matrix into an m x m adjacency
  matrix or an n x n adjacency matrix? The current matrix contains binary
  data, hence the new matrix would contain counts of common occurrences.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Calling R functions in Delphi

2006-12-07 Thread Anna Belova

Dear All,

Thank you very much for all the insights!

We truly appreciate your thought and your time.

--Anna
-
Anna Belova
Abt Associates Inc.
4800 Montgomery Ln, St 600
Bethesda, MD-20814
phone: 301-347-5304
http://www.abtassociates.com/environment

-
This message may contain privileged and confidential informa...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] groupedData Error Using outer=TRUE

2006-12-07 Thread Rick Bilonick
I'm using groupedData from nlme. I set up a groupedData data.frame with
outer=~group1. When I try to plot with outer=TRUE, I get subscript out
of bounds. This happens most of the time. When it works, I get
spaghetti-type plots for comparing groups. But I don't understand why it
doesn't usually work.

 longa.mod.1.gd - groupedData(mod1.logit~time|
name/eye,outer=~group1,data=longa.mod.1)
 plot(longa.mod.1.gd)
 plot(longa.mod.1.gd,outer=TRUE)
Error in attribs[[outer]][[displayLevel]] :
subscript out of bounds

What am I doing wrong?

Rick B.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] FW: test of spatial dependence?? - ask a geographer (was ask an ecologist)?

2006-12-07 Thread Marshall Feldman


No, you do not necessarily need the XY coordinates. You can also use polygon
(field, in your case) adjacency information. See Rogerson, Peter A. 2001.
_Statistical methods for geography_. Thousand Oaks: Sage.

You might also look at GeoDA, a free and soon-to-be open source spatial
analysis package. For your application, it might be easier to use than R. Go
to https://www.geoda.uiuc.edu/.

Marshall Feldman
Center for Urban Studies and Research
The University of Rhode Island

-Original Message-
From: Milton Cezar Ribeiro [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 06, 2006 8:26 AM
To: David Farrar; Xu Yuan; r-help@stat.math.ethz.ch
Subject: Re: [R] test of spatial dependence?? - ask an ecologist?

I never used it, but I beleave that it is a job for mantel.rtest()
available on ade4 package.
   
  In fact Farrar are right, you will neet the XY coordinates. Give a look at
Legendre  Legendre text book.
   
  HTH,
   
  Miltinho
  Brazil

David Farrar [EMAIL PROTECTED] escreveu:
  

In addition to the 25 numbers, I assume you have coordinates of each field.
Otherwise, I don't understand what you are trying to do. I think ecologists
like to use a test due to Mantel in this situation. 

The prefix auto means self, of course, the idea being that measurements
of the same variable under different conditions are correlated. I guess this
would be a case of autodependence. For correlation versus dependence,
check your intro stats book. 

de nada, 
X'X 

Farrar 


Xu Yuan wrote:
hello R-friends,

I am a R beginner and try to ask a basic question:

How to test the spatial dependence of a column of data? for example, I have
25 agricultural fields, and I measure the average slope (%) or pH for each
field. All I have is 25 numbers.

PS, could someone confirm that spatial dependence is equivalent to
spatial correlation or spatial autocorrelation or not.

Thank you very much.
XY

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



-

[[alternative HTML version deleted]]





Dr. Marshall Feldman, PhD
Director of Research and Academic Affairs
Center for Urban Studies and Research 
The University of Rhode Island
email: marsh @ uri.edu (remove spaces) 
telephone: (401) 277-5218 (Providence); (401) 874-5953 (Kingston)
fax: (401) 277-5464 (Providence); (401) 874-5511 (Kingston)
Providence address:
206E Shepard Building
80 Washington Street
Providence, RI 02903-1819
Kingston address:
310 Lippitt Hall
Kingston, RI 02881-0815

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] incidence and adjacency matrix conversion

2006-12-07 Thread Martin Maechler
 Phil == Philip Leifeld [EMAIL PROTECTED]
 on Tue, 05 Dec 2006 22:30:02 +0100 writes:

Phil Dear all,
Phil how can I convert an m x n incidence matrix into an m x m adjacency 
Phil matrix or an n x n adjacency matrix? The current matrix contains 
binary 
Phil data, hence the new matrix would contain counts of common occurrences.

You have not given a self contained reproducible example
which would even be useful in such a case..

But just to be sure that the solution is not as simple as I
thought it was -- namely I thought, that for binary matrices,
crossprod()  and tcrossprod() would give what you'd want :

 n -   10 ; m - 4
 set.seed(1)
 M - matrix(as.logical(rbinom(n*m, size=1, prob = 0.3)), n,m)
 symnum(M)
 
 [1,] . . | .
 [2,] . . . .
 [3,] . . . .
 [4,] | . . .
 [5,] . | . |
 [6,] | . . .
 [7,] | | . |
 [8,] . | . .
 [9,] . . | |
[10,] . | . .
 print.table(A.1 - tcrossprod(M), zero = .)
  [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]1.......1 .
 [2,]......... .
 [3,]......... .
 [4,]...1.11.. .
 [5,]....2.211 1
 [6,]...1.11.. .
 [7,]...121311 1
 [8,]....1.11. 1
 [9,]1...1.1.2 .
[10,]....1.11. 1
 print.table(A.2 -  crossprod(M), zero = .)
 [,1] [,2] [,3] [,4]
[1,]31.1
[2,]14.2
[3,]..21
[4,]1213
 


Phil Thank you for your help.

you're welcome (if it did help).

Martin Maechler, ETH Zurich

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] plot SVM

2006-12-07 Thread Aimin Yan
I use svm , then I want to do like this
But give me this error. Does anyone know how to solve these?

Aimin

  plot(m.svm,p5.new,As~Cur)
Error in scale(newdata[, object$scaled, drop = FALSE], center = 
object$x.scale$scaled:center,  :
 (subscript) logical subscript too long

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Ivailo Stoyanov
Dear Rexperts,

after building R 2.4.0 from source in a temporary directory (*without* 
installation), and subsequently moving the whole source/build tree to 
another location, I have noticed that I had to change the variables 
R_SHARE_DIR, R_INCLUDE_DIR, and R_DOC_DIR in the wrapper-script 
/lib/R/bin/R as to reflect the current situation.

However, when I try to run the HTML help via help.start() I still get an 
error message saying that:

sh: /tmp/r-project-build/usr/lib/R/share/sh/help-links.sh: No such file 
or directory

Interestingly, the system still tries to search for scripts in 
/tmp/r-project-build/, the temporary build directory that clearly isn't 
valid now.

My question is: has the mentioned path become hard-coded in the binaries 
or am I
missing some config-file/wrapper script that needs to be edited in order 
to reflect the current state?

Thank you in advance for any hints!

All the best,
Ivailo

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Marc Schwartz
On Thu, 2006-12-07 at 19:34 +0200, Ivailo Stoyanov wrote:
 Dear Rexperts,
 
 after building R 2.4.0 from source in a temporary directory (*without* 
 installation), and subsequently moving the whole source/build tree to 
 another location, I have noticed that I had to change the variables 
 R_SHARE_DIR, R_INCLUDE_DIR, and R_DOC_DIR in the wrapper-script 
 /lib/R/bin/R as to reflect the current situation.
 
 However, when I try to run the HTML help via help.start() I still get an 
 error message saying that:
 
 sh: /tmp/r-project-build/usr/lib/R/share/sh/help-links.sh: No such file 
 or directory
 
 Interestingly, the system still tries to search for scripts in 
 /tmp/r-project-build/, the temporary build directory that clearly isn't 
 valid now.
 
 My question is: has the mentioned path become hard-coded in the binaries 
 or am I
 missing some config-file/wrapper script that needs to be edited in order 
 to reflect the current state?
 
 Thank you in advance for any hints!
 
 All the best,
 Ivailo

When you moved the source/build tree to another location, did you
use 'make install' as root, or did you use 'mv' or 'cp'?

The former is the _proper_ way to actually install R, after building
from source and this is covered in the R Admin Manual. See:

  http://cran.r-project.org/doc/manuals/R-admin.html#Installation

HTH,

Marc Schwartz

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Ivailo Stoyanov
 When you moved the source/build tree to another location, did you
 use 'make install' as root, or did you use 'mv' or 'cp'?

No, I haven't used make install because I prefer to run R from within 
the build location.

 The former is the _proper_ way to actually install R, after building
 from source and this is covered in the R Admin Manual. See:
 
   http://cran.r-project.org/doc/manuals/R-admin.html#Installation

AFAIK, the approach of running R from within the build location is fully 
valid as it is noted at the end of section 2.1 Simple compilation, 
just above the cited one:

... Note: you do not need to install R: you can run it from where it 
was built.

All the best,
Ivailo

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Peter Dalgaard
Ivailo Stoyanov wrote:
 When you moved the source/build tree to another location, did you
 use 'make install' as root, or did you use 'mv' or 'cp'?
 

 No, I haven't used make install because I prefer to run R from within 
 the build location.

   
 The former is the _proper_ way to actually install R, after building
 from source and this is covered in the R Admin Manual. See:

   http://cran.r-project.org/doc/manuals/R-admin.html#Installation
 

 AFAIK, the approach of running R from within the build location is fully 
 valid as it is noted at the end of section 2.1 Simple compilation, 
 just above the cited one:
   
Yes, but then it is not actually installed.
 ... Note: you do not need to install R: you can run it from where it 
 was built.
   
You can, but note that it doesn't say that you can move the build 
location afterwards, and in fact, you can not, because of the 
non-relative pathnames.
 All the best,
 Ivailo


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Marc Schwartz
On Thu, 2006-12-07 at 20:15 +0200, Ivailo Stoyanov wrote:
  When you moved the source/build tree to another location, did you
  use 'make install' as root, or did you use 'mv' or 'cp'?
 
 No, I haven't used make install because I prefer to run R from within 
 the build location.
 
  The former is the _proper_ way to actually install R, after building
  from source and this is covered in the R Admin Manual. See:
  
http://cran.r-project.org/doc/manuals/R-admin.html#Installation
 
 AFAIK, the approach of running R from within the build location is fully 
 valid as it is noted at the end of section 2.1 Simple compilation, 
 just above the cited one:
 
 ... Note: you do not need to install R: you can run it from where it 
 was built.
 
 All the best,
 Ivailo

A key piece of information not in your original post was that you were
not installing R, but wanted to run it from whence it was built...and
then moved it and were attempting to run it from a new location.

You will need to change $R_HOME, which defines the primary home
directory for the currently running R session.  This is defined in the
main R startup script, which will be in the 'bin' sub-directory for your
R tree.

I have not validated this that will do it, but short of re-building R in
the new location, this should work I think. Many of the environmental
vars are hard coded during the build process and then modified during a
make install based upon build time configuration options. If you want
to install R in a non-default location, I would suggest considering
modifying the ./configure options and then building to suit your needs.

HTH,

Marc

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Ivailo Stoyanov
Peter Dalgaard wrote:
[snip]
 AFAIK, the approach of running R from within the build location is 
 fully valid as it is noted at the end of section 2.1 Simple 
 compilation, just above the cited one:
   
 Yes, but then it is not actually installed.
[snip]
 ... Note: you do not need to install R: you can run it from where it 
 was built.
   
 You can, but note that it doesn't say that you can move the build 
 location afterwards, and in fact, you can not, because of the 
 non-relative pathnames.

Actually, I have used R for a long time without any (apparent) problems 
being installed this way. I just changed the mentioned variables 
manually, and everything was running just fine -- until I needed to 
check the HTML help recently. Therefore I thought that I've missed to 
fix some config-file in an analogous maner to solve the problem with the 
script that wasn't found by the system.

I assume that I have to recompile (something that I was hoping to avoid 
due to the rather decent system I use currently) to get this issue 
fixed. Am I right?

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] making a grid of points

2006-12-07 Thread Ross Boylan
I'd like to evaluate a function at each point on a 2 or 3-D grid.  Is
there some function that already does this, or generates the grid of
points?

My search has led me to the grid and lattice packages, and I found a
reference to the sp package (e.g., SpatialGrid) for this.  There are
things in there that might be relevant, but at first blush many of them
are embedded in other concepts (grobs, shingles, rugs) and don't
obviously solve the problem.

I know this is not a hard thing to program, but I suspect someone has
already done it.  Any pointers?

Thanks.
-- 
Ross Boylan  wk:  (415) 514-8146
185 Berry St #5700   [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics   fax: (415) 514-8150
University of California, San Francisco
San Francisco, CA 94107-1739 hm:  (415) 550-1062

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] making a grid of points

2006-12-07 Thread Peter Alspach

Ross

I think you want

?expand.grid

BTW, help.search('grid') finds this.

Cheers ..

Peter Alspach


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Ross Boylan
 Sent: Friday, 8 December 2006 8:03 a.m.
 To: r-help
 Subject: [R] making a grid of points

 I'd like to evaluate a function at each point on a 2 or 3-D
 grid.  Is there some function that already does this, or
 generates the grid of points?

 My search has led me to the grid and lattice packages, and I
 found a reference to the sp package (e.g., SpatialGrid) for
 this.  There are things in there that might be relevant, but
 at first blush many of them are embedded in other concepts
 (grobs, shingles, rugs) and don't obviously solve the problem.

 I know this is not a hard thing to program, but I suspect
 someone has already done it.  Any pointers?

 Thanks.
 --
 Ross Boylan  wk:  (415) 514-8146
 185 Berry St #5700   [EMAIL PROTECTED]
 Dept of Epidemiology and Biostatistics   fax: (415) 514-8150
 University of California, San Francisco
 San Francisco, CA 94107-1739 hm:  (415) 550-1062

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__

The contents of this e-mail are privileged and/or confidenti...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] making a grid of points

2006-12-07 Thread Ross Boylan
On Fri, 2006-12-08 at 08:09 +1300, Peter Alspach wrote:
 Ross
 
 I think you want
 
 ?expand.grid
 
 BTW, help.search('grid') finds this.
 
 Cheers ..
 
 Peter Alspach
 
I can't believe I missed that--my eye just jumped to all the stuff in
the grid package.  Thank you.
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Ross Boylan
  Sent: Friday, 8 December 2006 8:03 a.m.
  To: r-help
  Subject: [R] making a grid of points
 
  I'd like to evaluate a function at each point on a 2 or 3-D
  grid.  Is there some function that already does this, or
  generates the grid of points?
 
  My search has led me to the grid and lattice packages, and I
  found a reference to the sp package (e.g., SpatialGrid) for
  this.  There are things in there that might be relevant, but
  at first blush many of them are embedded in other concepts
  (grobs, shingles, rugs) and don't obviously solve the problem.
 
  I know this is not a hard thing to program, but I suspect
  someone has already done it.  Any pointers?
 
  Thanks.
  --
  Ross Boylan  wk:  (415) 514-8146
  185 Berry St #5700   [EMAIL PROTECTED]
  Dept of Epidemiology and Biostatistics   fax: (415) 514-8150
  University of California, San Francisco
  San Francisco, CA 94107-1739 hm:  (415) 550-1062
 
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide
  http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
 __
 
 The contents of this e-mail are privileged and/or confidential to the
 named recipient and are not to be used by any other person and/or
 organisation. If you have received this e-mail in error, please notify
 the sender and delete all material pertaining to this e-mail.
 __
-- 
Ross Boylan  wk:  (415) 514-8146
185 Berry St #5700   [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics   fax: (415) 514-8150
University of California, San Francisco
San Francisco, CA 94107-1739 hm:  (415) 550-1062

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] making a grid of points

2006-12-07 Thread Roger Bivand
On Thu, 7 Dec 2006, Ross Boylan wrote:

 I'd like to evaluate a function at each point on a 2 or 3-D grid.  Is
 there some function that already does this, or generates the grid of
 points?
 
 My search has led me to the grid and lattice packages, and I found a
 reference to the sp package (e.g., SpatialGrid) for this.  There are
 things in there that might be relevant, but at first blush many of them
 are embedded in other concepts (grobs, shingles, rugs) and don't
 obviously solve the problem.
 
 I know this is not a hard thing to program, but I suspect someone has
 already done it.  Any pointers?

Which space are your points in? The sp package might help if the data 
are spatial/geographical, but I think that expand.grid() is your friend, 
followed by one of the apply() family to run your function on each row of 
the data frame output by expand.grid().

Roger


 
 Thanks.
 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: [EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Ivailo Stoyanov
Marc Schwartz wrote:
 I have not validated this that will do it, but short of re-building R in
 the new location, this should work I think. Many of the environmental
 vars are hard coded during the build process and then modified during a
 make install based upon build time configuration options. If you want
 to install R in a non-default location, I would suggest considering
 modifying the ./configure options and then building to suit your needs.
 
 HTH,
 
 Marc

OK, I'll check the ./configure options passed through the build script I 
used last time.

Thanks to all helpers so far,
Ivailo

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] groupedData Error Using outer=TRUE

2006-12-07 Thread Deepayan Sarkar
On 12/7/06, Rick Bilonick [EMAIL PROTECTED] wrote:
 I'm using groupedData from nlme. I set up a groupedData data.frame with
 outer=~group1. When I try to plot with outer=TRUE, I get subscript out
 of bounds. This happens most of the time. When it works, I get
 spaghetti-type plots for comparing groups. But I don't understand why it
 doesn't usually work.

  longa.mod.1.gd - groupedData(mod1.logit~time|
 name/eye,outer=~group1,data=longa.mod.1)
  plot(longa.mod.1.gd)
  plot(longa.mod.1.gd,outer=TRUE)
 Error in attribs[[outer]][[displayLevel]] :
 subscript out of bounds

 What am I doing wrong?

Hard to say:

 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

-Deepayan

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] help-links.sh not found by help.start() -- do I need to recompile?

2006-12-07 Thread Ivailo Stoyanov
Thanks to the valuable hints posted, I managed to track down the source 
of the problem -- a copy of the *uncorrected* /usr/lib/R/bin/R script 
was left over in /usr/bin.

Thank you again for the patience!

Greets,
Ivailo

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Heteroscedasticity consistent standard errors for Spatial error models

2006-12-07 Thread Samarasinghe, Oshadhi Erandika

Thank you very much for your help, much appreciated.


Regards,

Oshadhi Samarasinghe
RA
Department of Economics 
University of Auckland
New Zealand 

-Original Message-
From: Roger Bivand [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 7 December 2006 10:18 p.m.
To: Achim Zeileis
Cc: Samarasinghe, Oshadhi Erandika; r-help@stat.math.ethz.ch
Subject: Re: [R] Heteroscedasticity consistent standard errors for
Spatial error models

On Thu, 7 Dec 2006, Achim Zeileis wrote:

 On Thu, 7 Dec 2006, Samarasinghe, Oshadhi Erandika wrote:
 
  Hello,
 
  Could anyone please tell me how to estimate Heteroscedasticity 
  Consistent standard errors for a Spatial error model? All the 
  functions I have looked at only works for lm objects.
 
 I assume that you looked also at the sandwich package: The methods 
 there do not only work for lm objects but are object-oriented, 
 appropriate methods are already provided for a range of different 
 object classes. So, in principle, you can plug in other models as 
 well, potentially including spatial models if appropriate methods are
provided. See
   vignette(sandwich-OOP, package = sandwich)
 
 Disclaimer: I'm not sure whether the spatial structure of spatial 
 models will be appropriately captured by the class of estimators 
 implemented in sandwich. But someone who knows spatial models and 
 their HC covariances should be able to figure that out from the 
 vignette above. I'm also not sure what specialized methods exist...

Typically, the use of HC covariances with these kinds of models is an
inappropriate fix for missing variables and possibly also wrong
functional forms. Some supervisors want them, but in practice fitting a
better specified model is superior. It is also possible to sample from
the fitted model - I've been looking at MH sampling from MCMCpack - and
that I feel is a way to go if the model is badly specified and you can't
do anything about it. 

Settings where natural experiments exist are also very helpful, with
shifts in coefficient values and/or standard errors indicating whether
the hypothesised cause of difference actually had an effect.

It can probably be done, and some journals/referees/supervisors etc.
want HC covariances, but I'm afraid that doesn't necessarily mean that
they are any use in practice with these pretty rough kinds of models.

Roger

 
 Best,
 Z
 
 
  Thank you very much!
 
  - Oshadhi
 
  __
  R-help@stat.math.ethz.ch mailing list 
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide 
  http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide 
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 

--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: [EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] I do not understand this

2006-12-07 Thread Tom Backer Johnsen
A few days ago there was a thread on calling R from Delphi to which 
there were several useful responses.  Now I responded as well, with 
what I regard as a useful contribution.  Shortly after that, I was not 
able to able to see the thread in my newsreader (Thunderbird). 
Suddenly, yesterday I could see the thread again, and now it has 
vanished, at least from my sight.

Now.  Is there an error in my reader, or more likely, an error in my 
use of the reader.  Or, has the thread been deleted for some reason. 
I wonder ...

Tom
-- 
++
| Tom Backer Johnsen, Psychometrics Unit,  Faculty of Psychology |
| University of Bergen, Christies gt. 12, N-5015 Bergen,  NORWAY |
| Tel : +47-5558-9185Fax : +47-5558-9879 |
| Email : [EMAIL PROTECTED]URL : http://www.galton.uib.no/ |
++

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] I do not understand this

2006-12-07 Thread Francisco J. Zagmutt
I use thunderbird as my newsreader and I see the thread just fine. So, 
don't worry, nobody has deleted what you regard as a useful contribution.

Regards

Francisco

Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University


Tom Backer Johnsen wrote:
 A few days ago there was a thread on calling R from Delphi to which 
 there were several useful responses.  Now I responded as well, with 
 what I regard as a useful contribution.  Shortly after that, I was not 
 able to able to see the thread in my newsreader (Thunderbird). 
 Suddenly, yesterday I could see the thread again, and now it has 
 vanished, at least from my sight.
 
 Now.  Is there an error in my reader, or more likely, an error in my 
 use of the reader.  Or, has the thread been deleted for some reason. 
 I wonder ...
 
 Tom

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] I do not understand this

2006-12-07 Thread Peter Dalgaard
Tom Backer Johnsen wrote:
 A few days ago there was a thread on calling R from Delphi to which 
 there were several useful responses.  Now I responded as well, with 
 what I regard as a useful contribution.  Shortly after that, I was not 
 able to able to see the thread in my newsreader (Thunderbird). 
 Suddenly, yesterday I could see the thread again, and now it has 
 vanished, at least from my sight.

 Now.  Is there an error in my reader, or more likely, an error in my 
 use of the reader.  Or, has the thread been deleted for some reason. 
 I wonder ...

 Tom
   
How are you reading R-help?

Fundamentally, R-help is email based, so once a mail is sent, only the 
receiver is involved in where it gets (mis)filed.

If you are using a mail-to-news gateway like gmane, then there could be 
an issue with retention times. However, in the case of gmane, I doubt 
that would be the case because the thread is here:

http://thread.gmane.org/gmane.comp.lang.r.general/75135/focus=75164

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Simulation in R - Part 2

2006-12-07 Thread Alexander Geisler
Hello!

So, the simulation works (drawing 100 samples and then calculate the
model for each sample). Here is the code:

--snip--
# sample size n=200
ergebnisse200 - rep(0, each=100)
stichproben200 - vector(“list”, 100)
default200 - rep(0, each=100)

for (i in seq(1:100)) {
n - dim(daten)[1]  
ix - sample(n,200) 
samp_i - daten[ix,]# draw samples
y - sum(samp_i$y) # number of defaults
stichproben200[[i]] - samp_i  # saving the samples
default200[i] - y   # saving the number of defaults

# Modell berechnen:
posterior_i - MCMClogit(y ~ fbl.ind + fekq3 + febitda4 + fuvs + fkru +
fzd + fur3, data=samp_i, b0=prior, B0=precision, tune=0.5) # calculation
ergebnisse200[i] - summary(posterior_i)  # saving the results
}

# write out the solutions into an excel-file
write.csv2(ergebnisse200, ergebnisse.csv)
--snip--

My solution has the following form:

http://img296.imageshack.us/my.php?image=ergebnissewa0.jpg

write.csv2 makes the right thing, but in the excel-file, if I open the
csv-file in excel, several objects are next to each other (I'm missing
the line break after each object of the array); look at
http://img67.imageshack.us/my.php?image=ergebnisseexcelbg7.jpg
The problem is that there is an error message by importing the csv in 
excel, because there are to many columns needed to import the 100 objects.

So, my question:
Is it possible to write the 100 objects of the array among each other.
Like as it can be seen in R 
(http://img296.imageshack.us/my.php?image=ergebnissewa0.jpg)?
Another way is to produce 50 samples in a first turn and then produce 50 
samples again in another turn, but this can not be a clean solution 
(and surely not the only one).

Hopefully you can help me and this is the last question for my simulation.

Thanks for your efforts
Alex

-- 
Alexander Geisler * Kaltenbach 151 * A-6272 Kaltenbach
email: [EMAIL PROTECTED] | [EMAIL PROTECTED]
phone: +43 650 / 811 61 90 | skpye: al1405ex

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] templating library for R

2006-12-07 Thread Gabor Grothendieck
I am not familiar with velocity or freemarker but
the gsubfn package can do string interpolation
somewhat similar to perl.  The gsubfn and strapply
functions in that package can handle arbitrary regular
expressions in a similar way. See:

http://code.google.com/p/gsubfn/



On 12/7/06, Ido M. Tamir [EMAIL PROTECTED] wrote:
 Hi,

 does anybody know of a templating library for R,
 like velocity or freemarker?

 It doesn't have to be very fancy just a bit
 better than sub in replacing tags in a text (not
 necessarily html) file.

 thank you very much for your answer.

 Ido

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] svm plot question

2006-12-07 Thread Aimin Yan
I run the following code, all other is ok,
but plot(m.svm,p5.new,As~Cur) is not ok

Anyone know why?

install.packages(e1071)
library(e1071)
library(MASS)
p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;)
p5.new-subset(p5,select=-Ms)
p5.new$Y-factor(p5.new$Y)
levels(p5.new$Y) - list(Out=c(1), In=c(0))
attach(p5.new)
m.svm-svm(Y~P+Aa+As+Cur,data=p5.new)
summary(m.svm)
plot(m.svm,p5.new,As~Cur)

Here is output:

  install.packages(e1071)
--- Please select a CRAN mirror for use in this session ---
trying URL 
'http://rh-mirror.linux.iastate.edu/CRAN/bin/windows/contrib/2.4/e1071_1.5-16.zip'
Content type 'application/zip' length 592258 bytes
opened URL
downloaded 578Kb

package 'e1071' successfully unpacked and MD5 sums checked

The downloaded packages are in
 C:\Documents and Settings\aiminy\Local 
Settings\Temp\RtmpY0B2qb\downloaded_packages
updating HTML package descriptions
  library(e1071)
Loading required package: class
  library(MASS)
  p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;)
  p5.new-subset(p5,select=-Ms)
  p5.new$Y-factor(p5.new$Y)
  levels(p5.new$Y) - list(Out=c(1), In=c(0))
  attach(p5.new)
  m.svm-svm(Y~P+Aa+As+Cur,data=p5.new)
  summary(m.svm)

Call:
svm(formula = Y ~ P + Aa + As + Cur, data = p5.new)


Parameters:
SVM-Type:  C-classification
  SVM-Kernel:  radial
cost:  1
   gamma:  0.04

Number of Support Vectors:  758

  ( 382 376 )


Number of Classes:  2

Levels:
  Out In



  plot(m.svm,p5.new,As~Cur)
Error in scale(newdata[, object$scaled, drop = FALSE], center = 
object$x.scale$scaled:center,  :
 (subscript) logical subscript too long
 
 

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] I do not understand this

2006-12-07 Thread Tom Backer Johnsen
Peter Dalgaard wrote:
 Tom Backer Johnsen wrote:
 A few days ago there was a thread on calling R from Delphi to which 
 there were several useful responses.  Now I responded as well, with 
 what I regard as a useful contribution.  Shortly after that, I was not 
 able to able to see the thread in my newsreader (Thunderbird). 
 Suddenly, yesterday I could see the thread again, and now it has 
 vanished, at least from my sight.

 Now.  Is there an error in my reader, or more likely, an error in my 
 use of the reader.  Or, has the thread been deleted for some reason. I 
 wonder ...

 Tom
   
 How are you reading R-help?

Well, using Thunderbird with a filter, throwing everything with [R] in 
the subject line into a category or box.
 
 Fundamentally, R-help is email based, so once a mail is sent, only the 
 receiver is involved in where it gets (mis)filed.

That's what I thought, so it may have something to do with my 
settings.  Strange, but I have never seen this before.
 
 If you are using a mail-to-news gateway like gmane, then there could be 
 an issue with retention times. However, in the case of gmane, I doubt 
 that would be the case because the thread is here:
 
 http://thread.gmane.org/gmane.comp.lang.r.general/75135/focus=75164

OK.  That's a relief.  I'll switch both mode paranoid and wonder 
to off and look at the settings of my mail program.  In any case, 
thank you!!

And by the way, your book is very nice for an R newbie like me.

Tom

++
| Tom Backer Johnsen, Psychometrics Unit,  Faculty of Psychology |
| University of Bergen, Christies gt. 12, N-5015 Bergen,  NORWAY |
| Tel : +47-5558-9185Fax : +47-5558-9879 |
| Email : [EMAIL PROTECTED]URL : http://www.galton.uib.no/ |
++

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to use read.xls in R

2006-12-07 Thread Lisa Wang
Hello there,

In gdata package, read.xls is to be used for reading excel data (from
windows). 
The following is my code:('C:/session/sampledata.xls' is where the file
is stored)

data1-read.xls('C:/session/sampledata.xls',sheet=1)

and I got the following error message:
Error in system(cmd, intern = !verbose) : perl not found

Could you please tell me what I have done wrong and how I should do it?

Thanks a lot

Lisa Wang 
Princess Margaret Hospital, Toronto, Ca
tel:416 946 4551

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to use read.xls in R

2006-12-07 Thread Sundar Dorai-Raj


Lisa Wang said the following on 12/7/2006 3:01 PM:
 Hello there,
 
 In gdata package, read.xls is to be used for reading excel data (from
 windows). 
 The following is my code:('C:/session/sampledata.xls' is where the file
 is stored)
 
 data1-read.xls('C:/session/sampledata.xls',sheet=1)
 
 and I got the following error message:
 Error in system(cmd, intern = !verbose) : perl not found
 
 Could you please tell me what I have done wrong and how I should do it?
 
 Thanks a lot
 
 Lisa Wang 
 Princess Margaret Hospital, Toronto, Ca
 tel:416 946 4551
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

Please reread ?read.xls. Quote from the Note section:

Either a working version of Perl must be present in the executable 
search path, or the exact path of the perl executable must be provided 
via the perl argument. See the examples below for an illustration.

You need to install perl.

http://www.activestate.com/Products/ActivePerl/Download.html

HTH,

--sundar

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] lmer, p-values and all that

2006-12-07 Thread Simon Blomberg
Try using mcmcsamp() to sample from the posterior distribution of the 
parameter estimates. You can calculate a p-value from that, if that is 
your desire. Instructions are in the R wiki:  
http://wiki.r-project.org/rwiki/doku.php?id=guides:lmer-tests

HTH,

Simon.


Dan Bebber wrote:
 Hello,
 I've just located the illuminating explanation by Douglas Bates on degrees 
 of freedom in mixed models.
 The take-home message appears to be: don't trust the p-values from lme.
 Questions:
 Should I give up hypothesis testing for fixed effects terms in mixed models?
 Has my time spent reading Pinheiro  Bates been in vain?
 Is there a publication on this issue?

 Thanks,
 Dan Bebber

 Department of Plant Sciences
 University of Oxford

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

   


-- 
Simon Blomberg, B.Sc.(Hons.), Ph.D, M.App.Stat. 
Centre for Resource and Environmental Studies
The Australian National University  
Canberra ACT 0200   
Australia   
T: +61 2 6125 7800 email: Simon.Blomberg_at_anu.edu.au
F: +61 2 6125 0757
CRICOS Provider # 00120C

The combination of some data and an aching desire for 
an answer does not ensure that a reasonable answer 
can be extracted from a given body of data.
- John Tukey.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to use read.xls in R

2006-12-07 Thread Gabor Grothendieck
You need perl installed for it to work.
Although you normally would not need to use them note the
verbose= and perl= arguments on the read.xls command.

If you don't want to install perl try using RODBC:

  library(RODBC)
  z - odbcConnectExcel(/a.xls)
  dd - sqlFetch(z,Sheet1)
  close(z)


On 12/7/06, Lisa Wang [EMAIL PROTECTED] wrote:
 Hello there,

 In gdata package, read.xls is to be used for reading excel data (from
 windows).
 The following is my code:('C:/session/sampledata.xls' is where the file
 is stored)

 data1-read.xls('C:/session/sampledata.xls',sheet=1)

 and I got the following error message:
 Error in system(cmd, intern = !verbose) : perl not found

 Could you please tell me what I have done wrong and how I should do it?

 Thanks a lot

 Lisa Wang
 Princess Margaret Hospital, Toronto, Ca
 tel:416 946 4551

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to use read.xls in R

2006-12-07 Thread Francisco J. Zagmutt
Or alternatively you can use xlsReadWrite package

install.packages(xlsReadWrite)
library(xlsReadWrite)
read.xls(sampledata.xls)

Regards,

Francisco

Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University


Gabor Grothendieck wrote:
 You need perl installed for it to work.
 Although you normally would not need to use them note the
 verbose= and perl= arguments on the read.xls command.
 
 If you don't want to install perl try using RODBC:
 
   library(RODBC)
   z - odbcConnectExcel(/a.xls)
   dd - sqlFetch(z,Sheet1)
   close(z)
 
 
 On 12/7/06, Lisa Wang [EMAIL PROTECTED] wrote:
 Hello there,

 In gdata package, read.xls is to be used for reading excel data (from
 windows).
 The following is my code:('C:/session/sampledata.xls' is where the file
 is stored)

 data1-read.xls('C:/session/sampledata.xls',sheet=1)

 and I got the following error message:
 Error in system(cmd, intern = !verbose) : perl not found

 Could you please tell me what I have done wrong and how I should do it?

 Thanks a lot

 Lisa Wang
 Princess Margaret Hospital, Toronto, Ca
 tel:416 946 4551

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] groupedData Error Using outer=TRUE

2006-12-07 Thread Andrew Robinson
Rick,

I think that it will be easier for us to comment if you send us
reproducible code.  Cna you reproduce the error, for example, using
one of the datasets that accompanise the nlme package?  If so, please
send us that code.  If not, then there could bea problem with your
data.  Either way, we're in a better position to help you.

Cheers,

Andrew

On Thu, Dec 07, 2006 at 11:02:38AM -0500, Rick Bilonick wrote:
 I'm using groupedData from nlme. I set up a groupedData data.frame with
 outer=~group1. When I try to plot with outer=TRUE, I get subscript out
 of bounds. This happens most of the time. When it works, I get
 spaghetti-type plots for comparing groups. But I don't understand why it
 doesn't usually work.
 
  longa.mod.1.gd - groupedData(mod1.logit~time|
 name/eye,outer=~group1,data=longa.mod.1)
  plot(longa.mod.1.gd)
  plot(longa.mod.1.gd,outer=TRUE)
 Error in attribs[[outer]][[displayLevel]] :
 subscript out of bounds
 
 What am I doing wrong?
 
 Rick B.
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

-- 
Andrew Robinson  
Department of Mathematics and StatisticsTel: +61-3-8344-9763
University of Melbourne, VIC 3010 Australia Fax: +61-3-8344-4599
http://www.ms.unimelb.edu.au/~andrewpr
http://blogs.mbs.edu/fishing-in-the-bay/

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] please help me for svm plot question

2006-12-07 Thread Aimin Yan
I run the following code, all other is ok,
but plot(m.svm,p5.new,As~Cur) is not ok

Anyone know why?

install.packages(e1071)
library(e1071)
library(MASS)
p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;)
p5.new-subset(p5,select=-Ms)
p5.new$Y-factor(p5.new$Y)
levels(p5.new$Y) - list(Out=c(1), In=c(0))
attach(p5.new)
m.svm-svm(Y~P+Aa+As+Cur,data=p5.new)
summary(m.svm)
plot(m.svm,p5.new,As~Cur)

Here is output:

  install.packages(e1071)
--- Please select a CRAN mirror for use in this session ---
trying URL 
'http://rh-mirror.linux.iastate.edu/CRAN/bin/windows/contrib/2.4/e1071_1.5-16.zip'
Content type 'application/zip' length 592258 bytes
opened URL
downloaded 578Kb

package 'e1071' successfully unpacked and MD5 sums checked

The downloaded packages are in
 C:\Documents and Settings\aiminy\Local 
Settings\Temp\RtmpY0B2qb\downloaded_packages
updating HTML package descriptions
  library(e1071)
Loading required package: class
  library(MASS)
  p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;)
  p5.new-subset(p5,select=-Ms)
  p5.new$Y-factor(p5.new$Y)
  levels(p5.new$Y) - list(Out=c(1), In=c(0))
  attach(p5.new)
  m.svm-svm(Y~P+Aa+As+Cur,data=p5.new)
  summary(m.svm)

Call:
svm(formula = Y ~ P + Aa + As + Cur, data = p5.new)


Parameters:
SVM-Type:  C-classification
  SVM-Kernel:  radial
cost:  1
   gamma:  0.04

Number of Support Vectors:  758

  ( 382 376 )


Number of Classes:  2

Levels:
  Out In



  plot(m.svm,p5.new,As~Cur)
Error in scale(newdata[, object$scaled, drop = FALSE], center = 
object$x.scale$scaled:center,  :
 (subscript) logical subscript too long
 
 

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] please help me for svm plot question

2006-12-07 Thread Aimin Yan
I run the following code, all other is ok,
but plot(m.svm,p5.new,As~Cur) is not ok

Anyone know why?

install.packages(e1071)
library(e1071)
library(MASS)
p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;)
p5.new-subset(p5,select=-Ms)
p5.new$Y-factor(p5.new$Y)
levels(p5.new$Y) - list(Out=c(1), In=c(0))
attach(p5.new)
m.svm-svm(Y~P+Aa+As+Cur,data=p5.new)
summary(m.svm)
plot(m.svm,p5.new,As~Cur)

Here is output:

  install.packages(e1071)
--- Please select a CRAN mirror for use in this session ---
trying URL 
'http://rh-mirror.linux.iastate.edu/CRAN/bin/windows/contrib/2.4/e1071_1.5-16.zip'
Content type 'application/zip' length 592258 bytes
opened URL
downloaded 578Kb

package 'e1071' successfully unpacked and MD5 sums checked

The downloaded packages are in
 C:\Documents and Settings\aiminy\Local 
Settings\Temp\RtmpY0B2qb\downloaded_packages
updating HTML package descriptions
  library(e1071)
Loading required package: class
  library(MASS)
  p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;)
  p5.new-subset(p5,select=-Ms)
  p5.new$Y-factor(p5.new$Y)
  levels(p5.new$Y) - list(Out=c(1), In=c(0))
  attach(p5.new)
  m.svm-svm(Y~P+Aa+As+Cur,data=p5.new)
  summary(m.svm)

Call:
svm(formula = Y ~ P + Aa + As + Cur, data = p5.new)


Parameters:
SVM-Type:  C-classification
  SVM-Kernel:  radial
cost:  1
   gamma:  0.04

Number of Support Vectors:  758

  ( 382 376 )


Number of Classes:  2

Levels:
  Out In



  plot(m.svm,p5.new,As~Cur)
Error in scale(newdata[, object$scaled, drop = FALSE], center = 
object$x.scale$scaled:center,  :
 (subscript) logical subscript too long
 
 

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] svm code, what is wrong here?

2006-12-07 Thread Aimin Yan

  install.packages(e1071)
Warning: package 'e1071' is in use and will not be installed
  library(e1071)
  library(MASS)
  p5 - read.csv(http://www.public.iastate.edu/~aiminy/data/p_5_2.csv;)
  attach(p5)

 The following object(s) are masked from p5 ( position 3 ) :

  Aa As Cur Ms P Y


 The following object(s) are masked from p5 ( position 4 ) :

  Aa As Cur Ms P Y

  m.svm-svm(as.factor(Y)~.,data=p5)
  summary(m.svm)

Call:
svm(formula = as.factor(Y) ~ ., data = p5)


Parameters:
SVM-Type:  C-classification
  SVM-Kernel:  radial
cost:  1
   gamma:  0.03846154

Number of Support Vectors:  755

  ( 377 378 )


Number of Classes:  2

Levels:
  0 1



  plot(m.svm,p5,As~Cur)
Error in scale(newdata[, object$scaled, drop = FALSE], center = 
object$x.scale$scaled:center,  :
 (subscript) logical subscript too long
 
 

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] plot.svm

2006-12-07 Thread Aimin Yan
where is plot.svm method?
I just find plot(svm, data, formula) method

Aimin

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] formula format for parameter estimation

2006-12-07 Thread Wayne Delport
Hello, I am trying to input the following formula into R for parameter 
estimation. I don't quite have the just of formula syntax. I understand 
simple basic regression (y ~ x), but how do I do the ff:

y = ( b0*x )/(x + b1),

where b0 and b1 are parameters that need to be solved. Any 
help/suggestions for a newbie would be much appreciated. thanks ./w

Wayne Delport

Molecular Ecology and Evolution Programme
Department of Genetics
University of Pretoria
Pretoria
0002
South Africa

Percy FitzPatrick Institute of African Ornithology
University of Cape Town
Rondebosch
Cape Town
7701
South Africa

640K ought to be enough for anybody Bill Gates, 1981

I love deadlines, I love the whooshing noise they make as they go by. 
Douglas Adams

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.