Re: [R] R-GUi

2006-05-01 Thread M Senthil Kumar
Message snippe for brevity Hi, |Requirements: |- Mac OS X 10.4.4 or higher This is ok. |- R framework 2.3.x installed in its default location /Library/ |Frameworks But is the above one installed in your system ? HTH, Senthil __

[R] problem installing Econometrics view

2006-05-01 Thread Brian Quinif
When I try to install hte Econometrics view I get the following error: CRAN task view Econometrics not available in: install.views(Econometrics) I have already install the ctv package and loaded it before trying to install the above... Any ideas as to what's going on?

[R] efficiency in merging two data frames

2006-05-01 Thread Guojun Zhu
I have two data sets about lots of companies' stock and fiscal data. One is monthly data with about 144,000 lines, and the other is quaterly with about 56,000. Each data set takes different company code. I need to merge these two together. I read both ask cvs. And the other file with

[R] GA-packages

2006-05-01 Thread j.joshua thomas
Hi, I'm looking for help on how to use *R for making use of Genetic Algorithm*to make optimal solution on the examination timetabling dataset? another point to analysis the dataset, in a manner similar to the method applied in InfoViz. Say, what is the optimal step, if: Step 1 - What is the

Re: [R] GA-packages

2006-05-01 Thread David Hugh-Jones
Have you looked at package gafit on CRAN? Cheers David On 01/05/06, j.joshua thomas [EMAIL PROTECTED] wrote: Hi, I'm looking for help on how to use *R for making use of Genetic Algorithm*to make optimal solution on the examination timetabling dataset? another point to analysis the dataset,

[R] pulling items out of a lm() call

2006-05-01 Thread Andrew Gelman
I want to write a function to standardize regression predictors, which will require me to do some character-string manipulation to parse the variables in a call to lm() or glm(). For example, consider the call lm (y ~ female + I(age^2) + female:black + (age + education)*female). I want to be

[R] How to strip one term from a data.frame? + How to write long line in script?

2006-05-01 Thread Guojun Zhu
I need to run a regression with 14 normal variables and 20 dummy variables. All the data is in a huge data.frame df. But there is some extra intermediate item in the same data.frame too. It will be nice I can strip off those terms and run lm(). Also, is there a simple way to write the

Re: [R] pulling items out of a lm() call

2006-05-01 Thread Dimitris Rizopoulos
probably all.vars() could be useful in this case, e.g., m1 - lm(y ~ female + I(age^2) + female:black + (age + education)*female) all.vars(formula(m1)) Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address:

Re: [R] pulling items out of a lm() call

2006-05-01 Thread Gabor Grothendieck
Try this: # test data fo - y ~ female + I(age^2) + female:black + (age + education) * female # create a list of form list(y = as.name(z.y), ...) for use with substitute L - sapply(all.vars(fo), function(nm) as.name(paste(z, nm, sep = .))) do.call(substitute, list(fo, L)) On 5/1/06, Andrew

Re: [R] pulling items out of a lm() call

2006-05-01 Thread Peter Dalgaard
Andrew Gelman [EMAIL PROTECTED] writes: I want to write a function to standardize regression predictors, which will require me to do some character-string manipulation to parse the variables in a call to lm() or glm(). For example, consider the call lm (y ~ female + I(age^2) +

Re: [R] How to strip one term from a data.frame? + How to write long line in script?

2006-05-01 Thread Gabor Grothendieck
Using the built in data frame iris, which has 5 columns, regress Sepal.Length against all other variables except the last one: lm(Sepal.Length ~., iris[1:4]) On 5/1/06, Guojun Zhu [EMAIL PROTECTED] wrote: I need to run a regression with 14 normal variables and 20 dummy variables. All the data

Re: [R] pulling items out of a lm() call

2006-05-01 Thread Peter Dalgaard
Dimitris Rizopoulos [EMAIL PROTECTED] writes: probably all.vars() could be useful in this case, e.g., m1 - lm(y ~ female + I(age^2) + female:black + (age + education)*female) all.vars(formula(m1)) Drats. I forgot about that. Much better than my suggestion. -- O__ Peter Dalgaard

Re: [R] efficiency in merging two data frames

2006-05-01 Thread Gabor Grothendieck
Some functions that may be of help: ?aggregate.ts ?cbind ?merge and in the zoo package ?as.yearmon ?as.yearqtr ?aggregate.zoo ?merge.zoo On 5/1/06, Guojun Zhu [EMAIL PROTECTED] wrote: I have two data sets about lots of companies' stock and fiscal data. One is monthly data with about

Re: [R] plot cdf

2006-05-01 Thread Martin Maechler
FrPi == François Pinard [EMAIL PROTECTED] on Thu, 27 Apr 2006 17:15:29 -0400 writes: FrPi [Romain Francois] [...] it would be useful to add an option 'ask' in 'example', maybe with a default to TRUE in interactive mode FrPi Seconded. `example(...)' would be more

Re: [R] GA-packages

2006-05-01 Thread Martin Maechler
JJ == j joshua thomas [EMAIL PROTECTED] on Mon, 1 May 2006 16:28:26 +0800 writes: JJ Step 2 JJ- For the second doubt, i used the multiv, mva (EDA- JJ packages) - I use RGui 1.8.0 because i couldn't find JJ multiv, mva Or i'm not sure of getting it

[R] how to choose some points randomly?

2006-05-01 Thread zhang jian
Hello! There are about 5000 trees in 200m*200m plot. I want to choose some trees randomly from 5000 trees. But I donot know how to choose it. Please give me some advices. Thanks! [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch

Re: [R] efficiency in merging two data frames

2006-05-01 Thread Steve Miller
I'm sure you'll get ingenious responses to help you optimize your R code. I deal with similar investment data in even larger numbers (e.g. 10 years of daily return data for each stock in the Russell 3000), and prefer reading and consolidating the data in Python using dictionaries and lists, then

[R] How to specify function arguments that are used in different places

2006-05-01 Thread Gregor Gorjanc
Hello! Subject is not very clear, but I hope my question will be;) I wrote a function, which produces a plot and I have problems with arguments. For the sake of example let us consider that my function looks like this myfunc - function(x, points=FALSE, lines=FALSE, ...) { ## x is an object

Re: [R] How to specify function arguments that are used in different places

2006-05-01 Thread Gabor Grothendieck
You could have a list of args for each one like this: # test data x - list(data = c(1,3,5), points = c(2,4)) myfunc - function(x, plot.args = NULL, points.args = NULL) { do.call(plot, c(list(x$data), plot.args)) do.call(points, c(list(x$points), points.args)) } myfunc(x,

[R] Problem with optim()

2006-05-01 Thread Fernando Saldanha
I am having a problem with optim() using the L-BFGS-B method. When I set the lower limit for the third parameter equal to zero I get an error message: low.lim.3 - 0 phi_opt - optim(phi_, model_lik, NULL, method = L-BFGS-B, lower=c(0.2, -100, low.lim.3, 0), upper= c(10, 100, 10, 10), control =

[R] R 1.0.7.1 for Linux Suse 10.0

2006-05-01 Thread Christian Hager
Hello to everyone, Where can I find a Version 1.0.7.1 of R for Suse Linux 10.0. __ 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

Re: [R] Package docs for CRAN

2006-05-01 Thread Tuszynski, Jaroslaw W.
See Function promptPackage() and http://cran.r-project.org/doc/manuals/R-exts.html#Rd-format section 2.1.4 fpr writing Rd files for packages. I just did it first time for my package caMassClass, so you can see the results in its pdf file. Jarek Tuszynski -Original Message- From: [EMAIL

Re: [R] R-GUI

2006-05-01 Thread Rob J Goedman
Hi Scott, Can you explain a bit further what steps you took to get to where you are? There is a Mac specific mailing list R-SIG-Mac, which might be good to ask Mac specific questions. Regards, Rob On Apr 30, 2006, at 6:09 PM, Scott Cunningham wrote: I'm trying to install R-GUI on my Mac

Re: [R] Writing responses to the R-Help list

2006-05-01 Thread Dieter Menne
Farrel Buchinsky fbuchins at wpahs.org writes: So how do you reply to someone's posting such that the reply lands up in the original thread. I subscribe to the list with a daily single e-mail. I guess if I got every message in real-time it would be easier since then you simply reply to the

Re: [R] efficiency in merging two data frames

2006-05-01 Thread bogdan romocea
Another good option is SQL, the fastest and most scalable solution. If you decide to give it a try pay close attention to indexes. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Miller Sent: Monday, May 01, 2006 8:55 AM To: 'Guojun Zhu';

[R] R-2.3.0 make error

2006-05-01 Thread Wuming Gong
Dear list, When compiling the R-2.3.0 on FC4 x86_64, I got the following errors: make[3]: Entering directory `/project/scratch3/ligroup/wuming/src/R-2.3.0/src/main' gcc -Wl,--export-dynamic -L/usr/local/lib64 -o R.bin Rmain.o CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o apply.o

Re: [R] table of means/medians across bins used for a histogram

2006-05-01 Thread lalitha viswanath
Hi I think I seem to have phrased my doubt incorrectly. I want a x-y plot of age v/s rate (the bin is irrelevant for this plot); only that instead of a simple x-y plot, i want a plot of average(rate) for each age-intervals. My ages vary from 0 to 0.7 and I want to divide them in groups of 0.02.

Re: [R] Problem NOT with optim()

2006-05-01 Thread Prof Brian Ripley
optim does not call chol()! Please use the debugging tools described in Writing R Extensions (R = 2.3.0) to find out what is actually happening. This looks like a bug in your own code. (Remember that you have imposed the constraint z = 0 and not z 0.) On Mon, 1 May 2006, Fernando Saldanha

[R] R course

2006-05-01 Thread Highland Statistics Ltd.
We would like to announce a 3-day R course in the UK. Full details can be found at: www.brodgar.com/statscourse.htm Kind regards, Alain Zuur __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] R 1.0.7.1 for Linux Suse 10.0

2006-05-01 Thread Uwe Ligges
Christian Hager wrote: Hello to everyone, Where can I find a Version 1.0.7.1 of R for Suse Linux 10.0. Current R version is 2.3.0, version 1.0.7.1 never existed. Uwe Ligges __ R-help@stat.math.ethz.ch mailing list

[R] Repeat dataframe

2006-05-01 Thread Kenneth Cabrera
Hi R list: How can I repeat a data frame n times (with n1000), and obtain a new data frame where all the n data frames are binded by rows? Thank you for your help Kenneth -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ __

Re: [R] how to choose some points randomly?

2006-05-01 Thread zhang jian
yeah, that is right. But I donot know how to choose some random points from 1-5000. Thanks! On 5/1/06, Xiaohua Dai [EMAIL PROTECTED] wrote: If I donot misundertand your question, you can lable all your trees (e.g. 1-5000) and then randomly choose some numbers from 1-5000. HTH Xiaohua

Re: [R] Making R talk to Win/OpenBUGS in Linux (again)

2006-05-01 Thread Uwe Ligges
Paul Johnson wrote: Thank you very much. With the insertion of WINEPATH declaration, then the following example program does run. And really fast, too! library(R2WinBUGS) WINEPATH - /usr/bin/winepath Will be fixed in the package real soon now. Gregor, many thanks for the

Re: [R] par(mfror=c(1,2))

2006-05-01 Thread Greg Snow
One simple solution is to use the layout function in place of par. For example: layout(rbind(c(0,1,1,0),c(0,2,2,0))) hist(rnorm(100)) hist(rnorm(1)) Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111

Re: [R] how to choose some points randomly?

2006-05-01 Thread Xiaohua Dai
?sample Please use RSiteSearch to look for functions and helps. I think you also need R/Rpad Reference Card (www.rpad.org/Rpad/Rpad-ref*card *.pdf http://www.rpad.org/Rpad/Rpad-refcard.pdf) On 5/1/06, zhang jian [EMAIL PROTECTED] wrote: yeah, that is right. But I donot know how to choose

Re: [R] problem installing Econometrics view

2006-05-01 Thread Uwe Ligges
Brian Quinif wrote: When I try to install hte Econometrics view I get the following error: CRAN task view Econometrics not available in: install.views(Econometrics) Maybe you have not set a CRAN mirror that has the views mirrored? What does getOptions(repos) tell you? Uwe Ligges I

Re: [R] Repeat dataframe

2006-05-01 Thread Xiaohua Dai
Maybe the function merge is what you need. Xiaohua On 5/1/06, Kenneth Cabrera [EMAIL PROTECTED] wrote: Hi R list: How can I repeat a data frame n times (with n1000), and obtain a new data frame where all the n data frames are binded by rows? Thank you for your help Kenneth -- Using

Re: [R] Repeat dataframe

2006-05-01 Thread Xiaohua Dai
Sorry, I give a wrong answer. X On 5/1/06, Xiaohua Dai [EMAIL PROTECTED] wrote: Maybe the function merge is what you need. Xiaohua On 5/1/06, Kenneth Cabrera [EMAIL PROTECTED] wrote: Hi R list: How can I repeat a data frame n times (with n1000), and obtain a new data frame where

Re: [R] problem installing Econometrics view

2006-05-01 Thread Brian Quinif
When I named a specific mirror it worked. Thanks for the help. 2006/5/1, Brian Quinif [EMAIL PROTECTED]: When I try to install hte Econometrics view I get the following error: CRAN task view Econometrics not available in: install.views(Econometrics) I have already install the ctv package and

Re: [R] Repeat dataframe

2006-05-01 Thread Prof Brian Ripley
On Mon, 1 May 2006, Kenneth Cabrera wrote: Hi R list: How can I repeat a data frame n times (with n1000), and obtain a new data frame where all the n data frames are binded by rows? Perhaps my_df[rep(1:nrow(my_df), times=n), ] is what you want? -- Brian D. Ripley,

Re: [R] Repeat dataframe

2006-05-01 Thread Kenneth Cabrera
Well, I find a solution! If DFe is a data frame and n is an integer then DFr-data.frame(t(matrix(rep(t(DFe),n),dim(DFe)[2],dim(DFe)[1]*n))) names(DFr)-names(DFe) Will work!! Maybe somebody has a more elegant solution. Again, thank you for your help. On Mon, 01 May 2006 11:23:14 -0500,

Re: [R] table of means/medians across bins used for a histogram

2006-05-01 Thread Gabor Grothendieck
I assume you want to discretize one column and then for each level produced, calculate the mean of another column and plot those means against the levels. Using the builtin iris data frame discretize Sepal.Width producing the SWfac factor and calculate, SLmean, the mean Sepal.Length for each

Re: [R] Repeat dataframe

2006-05-01 Thread Kenneth Cabrera
As I said, a very more elegant solution! Thank you! On Mon, 01 May 2006 11:52:44 -0500, Prof Brian Ripley [EMAIL PROTECTED] wrote: my_df[rep(1:nrow(my_df), times=n), ] -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ __

[R] plotting groupedData objects

2006-05-01 Thread Osman Al-Radi
Dear R-Help, I am using R2.3.0, nlme library on Windows XP. I created a grouped data object with y, subject, group and time variables. I can plot the data using plot.nfnGroupedData(form=y~time|subject,outer=~group) This gives me individual curves (connected points) for each subject in

[R] Adding elements in an array where I have missing data.

2006-05-01 Thread John Kane
This is a simple question but I cannot seem to find the answer. I have two vectors but with missing data and I want to add them together with the NA's being ignored. Clearly I need to get the NA ignored. na.action? I have done some searching and cannot get na.action to help. This must be a

Re: [R] R-2.3.0 make error

2006-05-01 Thread Peter Dalgaard
Wuming Gong [EMAIL PROTECTED] writes: Dear list, When compiling the R-2.3.0 on FC4 x86_64, I got the following errors: make[3]: Entering directory `/project/scratch3/ligroup/wuming/src/R-2.3.0/src/main' gcc -Wl,--export-dynamic -L/usr/local/lib64 -o R.bin Rmain.o CConverters.o

Re: [R] Making R talk to Win/OpenBUGS in Linux (again)

2006-05-01 Thread jun yan
I have used linbugs with the rbugs package for a recent work. It might be worthwhile trying. Jun On 5/1/06, Uwe Ligges [EMAIL PROTECTED] wrote: Paul Johnson wrote: Thank you very much. With the insertion of WINEPATH declaration, then the following example program does run. And really

Re: [R] Adding elements in an array where I have missing data.

2006-05-01 Thread Rick Bilonick
On Mon, 2006-05-01 at 13:26 -0400, John Kane wrote: This is a simple question but I cannot seem to find the answer. I have two vectors but with missing data and I want to add them together with the NA's being ignored. Clearly I need to get the NA ignored. na.action? I have done some

Re: [R] Making R talk to Win/OpenBUGS in Linux (again)

2006-05-01 Thread Gregor GORJANC
Hello Jun, On 5/1/06, jun yan [EMAIL PROTECTED] wrote: I have used linbugs with the rbugs package for a recent work. It might be worthwhile trying. It would be very nice, if you would consider to port new funcionality in rbugs to R2WinBUGS. I thought that this was your intention, when wine

Re: [R] Making R talk to Win/OpenBUGS in Linux (again)

2006-05-01 Thread Uwe Ligges
Gregor GORJANC wrote: Hello Jun, On 5/1/06, jun yan [EMAIL PROTECTED] wrote: I have used linbugs with the rbugs package for a recent work. It might be worthwhile trying. It would be very nice, if you would consider to port new funcionality in rbugs to R2WinBUGS. I thought that this

[R] plotting groupedData object

2006-05-01 Thread Osman Al-Radi
Dear R-Help, I am using R2.3.0, nlme library on Windows XP. I created a grouped data object with y, subject, group and time variables. I can plot the data using plot.nfnGroupedData(form=y~time|subject,outer=~group) This gives me individual curves (connected points) for each subject in

[R] process monitoring, a simple question

2006-05-01 Thread Weiwei Shi
Hi, I have a R program running very long and I run it in batch mode as below: R CMD BATCH myRcode.R In myRcode.R, I have four steps and I want to echo the entry when the program reaches that point. However, using cat command only output echo info into .R.Rout file. Is there a way to do like

Re: [R] Making R talk to Win/OpenBUGS in Linux (again)

2006-05-01 Thread Paul Johnson
Dear Jun: How about telling us which version of Linux you use and how you make linbugs run? As far as I can tell, the OpenBUGS people have intentionally removed linbugs from their version 2.2. That leaves us with various scripts that people have posted tried, none work for me. Fedora Core 5,

Re: [R] plotting groupedData object

2006-05-01 Thread Deepayan Sarkar
On 5/1/06, Osman Al-Radi [EMAIL PROTECTED] wrote: Dear R-Help, I am using R2.3.0, nlme library on Windows XP. I created a grouped data object with y, subject, group and time variables. I can plot the data using plot.nfnGroupedData(form=y~time|subject,outer=~group) This gives me

Re: [R] Adding elements in an array where I have missing data.

2006-05-01 Thread John Fox
Dear John, The behaviour of R is reasonable, since, in your example, 4 + NA should in general be NA (i.e., missing). You can do what you want by changing NAs to 0s: a[is.na(a)] - 0 a + b [1] 5 4 8 I hope this helps, John John Fox Department of Sociology

Re: [R] Adding elements in an array where I have missing data.

2006-05-01 Thread Dave Armstrong
Dear John, You can also get this by doing the following: apply(rbind(a,b), 2, sum, na.rm=T) [1] 5 4 8 This way, you don't have to actually change the missing values to zero. Best, Dave. -- Dave Armstrong University of Maryland Dept of Government and Politics 3140 Tydings Hall College Park, MD

Re: [R] Making R talk to Win/OpenBUGS in Linux (again)

2006-05-01 Thread Manuel Morales
As far as I can figure out, the problem with running LinBUGS on FC5 is that support for linuxthreads was removed after being deprecated in FC4. http://fedora.redhat.com/docs/release-notes/fc5/#id2887615 As a result, the LD_ASSUME_KERNEL workaround, which presumably forced the use of linuxthreads

Re: [R] Adding elements in an array where I have missing data.

2006-05-01 Thread John Kane
--- Rick Bilonick [EMAIL PROTECTED] wrote: On Mon, 2006-05-01 at 13:26 -0400, John Kane wrote: This is a simple question but I cannot seem to find the answer. I have two vectors but with missing data and I want to add them together with the NA's being ignored. Clearly I need to

Re: [R] Adding elements in an array where I have missing data.

2006-05-01 Thread John Kane
--- John Fox [EMAIL PROTECTED] wrote: Dear John, The behaviour of R is reasonable, since, in your example, 4 + NA should in general be NA (i.e., missing). You can do what you want by changing NAs to 0s: a[is.na(a)] - 0 a + b [1] 5 4 8 I hope this helps, John Thanks John.

Re: [R] Adding elements in an array where I have missing data.

2006-05-01 Thread John Kane
--- Dave Armstrong [EMAIL PROTECTED] wrote: Dear John, You can also get this by doing the following: apply(rbind(a,b), 2, sum, na.rm=T) [1] 5 4 8 This way, you don't have to actually change the missing values to zero. Best, Dave. Hey, very nice indeed. Thanks. I had not even

Re: [R] plotting groupedData object

2006-05-01 Thread Osman Al-Radi
My apologies: library(nlme) gd-groupedData(y~time|subject,outer=~group) plot(gd, outer=T) this produces a pannel per group with a curve per subject I need in addition to that the mean (or lowess) y in each panel. thanks osman On 5/1/06, Deepayan Sarkar [EMAIL PROTECTED] wrote: On 5/1/06,

[R] cluster validation

2006-05-01 Thread Linda Lei
Hi there, I'm trying clustering methods on flow cytometry data. We want to evaluate the clustering results and compare the validation methods. So far the cluster validation functions I found in R are: cluster.stats{fpc} cl_agreement{clue} Are there other validation functions in R?

[R] Use of hosking.sim R function

2006-05-01 Thread Wahl, Eugene R
Dear all: My experience in using hosking.sim to generate random time series is that it requires an n-length autocorrelation function (ACF; order 0 to n-1) to generate n-length random vectors. I have attempted to utilize shorter than n-length (i.e. truncated) ACF's with hosking.sim to generate

[R] code for latex function in Hmisc

2006-05-01 Thread Brian Quinif
Forgive my ignorance, but how I can take a look at the code for the latex function in the Hmisc library? I tried just typing latex but all I got was this: latex function (object, title = first.word(deparse(substitute(object))), ...) { if (!length(oldClass(object)))

[R] namespace question

2006-05-01 Thread Erich Neuwirth
I need to modify the function loess.smooth from package stats to accept an additional weight parameter. I found the places where I need to change things, but there is a problem remaining (in R 2.2.1). loess.smooth contains the call fit - simpleLoess(y, x, w, span, degree, FALSE, FALSE,

Re: [R] code for latex function in Hmisc

2006-05-01 Thread Marc Schwartz (via MN)
On Mon, 2006-05-01 at 17:21 -0400, Brian Quinif wrote: Forgive my ignorance, but how I can take a look at the code for the latex function in the Hmisc library? I tried just typing latex but all I got was this: latex function (object, title = first.word(deparse(substitute(object))),

[R] xyplot: trouble changing graphics settings

2006-05-01 Thread Abraham Passmore
Hi I am struggling with the correct code syntax to generate xyplots that are different from the default graphics option. This is simplified version of my data: sitesizednaconc prey A 44 22.61 A 47 18.21 B 38 25.60 B

Re: [R] xyplot: trouble changing graphics settings

2006-05-01 Thread Richard M. Heiberger
bug - read.table(tmp.dat, header=TRUE) tpgs - trellis.par.get(superpose.symbol) xyplot(dnaconc ~ size | site, data=bug, groups=prey, pch=c(19,24), between=list(x=1, y=1), key=list( text=list(c(0,1), col=tpgs$col[1:2]),

Re: [R] plotting groupedData object

2006-05-01 Thread Deepayan Sarkar
On 5/1/06, Osman Al-Radi [EMAIL PROTECTED] wrote: My apologies: library(nlme) gd-groupedData(y~time|subject,outer=~group) plot(gd, outer=T) this produces a pannel per group with a curve per subject For me, it produces the following: library(nlme)

[R] Pasting data into scan()

2006-05-01 Thread Murray Jorgensen
The file TENSILE.DAT from the Hand et al Handbook of Small Data Sets looks like this: 0.023 0.032 0.054 0.069 0.081 0.094 0.105 0.127 0.148 0.169 0.188 0.216 0.255 0.277 0.311 0.361 0.376 0.395 0.432 0.463 0.481 0.519 0.529 0.567 0.642 0.674 0.752

Re: [R] plotting groupedData object

2006-05-01 Thread Osman Al-Radi
thank your help, here is a simulated data set time-c(rep(1:10,5)) y-time+rnorm(50,5,2) subject-c(rep('a',10),rep('b',10),rep('c',10),rep('d',10),rep('e',10)) group-c(rep('A',30),rep('B',20)) df-data.frame(subject,group,time,y) gd-groupedData(y~time|subject,outer=~group,data=df) plot(gd,outer=T)

Re: [R] Adding elements in an array where I have missing data.

2006-05-01 Thread Gabor Grothendieck
Here are a few alternatives: replace(a, is.na(a), 0) + b ifelse(is.na(a), 0, a) + b mapply(sum, a, b, MoreArgs = list(na.rm = TRUE)) On 5/1/06, John Kane [EMAIL PROTECTED] wrote: This is a simple question but I cannot seem to find the answer. I have two vectors but with missing data and I

Re: [R] lme: null deviance, deviance due to the random effects, residual deviance

2006-05-01 Thread Spencer Graves
As far as I know, the term deviance has no standard definition. A good, fairly common definition (I think) is that the deviance is up to [an additive] constant, minus twice the maximised log-likelihood. Where sensible, the constant is chosen so that a saturated model has deviance

[R] Pasting data into scan() - oops!

2006-05-01 Thread Murray Jorgensen
I forgot to mention that I am using Windows XP. Original Message Subject: Pasting data into scan() Date: Tue, 02 May 2006 11:55:03 +1200 From: Murray Jorgensen [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch The file TENSILE.DAT from the Hand et al Handbook of Small Data Sets

Re: [R] Pasting data into scan()

2006-05-01 Thread Gabor Grothendieck
On 5/1/06, Murray Jorgensen [EMAIL PROTECTED] wrote: The file TENSILE.DAT from the Hand et al Handbook of Small Data Sets looks like this: 0.023 0.032 0.054 0.069 0.081 0.094 0.105 0.127 0.148 0.169 0.188 0.216 0.255 0.277 0.311 0.361 0.376 0.395 0.432 0.463

Re: [R] lme: null deviance, deviance due to the random effects, residual deviance

2006-05-01 Thread Andrew Robinson
I often want to know what proportion of the variation is being contributed by different levels of random effects. When the random effects are only intercepts, with no slopes, then you can compute the intra-class correlation, which is the proportion of the variation explained by the different

Re: [R] Modelling heteroskedasticity in a multilevel model

2006-05-01 Thread Spencer Graves
I generally prefer to start with the distributional characteristics of the data, then consider fixed effets / explanatory variables, then dependence structure in the deviations from the model. 1. What is (are) your response variable(s)? If the numbers are financial

[R] Still help needed on embeded regression

2006-05-01 Thread Guojun Zhu
I basically has a long data.frame a. but I only need three columns x,y. Let us say the index of row is t. I need to produce new column s_t as the linear regression coefficient of (x_(t-60),...x_(t-1)) on (y_(t-60),...,y_(t-1)). The data is about 140,000 rows. I wrote a simple code on this which

Re: [R] R-2.3.0 make error

2006-05-01 Thread Wuming Gong
Dear Peter, $ uname -a Linux bl3 2.6.15-1.1833_FC4smp #1 SMP Wed Mar 1 23:55:52 EST 2006 x86_64 x86_64 x86_64 GNU/Linux When ./configure, I did not claim any options... Wuming On 01 May 2006 19:30:48 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: Wuming Gong [EMAIL PROTECTED] writes: Dear

[R] moving/copy objects between work space

2006-05-01 Thread Anne S Jacobson
Hi, I know there must be a way to do this, but I went through a couple 'Intro to R' books and didn't see how to do this. How do I move/copy objects from one work space to another? I have been saving the objects I want to move/copy separately then load them into another work space. Is there a

Re: [R] lme: null deviance, deviance due to the random effects, residual deviance

2006-05-01 Thread Patrick Giraudoux
Andrew and Spencer, Thanks for your answers. I was feeling that moving from variance and least-square estimates to deviance and MLE or REML was the reason why I could not find easy equivalent estimates for the proportion of variation of a given effect to the total. Thus this was not a trivial

Re: [R] plotting groupedData object

2006-05-01 Thread Deepayan Sarkar
On 5/1/06, Osman Al-Radi [EMAIL PROTECTED] wrote: thank your help, here is a simulated data set time-c(rep(1:10,5)) y-time+rnorm(50,5,2) subject-c(rep('a',10),rep('b',10),rep('c',10),rep('d',10),rep('e',10)) group-c(rep('A',30),rep('B',20)) df-data.frame(subject,group,time,y)