[R] Fitdistr()

2005-11-17 Thread Mark Miller
When using fitdistr() with the exponential, log-normal and beta distributions, you get the relevent rate, mean, standard deviation, shape1 and shape2 but you get a number bellow those that are in () and I was wandering what exactly those numbers represent and how they relate to the data. Many

Re: [R] ECDF values

2005-11-17 Thread Vito Ricci
Sorry, I solved by myself. Thanks. Vito From: Vito Ricci vito_ricci at yahoo.com Subject: [R] ECDF values Date: 2005-11-17 07:20:35 GMT (33 minutes ago) Dear UseRs, maybe is a silly question: how can I get Empirical CDF values from an object created with ecdf()?? Using print I obtain:

Re: [R] ECDF values

2005-11-17 Thread Deepayan Sarkar
On 11/17/05, Vito Ricci [EMAIL PROTECTED] wrote: Dear UseRs, maybe is a silly question: how can I get Empirical CDF values from an object created with ecdf()?? The return value of ecdf is a function. Use it as you would any other function. -Deepayan

Re: [R] ECDF values

2005-11-17 Thread Martin Maechler
Vito == Vito Ricci [EMAIL PROTECTED] on Thu, 17 Nov 2005 08:20:35 +0100 (CET) writes: Vito Dear UseRs, Vito maybe is a silly question: how can I get Empirical CDF Vito values from an object created with ecdf()?? Using Vito print I obtain: Vito Empirical CDF Vito

Re: [R] R questions

2005-11-17 Thread Christoph Buser
Hi There is a very good introduction script to R on http://www.r-project.org/ under manuals, including an index of nice functions. For example you will find the basic plots, how to sort vectors and so on. Furthermore have a look at ?RSiteSearch It is very useful to search in R archives for

Re: [R] R questions

2005-11-17 Thread Uwe Ligges
Yuying Shi wrote: Dear Sir/Madam, I am a beginner in R. Here is my questions. 1. Can you give me one test for randomness (a name and descriptive paragraph is sufficient). 2. I have learned a uniform random number generator [e.g. not the algorithms: i)Wichmann-Hill, ii)

Re: [R] update R packages in local repos

2005-11-17 Thread Muhammad Subianto
Thanks you. Now, I can install and update some packages from local repos. I put all R packages (zip files, using W2K) in h:/myFolder/myRepository, library(tools) write_PACKAGES(h:/myFolder/myRepository) options(repos=c(LocalR=file:///h:/myFolder/myRepository)) getOption(repos)

[R] discontinuous y-axis (ordinate with a -/ /-)

2005-11-17 Thread jobst landgrebe
Dear List, can anyone tell me how to plot a discontinuous y-axis (ordinate with a -/ /- break sign) to fit in data with a wide range without the need of logarthimic transformation? My data are distributed like this: (abscissa: 1:10) 1. vector to plot Min. 1st Qu. MedianMean 3rd Qu.

Re: [R] Fitdistr()

2005-11-17 Thread Vito Ricci
Hi, values in parentesis below the estimate of a parameter is the standard deviation of parameter, that's a measure of variability. Regards. Vito set.seed(123) x - rgamma(100, shape = 5, rate = 0.1) fitdistr(x, gamma) shape rate 6.45947303 0.13593172

[R] Standard Error

2005-11-17 Thread Mark Miller
I have worked out that when I fit data I get an estimate and a standard error, but all the definitions I can find describe the standard error of a sample as the standard deviation over the square root of the sample size, so if I am fitting to a log-normal distribution, what is the standard

Re: [R] access standard errors from multinom model

2005-11-17 Thread Chuck Cleland
str(summary(multinom.out)) often helps. summary(multinom.out)$standard.errors Arne Jol wrote: Dear R users, I'm using a multinomial LOGIT model to analyse choice behaviour of consumers (as part of my masters thesis research). Using the R documentation and search on the R website I have

Re: [R] Standard Error

2005-11-17 Thread Ruben Roa
-Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] On Behalf Of Mark Miller Sent: Thursday, November 17, 2005 10:16 AM To: r-help@stat.math.ethz.ch Subject: [R] Standard Error I have worked out that when I fit data I get an estimate and a standard error,

[R] changing figure size in Sweave

2005-11-17 Thread Robin Hankin
Hi In Sweave, how does one change the size of the plots? I tried using a hook: echo=FALSE, print=FALSE, fig=TRUE= options(SweaveHooks=list(fig=function() ps.options(width=1))) library(graphics) pairs(iris) @ but this didn't change the size of the figure. How to make the figures a different

Re: [R] Difficulties with for() {while(){}}

2005-11-17 Thread Duncan Murdoch
Ronaldo Reis-Jr. wrote: Hi, I have the follow function: function() { ## Init of function ... for(i in test) { ... while(j = test2) { ... } } } The problem is that sometimes, naturally, the while is not possible to be resolved, and so the program

[R] Mean survival times

2005-11-17 Thread Christoph Scherber
Dear list, I have data on insect survival in different cages; these have the following structure: deathtime status id cageS F G L S 1.5 1 1 C1 8 2 1 1 1 1.5 1 2 C1 8 2 1 1 1 11.5 1 3 C1 8

[R] Building S4-classes, documents

2005-11-17 Thread TEMPL Matthias
Hello, I have some troubles when building S4-class packages. All my (S4-)code works well (without building a package). When building a package, in the R prompt after checking S3 generic/method consistency Following error occurs: Fehler: Kann R Kode in Packet 'AddNoise' nicht laden (~Error: Can

Re: [R] Combine related plots

2005-11-17 Thread Sean Davis
On 11/17/05 8:05 AM, Vivien W. Chen [EMAIL PROTECTED] wrote: Sean, Thanks! It works! I have another extended question: how to label the two lines in the graph? I tried many ways, including text, label, list, etc., just cannot give a very effective way to do. If I were you, I would play

Re: [R] discontinuous y-axis (ordinate with a -/ /-)

2005-11-17 Thread Marc Schwartz
On Thu, 2005-11-17 at 11:40 +0100, jobst landgrebe wrote: Dear List, can anyone tell me how to plot a discontinuous y-axis (ordinate with a -/ /- break sign) to fit in data with a wide range without the need of logarthimic transformation? My data are distributed like this: (abscissa:

Re: [R] Warning message: package '...' was built under R version 2.3.0

2005-11-17 Thread Duncan Murdoch
Tuszynski, Jaroslaw W. wrote: Hi, While installing precompiled packages I often get warnings like the one in the subject. I usually ignore them, but I still do not understand why windows packages are build with unreleased versions of R. Is there some way to get packages build under

Re: [R] changing figure size in Sweave

2005-11-17 Thread Achim Zeileis
On Thu, 17 Nov 2005, Robin Hankin wrote: Hi In Sweave, how does one change the size of the plots? Of the actual .eps or .pdf files or of the included figures in the paper? The former can be done easily via foo,fig=TRUE,height=4,width=8= ... @ etc., the latter can be done most

Re: [R] changing figure size in Sweave

2005-11-17 Thread TEMPL Matthias
The Sweave User Manual says (p. 12): Attention: One thing that gets easily confused are the width/height parameters of the R graphics devices and the corresponding arguments to the LATEX \includegraphics command. The Sweave options width and height are passed to the R graphics devices, and hence

Re: [R] some questions

2005-11-17 Thread Liaw, Andy
From: Ales Ziberna Firstly, these are all very basic questions, thah you coukld probobly answer yourself by searching the manual and help files. Nevertheless, here are the answers to give you a little head start. Dear R expert, The following is my questions: 1. How to generate

Re: [R] discontinuous y-axis (ordinate with a -/ /-)

2005-11-17 Thread Ben Bolker
jobst landgrebe jlandgr1 at gwdg.de writes: Dear List, can anyone tell me how to plot a discontinuous y-axis (ordinate with a -/ /- break sign) to fit in data with a wide range without the need of logarthimic transformation? My data are distributed like this: (abscissa: 1:10) 1.

Re: [R] changing figure size in Sweave

2005-11-17 Thread TEMPL Matthias
Hi Robin, After \begin{document} of your Rnw file, you can easily set e.g. \setkeys{Gin}{width=width=0.8\textwidth} And then doing something like; test= pdf(file = ...) @ Best, Matthias Hi Matthias thanks for this. I have the manual here. Do you have a working example of \setkeys{Gin}

Re: [R] changing the value of a variable from inside a function

2005-11-17 Thread Duncan Murdoch
On 11/15/2005 12:22 PM, Michael Wolosin wrote: All - I am trying to write R code to implement a recursive algorithm. I've solved the problem in a klunky way that works, but uses more memory and computing time than it should. A more elegant solution than my current one would require

[R] loess: choose span to minimize AIC?

2005-11-17 Thread Michael Friendly
Is there an R implementation of a scheme for automatic smoothing parameter selection with loess, e.g., by minimizing one of the AIC/GCV statistics discussed by Hurvich, Simonoff Tsai (1998)? Below is a function that calculates the relevant values of AICC, AICC1 and GCV--- I think, because I to

Re: [R] Building S4-classes, documents

2005-11-17 Thread Seth Falcon
Hi Matthias, On 17 Nov 2005, [EMAIL PROTECTED] wrote: Hello, I have some troubles when building S4-class packages. All my (S4-)code works well (without building a package). When building a package, in the R prompt after checking S3 generic/method consistency Following error occurs:

[R] [R-pkgs] new version of bayesm

2005-11-17 Thread Rossi, Peter E.
Version 2.0-2 of bayesm is available on CRAN. This version includes bug fixes for rhierMnlRwMixture and rhierLinearModel. peter rossi ___ R-packages mailing list [EMAIL PROTECTED] https://stat.ethz.ch/mailman/listinfo/r-packages

Re: [R] loess: choose span to minimize AIC?

2005-11-17 Thread Thomas Lumley
On Thu, 17 Nov 2005, Michael Friendly wrote: Is there an R implementation of a scheme for automatic smoothing parameter selection with loess, e.g., by minimizing one of the AIC/GCV statistics discussed by Hurvich, Simonoff Tsai (1998)? If you particularly want loess smoothing then I don't

[R] nlme question

2005-11-17 Thread Wassell, James T., Ph.D.
-Original Message- From: Wassell, James T., Ph.D. Sent: Thursday, November 17, 2005 9:40 AM To: 'Deepayan Sarkar' Subject: RE: nlme question Deepayan, Thanks for your interest. It's difficult in email but I need the variance of Kappa = mu + 1.645*tau + 1.645* sigma Just using the

Re: [R] changing the value of a variable from inside a function

2005-11-17 Thread Duncan Murdoch
On 11/17/2005 9:39 AM, Duncan Murdoch wrote: On 11/15/2005 12:22 PM, Michael Wolosin wrote: All - I am trying to write R code to implement a recursive algorithm. I've solved the problem in a klunky way that works, but uses more memory and computing time than it should. A more elegant

[R] dev.copy legend problem

2005-11-17 Thread Florence Combes
Dear all, We are facing this problem for long, and so ask for your help. We are plotting 2 graphs in a postscript device (left part -layout function-), and the common legend for these graphs on the right part. The legend in the postscript device looks ok: this is color lines with numbers on the

Re: [R] nlme question

2005-11-17 Thread Doran, Harold
James, By assumption, sigma and tau are assumed uncorrelated, which I believe Deepayan noted below. Sigma is also random error so it is uncorrelated with your fixed effects. What are the covariance terms you are seeking? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

[R] Help with read.csv2

2005-11-17 Thread Matthieu Cornec
Hello, I am importing the following file ;aa;bb;cc 1988;12;12;12 1989;78;78;12 1990;78;78;12 1991;78;78;12 1992;78;78;12 1993;78;78;12 1994;78;78;12 data-read.csv2(test.csv,header=T) -- it gives X aa bb

Re: [R] [Rd] Scan data from a .txt file

2005-11-17 Thread Marc Schwartz (via MN)
I have a feeling that Vasu wants (mistakenly) this: dat - read.table(clipboard, header = FALSE) dat V1 V2 V3 V4 1 Name Weight Height Gender 2 Anne150 65 F 3Rob160 68 M 4 George180 65 M 5 Greg205 69 M str(dat)

Re: [R] loess: choose span to minimize AIC?

2005-11-17 Thread John Fox
Dear Mike, You could try bestLoess - function(model, criterion=c(aicc, aicc1, gcv), spans=c(.05, .95)){ criterion - match.arg(criterion) f - function(span) { mod - update(model, span=span) loess.aic(mod)[[criterion]] } result - optimize(f, spans)

[R] Multinomial Conditional Logit Model

2005-11-17 Thread Arne Jol
Hello R Help, I have a question regarding Multinomial (Conditional) LOGIT models in R. For my masters thesis I like to use Multinomial LOGIT models to analyse consumer choice data. After orientation on the R homepage and internet I found a method for multinomial LOGIT. This model is as

[R] Predicting and Plotting hypothetical values of factors

2005-11-17 Thread Paul Johnson
Last Friday, I noticed that it is difficult to work with regression models in which there are factors. It is easier to do the old fashioned thing of coding up dummy variables with 0-1 values. The predict function's newdata argument is not suited to insertion of hypothetical values for the

Re: [R] [Rd] Scan data from a .txt file

2005-11-17 Thread Vasundhara Akkineni
I want to retrieve the column names(Weight, height, Gender) so that i can use them as labels in plots further down. According to your suggestion: dat[[1]] [1] 150 160 180 205 But i want to get the col name(weight) too. A user will upload any data file and i shud be able to access the col names

Re: [R] nlme question

2005-11-17 Thread Wassell, James T., Ph.D.
Thank you for taking the time to think about my problem. The reference states: The covariance structure must be considered, because for unbalanced data the estimates (i.e. mu, sigma and tau hats) are not typically independent. Page 105. It would be nice to simply assume zero covariance terms,

Re: [R] [Rd] Scan data from a .txt file

2005-11-17 Thread Vasundhara Akkineni
marc, thanks! You answered my question. Thanks for the explanation. I had replied for the second time before i could recieve ur suggestion. Andy, thanks to u too. Vasu. On 11/17/05, Marc Schwartz (via MN) [EMAIL PROTECTED] wrote: I have a feeling that Vasu wants (mistakenly) this: dat -

Re: [R] Predicting and Plotting hypothetical values of factors

2005-11-17 Thread Peter Dalgaard
Paul Johnson [EMAIL PROTECTED] writes: Last Friday, I noticed that it is difficult to work with regression models in which there are factors. It is easier to do the old fashioned thing of coding up dummy variables with 0-1 values. The predict function's newdata argument is not suited to

Re: [R] loess: choose span to minimize AIC?

2005-11-17 Thread Michael Friendly
Thanks very much, John The formula for AICC1 was transscribed from an ambiguously rendered version (in the SAS documentation). This is a corrected version. loess.aic - function (x) { if (!(inherits(x,loess))) stop(Error: argument must be a loess object) # extract values from

Re: [R] dev.copy legend problem

2005-11-17 Thread Marc Schwartz (via MN)
On Thu, 2005-11-17 at 17:03 +0100, Florence Combes wrote: Dear all, We are facing this problem for long, and so ask for your help. We are plotting 2 graphs in a postscript device (left part -layout function-), and the common legend for these graphs on the right part. The legend in the

[R] Linking Fortran subroutines

2005-11-17 Thread Li, Guang Q
Hi, I just started using R a few weeks ago and have a problem with linking Fortran subroutines to R. For some reasons, I need to compile a Fortran program in R (or Splus) and the whole program consists a couple of subroutines, say, subA and subB. There is no difficulty in linking the

[R] Goodness fit test HELP!

2005-11-17 Thread David Zhao
Hi there, I'm a newbie, plesae bear with me. I have a dataset with about 1 ~ 3 data points. Would like fit to both Gamma and Normal distribution to see which one fits better. How do I do this in R? Or I could do a normality test of the data, if it's normal, I then will do a normal fit,

Re: [R] loess: choose span to minimize AIC?

2005-11-17 Thread Liaw, Andy
The locfit package (which, I believe, contains an independent implementation of loess, plus more) contains the gcvplot() and aicplot() functions that I think can do this. Best, Andy From: Michael Friendly Thanks very much, John The formula for AICC1 was transscribed from an ambiguously

Re: [R] Linking Fortran subroutines

2005-11-17 Thread Liaw, Andy
Why not put the two subroutines into one file and compile them into one DLL? Or compile them separately into .o, but make them into one DLL. Andy From: Li, Guang Q Hi, I just started using R a few weeks ago and have a problem with linking Fortran subroutines to R. For some reasons,

Re: [R] Goodness fit test HELP!

2005-11-17 Thread Berton Gunter
This is an iceberg question -- most of it (i.e. statistical issues) is hidden beneath the surface. To avoid a lengthy dissertation on statistical philosophy, I would merely suggest: 1. require(lattice) ?qqmath 2. With that many points **any** test for a specific distributional form will be

Re: [R] nlme question

2005-11-17 Thread Doran, Harold
I think the authors are mistaken. Sigma is random error, and due to its randomness it cannot be systematically related to anything. It is this ind. assumption that allows for the likelihood to be expressed as described in Pinhiero and Bates p.62. If you are finding that sigma is systematically

Re: [R] Help with read.csv2

2005-11-17 Thread Marc Schwartz (via MN)
On Thu, 2005-11-17 at 17:09 +0100, Matthieu Cornec wrote: Hello, I am importing the following file ;aa;bb;cc 1988;12;12;12 1989;78;78;12 1990;78;78;12 1991;78;78;12 1992;78;78;12 1993;78;78;12 1994;78;78;12

Re: [R] Predicting and Plotting hypothetical values of factors

2005-11-17 Thread Gabor Grothendieck
On 17 Nov 2005 18:00:45 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote: Paul Johnson [EMAIL PROTECTED] writes: Last Friday, I noticed that it is difficult to work with regression models in which there are factors. It is easier to do the old fashioned thing of coding up dummy variables with

[R] cv.glm help

2005-11-17 Thread Jeffrey Stratford
I would appreciate some help writing R code to plot predicted species richness vs. observed species richness (nat_est) with 95% CI lines. I'm using glm to get model coefficients and remove-one cross validation to get predicted (cv.glm). Here is what I have for the code so far: SRCOUNT -

Re: [R] dev.copy legend problem

2005-11-17 Thread Prof Brian Ripley
That's why we recommend that you do not use dev.copy but replot on the target device. Different devices have different fonts and font metrics, and so the plot as laid out for one will almost always not be right for the other. According to the help page for dev.copy you cannot by default copy

[R] transforming table into data frame

2005-11-17 Thread Charles Raux
Hello, I would like to transform a contingency table (A x B) into a data frame while keeping the cross-tabulation structure (i.e. rows = levels of A, columns = levels of B). I have tried as.data.frame, xtabs, etc... and always got a flattened list of 3 variables (A, B, Freq). How to do that?

Re: [R] nlme question

2005-11-17 Thread Deepayan Sarkar
On 11/17/05, Doran, Harold [EMAIL PROTECTED] wrote: I think the authors are mistaken. Sigma is random error, and due to its randomness it cannot be systematically related to anything. It is this ind. assumption that allows for the likelihood to be expressed as described in Pinhiero and Bates

Re: [R] transforming table into data frame

2005-11-17 Thread Sundar Dorai-Raj
Charles Raux wrote: Hello, I would like to transform a contingency table (A x B) into a data frame while keeping the cross-tabulation structure (i.e. rows = levels of A, columns = levels of B). I have tried as.data.frame, xtabs, etc... and always got a flattened list of 3 variables (A,

[R] Converting numeric variable to time

2005-11-17 Thread Ravi Varadhan
Hi, I have a data set where times of sample collection are (for some unknown reasons) stored as numerical values such as 727, 1134, etc., to represent the times 7:27, 11:34, etc. How can I recover these times from the numerical values? Also, can I obtain the elapsed time between two

[R] (no subject)

2005-11-17 Thread Wendy Peng
Hi there, I am trying to perform different normality tests in R. I have no problem when I use Shapiro.test( ). However, when I try to use any normality tests from the Nortest package, I kept getting this error Error in read.table(source, header = T, fill = T) : 'file' must be a

Re: [R] Portable R?

2005-11-17 Thread David Mitchell
My experiences parallel Dirk's - I also work for several financial institutions and large corporates, and probably 80% of them allow me to plug in a USB key and move files around. Yep, I find it strange too... Dave M. On 11/18/05, Dirk Eddelbuettel [EMAIL PROTECTED] wrote: On 17 November 2005

Re: [R] nlminb failed to converge with lmer

2005-11-17 Thread Spencer Graves
There are many ways to get this kind of message. With binary outcomes, if complete separation is possible, nlminb (or optim) will get tired trying to crank the slope up to Inf; in general, it suggests the model is overparameterized in some way. You say this is only a

[R] Point pattern to grid

2005-11-17 Thread Leaf Sun
Dear all, I'd like to change a point pattern to a grid of cells and use one of the variables as the output. e.g. The point pattern is of a window of (500*500) and several features such as pH, SoilType etc. I like to divide it into a grid with cell size 5*5, and use the mean of the point

[R] Makevars

2005-11-17 Thread Ross Boylan
Is it safe to make any assumptions about how Makevars is used? In particular, I want to include some conditional material, and wonder if the GNU make conditional commands would work (at least for those building with GNU make). Does Makevars get included in the Makefile? Does it get treated as a

Re: [R] Converting numeric variable to time

2005-11-17 Thread jim holtman
x.f - function(x) x %/% 100 + (x %% 100) / 60 x.f(c(727, 1134)) [1] 7.45000 11.56667 I assume for the elapsed time you can just subtract the numbers. On 11/17/05, Ravi Varadhan [EMAIL PROTECTED] wrote: Hi, I have a data set where times of sample collection are (for some unknown

[R] Strange parsing behavior

2005-11-17 Thread Michael Conklin
I am suddenly having a problem with my R installation (R 2.1.1) in that any linear models that access variables that have a . in their name fail. e.g. tempdata-data.frame(dep=rnorm(1000),pred.test=rnorm(1000)) lm(dep~pred.test,data=tempdata) Error in parse(file, n, text, prompt) : parse error

Re: [R] RODBC help

2005-11-17 Thread Earl F. Glynn
I had a similar problem when I posted this recently: RODBC and Excel: Wrong Data Type Assumed on Import http://tolstoy.newcastle.edu.au/~rking/R/help/05/11/14938.html My conclusion was: Being lucky shouldn't be part of processing Excel files, which is the case when RODBC is used. This reply

[R] rmysql installed but unable to load

2005-11-17 Thread Juan Rodriguez
Hi, First off here is my system configuration: Dual 2.3 Ghz PowerPC G5 Mac OS X 10.4.3 R for Mac OS X Aqua GUI 1.12 (installed in default location) Mysql 5.0.13 located in: /usr/local/mysql-max-5.0.13-rc-osx10.4-powerpc/ and default version in /usr/local/mysql I downloaded

Re: [R] Mean survival times

2005-11-17 Thread Göran Broström
On 11/17/05, Christoph Scherber [EMAIL PROTECTED] wrote: Dear list, I have data on insect survival in different cages; these have the following structure: deathtime status id cageS F G L S 1.5 1 1 C1 8 2 1 1 1 1.5 1 2 C1

[R] Histogram over a Large Data Set (DB): How?

2005-11-17 Thread Eric Eide
Hi! I'm new to R, and I have a question about how R works with large data sets --- in particular, data sets that come from databases. I'm using R 2.2.0 with the DBI package (0.1-9) and the RMySQL package (0.5-5). My get-my-feet-wet-with-R project is to make a histogram from a data set stored in

[R] a weighted average by group

2005-11-17 Thread Weiwei Shi
Hi, I have a data.frame a like this: a v1 v2 v3 v4 1 1 1 A X 2 2 2 A X 3 3 3 A X 4 4 4 B X 5 5 5 B X 6 6 6 C Y 7 7 7 C Y 8 8 8 C Y 9 9 9 D Y 10 10 10 D Y I want to get a weighted average for each combination of v3 and v4, using v1 as values and

Re: [R] Histogram over a Large Data Set (DB): How?

2005-11-17 Thread Sean Davis
[R] Histogram over a Large Data Set (DB): How? Have you tried just grabbing the whole column using dbGetQuery? Try doing this: spams - dbGetQuery(con,select unixtime from email limit 100) Then increase from 1,000,000 to 1.5 million, to 2 million, etc. until you break something (run out

Re: [R] a weighted average by group

2005-11-17 Thread Duncan Murdoch
On 11/17/2005 6:25 PM, Weiwei Shi wrote: Hi, I have a data.frame a like this: a v1 v2 v3 v4 1 1 1 A X 2 2 2 A X 3 3 3 A X 4 4 4 B X 5 5 5 B X 6 6 6 C Y 7 7 7 C Y 8 8 8 C Y 9 9 9 D Y 10 10 10 D Y I want to get a weighted average

Re: [R] Linear model mixed with an ARIMA model

2005-11-17 Thread Spencer Graves
Have you considered using corARMA with, e.g., lme in library(nlme), as described in Pinheiro and Bates (2000) Mixed-Effects Models in S and S-PLUS (Springer, esp. table 5.3)? hope this helps. spencer graves p.s. You might get quicker and more useful replies if you

Re: [R] nlme questions

2005-11-17 Thread Spencer Graves
Both your questions seem too vague to me. You might get more useful replies if you provide a simple example in a few lines of R code that a reader could copy from your email into R and see the result (as suggested in the posting guide! www.R-project.org/posting-guide.html). The

Re: [R] discontinuous y-axis (ordinate with a -/ /-)

2005-11-17 Thread Francisco J. Zagmutt
axis.break() in the plotrix package will do that. You still have to modify the axis scale. Cheers Francisco From: jobst landgrebe [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Subject: [R] discontinuous y-axis (ordinate with a -/ /-) Date: Thu, 17 Nov 2005 11:40:01 +0100 Dear List,

Re: [R] a weighted average by group

2005-11-17 Thread Gabor Grothendieck
On 11/17/05, Weiwei Shi [EMAIL PROTECTED] wrote: Hi, I have a data.frame a like this: a v1 v2 v3 v4 1 1 1 A X 2 2 2 A X 3 3 3 A X 4 4 4 B X 5 5 5 B X 6 6 6 C Y 7 7 7 C Y 8 8 8 C Y 9 9 9 D Y 10 10 10 D Y I want to get a weighted

[R] Opening help file hangs in emacs

2005-11-17 Thread Dong H. Oh
I use ess 5.101 in GNU emacs on windows 2000 x86 system. The problem is like bellows: 1. When I execute R-2.2.0 by stand-alone mode, help files opens very fast. 2. When I execute Rterm in GNU emacs, however, help files hangs to open. It makes me inconvenient. How can I

[R] Fitting model with varying number of predictors

2005-11-17 Thread Juni Joshi
I need to fit a number of models with different number of predictors in each model. Say for example, I have three predictors: x1, x2, x3 and I want to fit three models: lm(y~x1+x2) lm(y~x2+x3) lm(y~x1+x2+x3) Instead of typing all models, what I want is to create a

Re: [R] Fitting model with varying number of predictors

2005-11-17 Thread Gabor Grothendieck
Try this: x - data.frame(x1 = x1, x2 = x2, x3 = x3) lm(y ~., x[,1:2]) lm(y ~., x[,2:3]) lm(y ~., x[,1:3]) On 11/18/05, Juni Joshi [EMAIL PROTECTED] wrote: I need to fit a number of models with different number of predictors in each model. Say for example, I have three predictors:

[R] Truncated observations in survreg

2005-11-17 Thread Per Jensen
Dear R-list I have been trying to make survreg fit a normal regression model with left truncated data, but unfortunately I am not able to figure out how to do it. The following survreg-call seems to work just fine when the observations are right censored: library(survival) n-10 #censored

Re: [R] Predicting and Plotting hypothetical values of factors

2005-11-17 Thread Gabor Grothendieck
On 11/17/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 17 Nov 2005 18:00:45 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote: Paul Johnson [EMAIL PROTECTED] writes: Last Friday, I noticed that it is difficult to work with regression models in which there are factors. It is easier to

[R] help on ks.test and shapiro.test

2005-11-17 Thread Wen Zhang
I have three files of data which are available at http://zhangw.com/ R/, varied at the number of data. I tried to use R to analyze using shapiro.test, ks.test, and t.test. t.test ran as expected, however, when I run shapiro.test and ks.test commands, error message always occurred. Error

[R] How to generate the random numbers with the lognormal distribution?

2005-11-17 Thread 广星
Hi,R-list! I am a newbie to the R and what I want to know mostly now is as follow: Using rnorm(),we could get the random numbers with normal distribution, but how to generate the random numbers with the lognormal distribution? Thank you in advance! [EMAIL PROTECTED]   2005-11-18

Re: [R] Goodness fit test HELP!

2005-11-17 Thread Vito Ricci
Hi David, you could see my contribute: Fitting distributions with R http://cran.r-project.org/doc/contrib/Ricci-distributions-en.pdf Hoping it could be helpful. Regards, Vito You wrote: Hi there, I'm a newbie, plesae bear with me. I have a dataset with about 1 ~ 3 data points.

Re: [R] How to generate the random numbers with the lognormal distribution?

2005-11-17 Thread Uwe Ligges
广星 wrote: Hi,R-list! I am a newbie to the R and what I want to know mostly now is as follow: Using rnorm(),we could get the random numbers with normal distribution, but how to generate the random numbers with the lognormal distribution? What about searching in the help files? It's not that