Re: [R] Maximum Likelihood Estimation

2006-04-04 Thread Uwe Ligges
Andrej Kastrin wrote: Uwe Ligges wrote: [EMAIL PROTECTED] wrote: Hi, I would like to know how to configure R so that I can enter some values and compute the Muximum likelihood estimation of my data. Maximum likelihood estimation of what? I do not know the definition of Maximum

Re: [R] weird max behavior for difftime class

2006-04-04 Thread Prof Brian Ripley
On Mon, 3 Apr 2006, Jacob Wegelin wrote: If you apply the max function to a vector of class difftime with units=days, the returned value is in units of seconds. Is this not a bug? At any rate it can lead to confusing results if one buries a call to max deep in some data analysis code. Why

[R] Packages reappear for installation each time update.packages() is run

2006-04-04 Thread Bernt Guldbrandtsen
Hi, Whenever I run update.packages() certain packages reappear over and over again as packages to be updated. Specifically, the problems appear with the packages gregmisc and gap: update.packages() gregmisc : Version 2.0.7 installed in /usr/local/lib/R/library Version 2.0.8 available at

[R] package, please! {was testing proportional hazard ...}

2006-04-04 Thread Martin Maechler
Christos == Christos Hatzis [EMAIL PROTECTED] on Mon, 3 Apr 2006 15:10:00 -0400 writes: Christos See ?cox.zph Christos in library 'survival' Package! The command library(pkg) gets a package from a library (location), loads it and attaches it to search(). But these basic objects

Re: [R] Packages reappear for installation each time update.packages() is run

2006-04-04 Thread Prof Brian Ripley
Both gregmisc and gap have been converted to package bundles and back again to single packages. You need to remove them and all their constituent packages, and then reinstall gap (gregmisc is an empty shell now). The problem is caused by the packages which the bundles once contained. You

[R] Date bug?

2006-04-04 Thread natalia norden
Hello, I have problems using the functions as.Date and strptime/strftime of base package and some functions of package zoo in my computer (Apple, Mac OS X 10.3.9). When I use them, the R application closes... However, it depends on the length of the vector I want to transform. For example,

[R] xyplot: getting data into the panel function

2006-04-04 Thread Søren Højsgaard
In xyplot, I would like to get the data into the panel function in the following sense: Consider xyplot(scc~time|cowidp, data=cow.s,type=c(l), panel=function(x,y,subscripts,...){ panel.xyplot(x,y,...) vvv-cow.s[which(!is.na(cow.s[subscripts,mastreat])),time]

[R] Re : about the generalized linear models

2006-04-04 Thread justin bem
Hi, The geometrical distribution is a particular case of negative binomial distribution. See in MASS try help.search(negative.binomial) - Message d'origine De : [EMAIL PROTECTED] À : r-help@stat.math.ethz.ch Envoyé le : Mardi, 4 Avril 2006, 3h06mn 48s Objet :

Re: [R] lm - Generalized Inverse

2006-04-04 Thread Doran, Harold
You can do this yourself with ginv() -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cal Stats Sent: Monday, April 03, 2006 7:40 PM To: r-help@stat.math.ethz.ch Subject: [R] lm - Generalized Inverse Hi, is there a lm which will implement the

Re: [R] xyplot: getting data into the panel function

2006-04-04 Thread Sundar Dorai-Raj
Søren Højsgaard wrote: In xyplot, I would like to get the data into the panel function in the following sense: Consider xyplot(scc~time|cowidp, data=cow.s,type=c(l), panel=function(x,y,subscripts,...){ panel.xyplot(x,y,...)

Re: [R] xyplot: getting data into the panel function

2006-04-04 Thread Sundar Dorai-Raj
Sundar Dorai-Raj wrote: Søren Højsgaard wrote: In xyplot, I would like to get the data into the panel function in the following sense: Consider xyplot(scc~time|cowidp, data=cow.s,type=c(l), panel=function(x,y,subscripts,...){ panel.xyplot(x,y,...)

[R] documenting s4 methods in package

2006-04-04 Thread Steven Lacey
Hi, I have written a package that contains many s4 generic functions and associated methods. I am having a lot of trouble getting R to build the help pages for these generic functions without reporting, missing link(s): ~~fun~~, which means that it cannot find the appropriate function when code

[R] Fisher's discriminant functions

2006-04-04 Thread C NL
Hi, I am trying to solve a discriminant analysis in the same way as SPSS does it. I mean, given an amount of data, to train the discriminant analysis I obtain the Fisher's discriminant functions, an array of coefficients per group, so if I have 8 groups I get 8 linear functions, that allow

[R] EM algorithm

2006-04-04 Thread michela . cameletti
Dear R-Users, I have a model with a latent variable for a spatio-temporal process. I would like to use EM algorithm to estimate the parameters. Does anybody know how to implement the algorithm in R? Thank you very much in advance, Michela __

Re: [R] documenting s4 methods in package

2006-04-04 Thread Thomas Lumley
On Tue, 4 Apr 2006, Steven Lacey wrote: Hi, I have written a package that contains many s4 generic functions and associated methods. I am having a lot of trouble getting R to build the help pages for these generic functions without reporting, missing link(s): ~~fun~~, which means that it

[R] desmon library

2006-04-04 Thread Lisa Wang
Hello there, I would like to use Dr. simon's two stage design library. I found one source on the internet saying that it's available in desmon library but I can not find this package under R project. Please help with it. Thank you very much Lisa Wang Toronto,ca

[R] Knuth's algorithm X

2006-04-04 Thread Robin Hankin
Hi has anyone coded up Donald Knuth's algorithm X for solving the exact cover problem? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __

Re: [R] EM algorithm

2006-04-04 Thread Ted Harding
On 04-Apr-06 [EMAIL PROTECTED] wrote: Dear R-Users, I have a model with a latent variable for a spatio-temporal process. I would like to use EM algorithm to estimate the parameters. Does anybody know how to implement the algorithm in R? Yes, many do! But the EM algorithm is a very very

Re: [R] argv[0] --- again

2006-04-04 Thread ivo welch
I am amazed at the stuff Gabor knows. After I jokingly suggested R manuals were his bedtime reading he pretty much agreed: he reads documentation and code. He is in any case an extraordinary resource, and his contributions to this list are second to none. He has my vote of appreciation.

Re: [R] -newbie | RODBC import query

2006-04-04 Thread Jeff Newmiller
Evan Cooch wrote: [...] OK, so after a bit of reading, seems I need to use RODBC (I'm using [R] 2.2.1 for Windows, at the moment). But, I can't seem to figure out the basics. Suppose the file I need to 'work with' is test.dbf So, I try the following: library(RODBC); import_dat -

Re: [R] model comparison with mixed effects glm

2006-04-04 Thread Spencer Graves
It's not clear from your email what you tried, but anova to compare two glmmPQL fits would not work for me. I switched to lmer and got reasonable answers. The first includes what worked for me then what I tried unsuccessfully with glmmPQL: library(MASS) # for the bacteria data used

[R] Problem with Crawley book example

2006-04-04 Thread Ronaldo Reis-Jr.
Hi, I try to run the example of Crawley's Book on the page 661, but it fail, look repmeasures - read.table(../Packages/Crawley/data/repmeasures.txt,header=T) attach(repmeasures) rep - as.factor(rep) library(nlme) model - lme(height~seed,random=~time|rep/seed) Erro em lme.formula(height ~

[R] R performance: different CPUs

2006-04-04 Thread Toby Muhlhofer
Hello! I need to purchase a new box, which I would like to optimize for good R performance. For the record, I will run Fedora Core 5 as and OS, and I wanted to know if anyone has experience with how the following affects R performance: - Is there a big advantage to having a 64-bit CPU over

Re: [R] EM algorithm

2006-04-04 Thread Marco Geraci
Hi Michela, I'd like to add to Ted's message that the statistical journals represent a good 'source' for R to look at. Sometimes the authors of the papers need to implement their own algorithms and they make them available upon request. You might want to check the literature and send some emails

Re: [R] -newbie | RODBC import query

2006-04-04 Thread Prof Brian Ripley
Here is real example anyone can use since it ships with R. library(RODBC) con - odbcConnectDbase(system.file(files, sids.dbf, package=foreign)) tmp - sqlFetch(con, sids) close(con) As I have written before, .dbf is not well-defined, and it depends on Microsoft's driver and your database

Re: [R] model comparison with mixed effects glm

2006-04-04 Thread hadley wickham
### To get around that, I computed 2*log(likelihood ratio) manually: lglk0 - logLik(fit0) lglk.ID1. - logLik(Fit.ID1.) pchisq(as.numeric(chisq.ID.), 1, lower=FALSE) [1] 0.008545848 (I think you're missing a line in there) But isn't this rather perilous unless you are confident that the

[R] Selecting from a Dataframe

2006-04-04 Thread Dan Chan
Hi, I have a data frame with many fields and there are many records. One of the fields is county names in Georgia. I want to select all the records for 3 of the counties. How can I do that? DailyCounty is the dataframe that holds the data. One of the fields is County. The following

Re: [R] Selecting from a Dataframe

2006-04-04 Thread Berton Gunter
?%in% as in chosenCounties-subset(DailyCounty, DailyCounty$County%in% c(Appling,county2Name,county3Name)) -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box

Re: [R] Selecting from a Dataframe

2006-04-04 Thread Andy Bunn
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Dan Chan Sent: Tuesday, April 04, 2006 1:42 PM To: r-help@stat.math.ethz.ch Subject: [R] Selecting from a Dataframe Hi, I have a data frame with many fields and there are many records. One of the

Re: [R] documenting s4 methods in package

2006-04-04 Thread Steven Lacey
Thomas, If I delete the \seealso section, I still get the same strange behavior. Shouldn't removing that line fix the problem? Thanks, Steve -Original Message- From: Thomas Lumley [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 04, 2006 10:13 AM To: Steven Lacey Cc:

Re: [R] documenting s4 methods in package

2006-04-04 Thread Steven Lacey
Thomas, Correction! If I remove the \seealso line the missing ~~fun~~ disppears (thank you!), but now chm appears at the end of the line decribing the help page building. Most lines do not have that, only text htm1 latex example. What does the chm signify and how does one get rid of it? Thanks,

[R] DISPLAYING A HISTOGRAM + finding NAs

2006-04-04 Thread mark salsburg
I have a vector of values (about 8000 obs between 0 and 1). I want to display a histogram as follows: value of vector ( bw 0 and 1)| | | | |

[R] generating LaTeX tables from Match output

2006-04-04 Thread Brian Quinif
Dear R users, I am using the Match function to generate nearest neighbor matching estimators. On that front I am ok, but where I am having problems is getting my output into nice LaTeX tables. Here is some basic code imitating the estimation I'm doing. No problem there. library(Matching)

[R] Selecting out certain values from a MATRIX

2006-04-04 Thread mark salsburg
I have two objects, one matrix and one vector. I want to use my vector to subset certain values out of my matrix. For example: I want to tell R, to select out all rows in myMatrix into a new myMatrix2 IF that corresponding row is less than a 0.5 in myVector. So: myMatrix = a matrix of 8000 by

[R] Financial functions

2006-04-04 Thread vittorio
In what R package(-s) can I find the entire set of financial functions that you can find in MS-Excel such as PMT, PPMT, FV and IPMT? Ciao Vittorio __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] documenting s4 methods in package

2006-04-04 Thread Duncan Murdoch
On 4/4/2006 1:58 PM, Steven Lacey wrote: Thomas, Correction! If I remove the \seealso line the missing ~~fun~~ disppears (thank you!), but now chm appears at the end of the line decribing the help page building. Most lines do not have that, only text htm1 latex example. What does the chm

[R] how to delete the bar in the right of filled.contour map

2006-04-04 Thread zhang jian
I did the contour map by filled contour and I want to add some points in this map. But It cannot be added truely because the bar is in the right. I want to know how to delete the bar in the right or add the points in the contour map. Thanks! [[alternative HTML version deleted]]

Re: [R] how to delete the bar in the right of filled.contour map

2006-04-04 Thread Roger Bivand
On Tue, 4 Apr 2006, zhang jian wrote: I did the contour map by filled contour and I want to add some points in this map. But It cannot be added truely because the bar is in the right. I want to know how to delete the bar in the right or add the points in the contour map. Please see the Note

[R] Mpirun with R CMD scripts

2006-04-04 Thread Srividya Valivarthi
Hi, I am working on a 64-bit rocks cluster and am relatively new to the R package. I am trying to get Snow working with R and Rmpi and have run into the following issue. R is able to load the Rmpi and snow libraries and is able to run simple commands both interactively and batch as follows:

Re: [R] Problem with Crawley book example

2006-04-04 Thread Ronaldo Reis-Jr.
Em Terça 04 Abril 2006 13:52, Dimitris Rizopoulos escreveu: change the number of EM iterations and try again, this has worked for me, some times, when I received the same error message as you did, i.e., library(nlme) model - lme(height ~ seed, random = ~ time | rep / seed, control =

Re: [R] Selecting out certain values from a MATRIX

2006-04-04 Thread mark salsburg
Thank you Dr. Burns, I tried that, but I don't think it accomplishes what I intended. Let me try to explain better. I have myMatrixmyMatrix2 (8000 by 20) (8000 by 1) myMatrix2 is the variance across the rows of myMatrix. I want to subset

Re: [R] Selecting out certain values from a MATRIX

2006-04-04 Thread Phil Spector
myMatrix[myVector .5,] or subset(myMatrix,myVector .5) - Phil Spector Statistical Computing Facility Department of Statistics UC

Re: [R] model comparison with mixed effects glm

2006-04-04 Thread Spencer Graves
You are correct on both counts. The exta line is inserted below; obviously, I had it but failed to copy it into the email. And you are also correct that one needs to be careful that both glm and lmer are using comparable definitions for the log(likelihood). My crude check

Re: [R] xyplot: getting data into the panel function

2006-04-04 Thread Deepayan Sarkar
On 4/4/06, Søren Højsgaard [EMAIL PROTECTED] wrote: In xyplot, I would like to get the data into the panel function in the following sense: Consider xyplot(scc~time|cowidp, data=cow.s,type=c(l), panel=function(x,y,subscripts,...){ panel.xyplot(x,y,...)

Re: [R] generating LaTeX tables from Match output

2006-04-04 Thread Soukup, Mat
Hi Brian, I think the following should work, although this may not be the most elegant solution. dat - matrix(c(a$est, b$est,a$se, b$se), ncol=2) colnames(dat) - c('Estimate','SE') latex(dat, file='C:/Temp/out.tex', rowlabel='', digits=3) HTH, -Mat -Original

[R] Indexing a vector by a list of vectors

2006-04-04 Thread Erik Iverson
Hello R-help - I have vec - c(string1, string2, string3) ind - list(c(1,2),c(1,2,3)) I want vec indexed by each vector in the list ind. The first element of the list I want would be vec[c(1,2)], the second element would be vec[c(1,2,3)], like the following. [[1]] [1] string1 string2 [[2]] [1]

Re: [R] u value

2006-04-04 Thread Seyed Reza Jafarzadeh
# two-tailed 0.05 / 2 [1] 0.025 # for the lower tail qnorm(c(0.025), mean=0, sd=1, lower.tail=TRUE) [1] -1.959964 # for the upper tail qnorm(c(0.025), mean=0, sd=1, lower.tail=FALSE) [1] 1.959964 On 3/30/06, ronggui [EMAIL PROTECTED] wrote: qnorm(1-0.05/2) [1] 1.959964

Re: [R] Indexing a vector by a list of vectors

2006-04-04 Thread Gabor Grothendieck
The following is quite simple although it does use a function: lapply(ind, function(x) vec[x]) and if you really don't want to use a function then try: mapply([, rep(list(vec), length(ind)), ind) On 4/4/06, Erik Iverson [EMAIL PROTECTED] wrote: Hello R-help - I have vec -

Re: [R] Indexing a vector by a list of vectors

2006-04-04 Thread Gabor Grothendieck
In thinking about this a bit more the second one can be simplified to: mapply([, list(vec), ind) On 4/4/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: The following is quite simple although it does use a function: lapply(ind, function(x) vec[x]) and if you really don't want to use a

Re: [R] rowVars

2006-04-04 Thread Brahm, David
I've written a rowVars function, but I don't think it throws the error you mention. You're welcome to use it if you like. rowVars - function(x, na.rm=FALSE, dims=1, unbiased=TRUE, SumSquares=FALSE, twopass=FALSE) { if (SumSquares) return(rowSums(x^2, na.rm, dims)) N -

[R] Grid graphics issues

2006-04-04 Thread Chris Bergstresser
Hi all -- So I'm trying to use lattice graphics, but I want to use a sunflower plot, which doesn't seem to be part of lattice. No problem, I put together the following code, which mostly works -- *except* for the first graph it generates. If it opens the graphic device, then it draws the

Re: [R] Grid graphics issues

2006-04-04 Thread Paul Murrell
Hi Chris Bergstresser wrote: Hi all -- So I'm trying to use lattice graphics, but I want to use a sunflower plot, which doesn't seem to be part of lattice. No problem, I put together the following code, which mostly works -- *except* for the first graph it generates. If it opens the

[R] Help on computing a matrix from another matrix in R

2006-04-04 Thread Russ Branaghan
Hello All, I am new to R and am having a problem. I have the following 29 x 5 array called temp with a mode list. Sincere Exciting Competent Sophisticated Rugged 3.5 2.5 3.8 3.53.0 2.0 2.5 3.5 2.52.3 2.8 3.0 2.3 1.51.8

[R] F test for clustered data regression ?

2006-04-04 Thread Benn Fine
I am using the Design library and robcov to compute variance-covariance matrices for clustered data regression. Is there an easy way to compute the F-test (i.e. linear hypothesis) for clustered data regression ? Thanks in advance! Benn __

Re: [R] Help on computing a matrix from another matrix in R

2006-04-04 Thread Berton Gunter
temp is a data.frame, not an array. Have you read An Introduction to R? If not, please do so before posting. You might also save yourself a lot of time if you learned to use R's search facilties, (help.search(), RSiteSearch()). R is a mature product with an incredible amount of excellent code

Re: [R] F test for clustered data regression ?

2006-04-04 Thread Frank E Harrell Jr
Benn Fine wrote: I am using the Design library and robcov to compute variance-covariance matrices for clustered data regression. Is there an easy way to compute the F-test (i.e. linear hypothesis) for clustered data regression ? Thanks in advance! Benn Once you adjust for clustering

[R] data.frame to list

2006-04-04 Thread Larry Howe
Hi, I'm new to R, and I'm not a statistician (stunned silence). I am trying to do the following: 1. read in a 2-column data file, e.g. status new db green title Most Significant Excursions 2. end up with an R list such that I can write e.g. lst$title and have R return Most

Re: [R] lm - Generalized Inverse for input to step()

2006-04-04 Thread Cal Stats
I did employ ginv() to solve my problem earlier. the problem is i would like to employ step() to do model selection using AIC/BIC. now this needs an lm object to be input. i created an slm object giving the necessary elements in the lm object and then input to step() but i

Re: [R] data.frame to list

2006-04-04 Thread Gabor Grothendieck
Try this: dd - read.table(myfile, as.is = TRUE) lst - as.list(dd[,2]) names(lst) - dd[,1] lst$title For a data frame (but not for a matrix) the names are the same as the colnames and dimnames is a two-element list consisting of the rownames and colnames. Try this: DF - data.frame(A = 1:5, B =

Re: [R] data.frame to list

2006-04-04 Thread jim holtman
You might want to consider the use of 'attr' to assign attributes to an object. That way you can keep your object as a data.frame: attr(x,title) - Most Significant attr(x,title) [1] Most Significant On 4/4/06, Larry Howe [EMAIL PROTECTED] wrote: Hi, I'm new to R, and I'm not a

[R] Cannot install RMySQL under Kubuntu

2006-04-04 Thread Pete Cap
List, I am attempting to install RMySQL on a Kubuntu box. mysql and R were installed using the adept package manager: apt-get install mysql-server apt-get install r-base I can access mysql via the terminal and I can open R and perform various basic tasks. However, I cannot install

[R] how to read/write tables in xml

2006-04-04 Thread Wensui Liu
Dear Listers, I have 2 questions regarding xml. 1) how to read/write tables in xml? 2) compared with csv, is xml a better way to transfer data cross systems/applications? Thank you so much for your insight. -- WenSui Liu (http://statcompute.blogspot.com) Senior Decision Support Analyst Health

Re: [R] how to read/write tables in xml

2006-04-04 Thread Gabor Grothendieck
Check out the XML package. ctv is one package that uses XML that you could look at. Its hard to say whether the extra work to use XML is worthwhile for you. There are many XML tools around and the format helps formalize whatever format you are using but XML files tend to be longer and there

Re: [R] Cannot install RMySQL under Kubuntu

2006-04-04 Thread Dirk Eddelbuettel
On 4 April 2006 at 19:04, Pete Cap wrote: | I am attempting to install RMySQL on a Kubuntu box. Try this: $ sudo apt-get install r-cran-rmysql According to 'apt-cache policy r-cran-rmysql' on my Kubuntu box, breezy has 0.5.5-2.1. Debian itself now has 0.5.7-1 in testing and unstable.

[R] Is there any method to compare Moran's I between different populations?

2006-04-04 Thread zhijie zhang
Is there any method to compare Moran's I between different populations? As we know, in classical statistics ,there are ttest,Anova,...which can be used to compare means in different populations,so we can make a decision whether their means are different or not. But spatial statistics seems not

[R] Help with Combination

2006-04-04 Thread Sumanta Basak
Hi R-Experts, I want to make a combination of different numbers 0,1,2,3 on which I want to fit a garch model. I want to automate this for several grach fitting combinations. I mean there will be several combinations and for each combination my time series will fit a garch model. I have got