Re: [R] lme4: Extract fixed effects Val, SE, t, p

2005-12-16 Thread Dieter Menne
Zev Ross zev at zevross.com writes: Using glmmPQL you can extract the full table of estimates, SE, p-values etc using as an example: mymodel-glmmPQL(mymodel here) summary(mymodel)[[18]] How can I pull this table out of a lmer object in lme4? Looks like it is not so easy, the code

[R] Help with data.frame and lapply

2005-12-16 Thread Juan Daniel López Serna
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello: I'm having problems with this line of code: X.lm - lapply(names(d), function(x) lm(d[cls] ~ d[x], data=d)) d[x] is what is giving trouble here, but I don't know exactly how to solve it. What I'm trying to do is to create a

Re: [R] Help with data.frame and lapply

2005-12-16 Thread Dimitris Rizopoulos
you could use something like: d - data.frame(x1 = rnorm(100), x2 = rnorm(100), x3 = rnorm(100), cls = rnorm(100)) lapply(d[-match(cls, names(d))], function(x, y) lm(y ~ x), y = d$cls) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of

Re: [R] Help with data.frame and lapply

2005-12-16 Thread TEMPL Matthias
Hello: I'm having problems with this line of code: X.lm - lapply(names(d), function(x) lm(d[cls] ~ d[x], data=d)) d[x] is what is giving trouble here, but I don't know exactly how to solve it. How does d look like? Probably d[,cls] and d[,x] instead of d[cls] and d[x]

Re: [R] Help with data.frame and lapply

2005-12-16 Thread Jacques VESLOT
d - data.frame(x1 = rnorm(100), x2 = rnorm(100), x3 = rnorm(100), cls = rnorm(100)) dd - subset(d, sel=-cls) lapply(paste(lm(cls ~, names(dd), ,data=d)), function(x) eval(parse(text=x))) Juan Daniel López Serna a écrit : -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello: I'm having

[R] autocorrelation test

2005-12-16 Thread Poizot Emmanuel
Hi all, I would like to test the relevance of a vector field (i.e. if the vectors are organized or not). To do so, I would like to use an autocorrelation test, so that I have two questions: - is the Watson test applicable to that perpuse ? - is the kuiper test applicable to that purpuse ?

Re: [R] The fastest way to select and execute a few selected functions inside a function

2005-12-16 Thread Ales Ziberna
- Original Message - From: Ales Ziberna [EMAIL PROTECTED] To: R-help r-help@stat.math.ethz.ch Sent: Wednesday, December 14, 2005 6:05 PM Subject: The fastest way to select and execute a few selected functions inside a function Dear useRs? I have the following problem! I have a

Re: [R] lme4: Extract fixed effects Val, SE, t, p

2005-12-16 Thread Doran, Harold
There are certain functions which can easily extracts the various components, however. For instance, you can grab the fixed effects using fixef(), the variance components using VarCorr, and the standard errors of the fixed effects using vcov() -Original Message- From: [EMAIL PROTECTED]

[R] Vector of matrix

2005-12-16 Thread Vieilledent Ghislain
Dear statisticians, I would like to save results for a for loop in a vector previously created. My result would be of class matrix. I tried the following script: Script: #Creation of a previous vector n.Tree-2 VectorX-rep(1,n.Tree) #loop for (i in 1:2) { Ti-MatOccurTree[Tree[i],1]

Re: [R] Vector of matrix

2005-12-16 Thread Jacques VESLOT
It seems that Xi is a matrix; so it can't be included in a vector. You need to create a list for the result of your for loop. res - list() for ( i in ...) { res[[i]] - Xi } Vieilledent Ghislain a écrit : Dear statisticians, I would like to save results for a for loop in a vector

Re: [R] Hmisc latex function

2005-12-16 Thread Marc Schwartz
Paul, I believe that the bug has been fixed in the CVS version of latex(), but it has not yet made its way to an updated version of Hmisc on CRAN from what I can see. You can get the updated version of latex() from: http://biostat.mc.vanderbilt.edu/cgi-bin/cvsweb.cgi/Hmisc/R/latex.s Click on

[R] DUPLEX

2005-12-16 Thread Dietrich Trenkler
Hi all, not to invent the wheel a second time I wonder if someone out there has programmend Snee's CADEX algorithm (Validation of regression models: Methods and examples, Technometrics 19, 415-428). Thank you in advance. D. Trenkler -- Dietrich Trenkler c/o Universitaet Osnabrueck

Re: [R] notification (PR#8400)

2005-12-16 Thread Ken Termiso
I don't care what you guys say -- that email was for me!! That money is MINE, baby!! __ 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

[R] multiple plots per page

2005-12-16 Thread Bill Hunsicker
R-help, I would like to place nine (3X3) plots per page. I am not properly implement mfrow(3,3) in the script below: jpeg(xyplot.jpg) #names output file my_args - commandArgs() #sets up to take args from dos batch command mfcol(3,3) #set page for 3X3 TEMPS - c(-15,25,85)#list of temps VBATS -

Re: [R] millions of comparisons, speed wanted

2005-12-16 Thread Martin Maechler
I have not taken the time to look into this example, but daisy() from the (recommended, hence part of R) package 'cluster' is more flexible than dist(), particularly in the case of NAs and for (a mixture of continuous and) categorical variables. It uses a version of Gower's formula in

[R] column name of a table

2005-12-16 Thread [EMAIL PROTECTED]
hy all, I wish to switch in a part in my code that use read.table to scan, actually i use this: tab-scan(data.dat,what=integer(),skip=1) dim(tab)-c(75,length(tab)/75) tab-t(tab) It gives me a new tab with 75 columns, but i when i was using read.table with headers then attach i could use the

Re: [R] multiple plots per page

2005-12-16 Thread Earl F. Glynn
Bill Hunsicker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] R-help, I would like to place nine (3X3) plots per page. I am not properly implement mfrow(3,3) in the script below: Does this help? jpeg(3x3.jpg) oldpar - par( mfcol=c(3,3) ) plot(1) plot(2) plot(3) plot(4) plot(5)

Re: [R] Need help for a statistical problem (See the posting guide)

2005-12-16 Thread Brett Magill
In response to a thread where a statistical question unrelated to R was asked, Uwe Ligges wrote: PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Please ask a local statistical consultant for help. Uwe Ligges Perhaps Uwe's admonition to do read the posting

[R] tapply question

2005-12-16 Thread Frank Johannes
HI, Suppose I have the following data structure. LRT tp 1 1.50654010 522 2 0.51793929 522 3 0.90340299 522 4 1.20293325 522 5 1.05578774 523 6 0.01617942 523 7 0.68183543 523 8 0.43820244 523 9 1.14123995 524 10 0.05809550 524 11 0.93061597 524 12 1.39739700 524 13

Re: [R] Looking for a sort of tapply() to data frames

2005-12-16 Thread January Weiner
Hi, On 12/15/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: You don't get them as a column but you get them as the component labels. by(df, df$Day, function(x) colMeans(x[,-1])) If you convert it to a data frame you get them as the rownames: do.call(rbind, by(df, df$Day, function(x)

Re: [R] column name of a table

2005-12-16 Thread Florence Combes
I am not sure to understand what you want, but maybe colnames() is what you want. for example mat [,1] [,2] [,3] [1,]135 [2,]246 colnames(mat)-c(col1,col2,col3) mat col1 col2 col3 [1,]135 [2,]246 was it what you were looking for ?

Re: [R] tapply question

2005-12-16 Thread Uwe Ligges
Frank Johannes wrote: HI, Suppose I have the following data structure. LRT tp 1 1.50654010 522 2 0.51793929 522 3 0.90340299 522 4 1.20293325 522 5 1.05578774 523 6 0.01617942 523 7 0.68183543 523 8 0.43820244 523 9 1.14123995 524 10 0.05809550 524 11

[R] Butterworth low-pass filter

2005-12-16 Thread Andy Bunn
Has anybody implemented code to extract coefficients for a Butterworth low-pass filter? I know Matlab has it implemented in the signal toolbox. I want to make use of a 10 point Butterworth low-pass filter for smoothing. In Matlab the code would look like this: % Determine the filter coefficients

[R] dendrogram branches with different lty

2005-12-16 Thread Patrick Kuss
Dear r-list, I am trying to visually seperate the two main clusters of a dendrogram. The idea is to use: 'edgePar=list(lty=3)' for 'dend1[[1]]' and 'edgePar=list(lty=1)' for 'dend1[[2]]' I have not found a way to solve this. Any suggestions? Patrick hc - hclust(dist(USArrests), ave) (dend1 -

Re: [R] Looking for a sort of tapply() to data frames

2005-12-16 Thread Gabor Grothendieck
On 12/16/05, January Weiner [EMAIL PROTECTED] wrote: Hi, On 12/15/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: You don't get them as a column but you get them as the component labels. by(df, df$Day, function(x) colMeans(x[,-1])) If you convert it to a data frame you get them

[R] Wilcoxon Mann-Whitney Rank Sum Test

2005-12-16 Thread Tuszynski, Jaroslaw W.
Does anybody know what is relation between 'T' value calculated by 'wilcox_test' function (coin package) and more common 'W' value? Jarek Tuszynski library(coin) ### Tritiated Water Diffusion Across Human Chorioamnion ### Hollander Wolfe (1999), Table 4.1, page 110 water_transfer -

Re: [R] Looking for a sort of tapply() to data frames

2005-12-16 Thread Frank E Harrell Jr
Gabor Grothendieck wrote: On 12/16/05, January Weiner [EMAIL PROTECTED] wrote: Hi, On 12/15/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: You don't get them as a column but you get them as the component labels. by(df, df$Day, function(x) colMeans(x[,-1])) If you convert it to a data

[R] R Reference Card (especially useful for Newbies)

2005-12-16 Thread Berton Gunter
Newbies (and others!) may find useful the R Reference Card made available by Tom Short and Rpad at http://www.rpad.org/Rpad/Rpad-refcard.pdf or through the Contributed link on CRAN (where some other reference cards are also linked). It categorizes and organizes a bunch of R's basic, most used

[R] R compile on AIX 5.3

2005-12-16 Thread Matthew Beason
I'm trying to compile R on AIX 5.3. I've gotten configure to work but make generates the following errors: Target R is up to date. Target R is up to date. Target R is up to date. Target R is up to date. Target Makedeps is up to date. Target libbz2.a is up to date. Target Makedeps is up to date.

Re: [R] Looking for a sort of tapply() to data frames

2005-12-16 Thread Gabor Grothendieck
One other point. The cor example could be done using tapply like this: tapply(rownames(df), df$Day, function(r) cor(df[r,val1], df[r, val2])) On 12/16/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 12/16/05, January Weiner [EMAIL PROTECTED] wrote: Hi, On 12/15/05, Gabor Grothendieck

Re: [R] R compile on AIX 5.3

2005-12-16 Thread Prof Brian Ripley
1) What version of R is this? If not 2.2.1 beta, please do try that as there have been some recent AIX-related patches. 2) What is on lines 793 794 of /usr/include/netinet/in.h? It looks like some other header file needs to be included first. We only have reports of recent successful builds

Re: [R] dendrogram branches with different lty

2005-12-16 Thread Romain Francois
Hi Patrick, You may want to try out my (highly experimental, so not on CRAN) package A2R. http://addictedtor.free.fr/packages/A2R/A2R_0.0-3.tar.gz 2 dendro's are displayed on RGG, check http://addictedtor.free.fr/graphiques/search.php?q=dendrogram You might also be interrested in Appendix B of

Re: [R] R compile on AIX 5.3

2005-12-16 Thread Matthew Beason
Professor, It is version 2.2.0 of R. I'll download 2.2.1 straight away and see if that makes a difference. On lines 793 794 of /usr/include/netinet/in.h, I found the following: socklen_t inet6_rth_space(int, int); void*inet6_rth_init(void *,

[R] Multiple plots per page

2005-12-16 Thread Bill Hunsicker
R-help, I am trying to run a number of plots and want to generate 45 plots with 9 pages per plot. I sent an email about four hours ago, but my email has been funky, I apologize in advance if this message is duplicate. Regards, Bill Bill Hunsicker RF Micro Devices 7625 Thorndike Road

[R] partially linear models

2005-12-16 Thread Elizabeth Lawson
Hey, I am estiamting a partially linear model y=X\beta+f(\theta) where the f(\theta) is estiamted using wavelets. Has anyone heard of methods to test if the betas are significant or to address model fit? Thanks for any thoughts or comments. Elizabeth Lawson

[R] basis and penalty matrices for natural cubic splines

2005-12-16 Thread Wei Zhang
Hi, I am trying to get the basis matrix and penalty matrix for natural cubic splines. I found R function ns can generate the B-spline basis matrix for a natural cubic spline; and bsplinepen can compute the penalty matrix for functions expressed in terms of a B-spline basis. However, these two

[R] selecting matrix cels by two factors

2005-12-16 Thread Dimitri Joe
Hi, I have a (numeric) matrix X of the type X - matrix(c(1:9),ncol=3,nrow=3) colnames(X) - c(A,B,C) rownames(X) - c(D,E,F) Also, a have a data frame Y like Y - as.data.frame(cbind(c(D,E,F,D,E,F), + c(A,C,A,B,B,C) ) ) I want a matrix like 1 4

Re: [R] selecting matrix cels by two factors

2005-12-16 Thread Berton Gunter
You can subscript any arbitrary array (of any dim) with an appropriately dimensioned matrix of integer indices. So all you have to do is convert the dimnames into indices. One simple way to do this is: X[cbind(match(c(D,E,F,D,E,F),rownames(X)), match(c(A,C,A,B,B,C),colnames(X)))] This

Re: [R] help with multivariate analysis

2005-12-16 Thread Spencer Graves
Dear Dr. Vidali: 1. I would first plot the data a number of different ways. Maybe you've already done plenty of this, but I have had a tendancy to rush to the model I thought was the best without adequate data integrity checks. I typically want to start with normal probability

Re: [R] what does this warnings mean? and what should I do?

2005-12-16 Thread Spencer Graves
You actually received two different warning messages. The first 8 warnings read, optim or nlminb returned message false convergence (8), and the other 3 say, ... returned message singular convergence. The function lmer uses a nonlinear optimizer (either optim or nlminb) to minimize an