Re: [R] lme cant get parameter estimated correctly

2008-04-05 Thread Bill.Venables
Here is a demo you may like to consider. (I can see what you are trying to do with your loops, but I prefer to do it this way.) On 32 bit Windows, (which I am forced to use), your seed is not a valid integer, so I have changed it to something which is. > set.seed(7658943) > > fph <- 0.4 > Sigh

Re: [R] summary(object, test=c("Roy", "Wilks", "Pillai", ....) AND ellipse(object, center=....)

2008-04-05 Thread Prof Brian Ripley
Why do you keep posting something to which you have already received an answer? https://stat.ethz.ch/pipermail/r-help/2008-April/158662.html answered in https://stat.ethz.ch/pipermail/r-help/2008-April/158664.html and repeated at https://stat.ethz.ch/pipermail/r-help/2008-April/158787.html and h

[R] Clustering for variable reduction

2008-04-05 Thread Gad Abraham
Hi, I have a regression model, where the explanatory variables are factors, and I want to include interaction terms, but some combinations occur in the data very infrequently. Hence, I'm using hclust and cutree to hierarchically cluster the levels, and get new combined levels to regress on. I

[R] help where is the problem?

2008-04-05 Thread TEBBI FATIMA
hi, i wrote in R VSS(data,number of factors to extract ex1 )OK dofchisq prob sqresid fit cfit cresidual 1 54 107.8943 1.860272e-05 18.51662 0.3444595 0.3444595 18.51662 VSS(data,number of factors to extract 2 )OK dof chisq prob sqresid fit

[R] lme cant get parameter estimated correctly

2008-04-05 Thread toby909
I am caught in a mental trap. Why isn't the between groups variance estimated (0.0038) to be around the value with which I generated the data (0.0002)? Thanks Toby set.seed(76589437887) fph = 0.4 Sigh = sqrt(0.0002) Sigi = sqrt(0.04) ci = 1 fpi = matrix(,7200,3) for (i in 1:90) { fph =

Re: [R] Lapack error in Design:::ols

2008-04-05 Thread Gad Abraham
Prof Brian Ripley wrote: > This is not an LAPACK error, but an R function chol2inv complaining that > it is being misused. > > The problem is that you have a vastly overparametrized model (using > recover()) > > Browse[1]> dim(X) > [1] 20 143 > > and ols() does not detect that, whereas lm() w

Re: [R] basics on dataframes

2008-04-05 Thread jim holtman
You must add a check for the NAs: > a[(a$V1 > 1) & (!is.na(a$V1)),] V1V2V3 V4 V5 7 100 -2.343761 -132.6063 101.7575 1.187004 On Sat, Apr 5, 2008 at 8:05 PM, Georg Ehret <[EMAIL PROTECTED]> wrote: > Dear R community, >I am using a dataframe with lots of NAs and

[R] basics on dataframes

2008-04-05 Thread Georg Ehret
Dear R community, I am using a dataframe with lots of NAs and wish to create subsets from that dataframe. In the example below I intend to create a subset with all entries with V1>1. To my surprise the result also contains all entries with V1=NA. I would wish to learn more why this is or what I

[R] summary(object, test=c("Roy", "Wilks", "Pillai", ....) AND ellipse(object, center=....)

2008-04-05 Thread Ray Haraf
Dear All, I would be very appreciative of your help with the following 1). I am running multivariate multiple regression through the manova() function (kindly suggested by Professor Venables) and getting two different answers for test=c("Wilks","Roy","Pillai") and tests=c("Wilks","Roy

Re: [R] data.frame or list

2008-04-05 Thread baptiste AuguiƩ
Hi again, Is this approach correct, or should I rather use only one type of factors (combined)? I must admit I am a bit confused by the different options to store and manipulate data in R. As I understand, data.frames are the preferred format, but I can't see how to frame this example data

Re: [R] How to improve the "OPTIM" results

2008-04-05 Thread Spencer Graves
Dear Katheryn: I'm confused by your claim that, "Even though I used the true parameter values as initial values, the results are not very good." When I ran it, 'optim' quit with $value = -35835, substantially less than fr2(theta0) = -0.3. Could you please review your quest

Re: [R] pearson's correlation

2008-04-05 Thread Eik Vettorazzi
The difference may be due to different handling of missing values. If you do cor(x,y) "by hand" in excel, you use all available information of x and y to calculate sd(x) and sd(y) seperately. But cov(x,y) in excel will use only complete pairs of (x,y), which is likely not the same set. So your

Re: [R] missing value with sign observed

2008-04-05 Thread Ben Bolker
kate uiuc.edu> writes: [snip] > > When I read this txt file into R and attach this data, I found the output of y is as the follows > [1] 8 5 3 + -1 + > Levels: -1 + 3 5 8 > > Could I get rid of Levels in the output? Because I need to use the observed y and x run regression first and t

[R] missing value with sign observed

2008-04-05 Thread kate
Hi, I have (x, y) data as the follows (saved in the txt file): x y 1 8 2 5 3 3 4 + 5 -1 6 + When I read this txt file into R and attach this data, I found the output of y is as the follows [1] 8 5 3 + -1 + Levels: -1 + 3 5 8 Could I get rid of Levels in the output? Because I need

Re: [R] pearson's correlation

2008-04-05 Thread Claus Wilke
> I used the function cor to calculate the pearson correlation coefficient > between variables. However, the resulting values do not correspond to the > outcome of my excel-calculations, for which I used the formula > Cor(x,y)=Cov(x,y)/(SD(x)*SD(y)) So my question is: How does the function > "cor"

Re: [R] bug? nlme 3.1-88 compilation under linx

2008-04-05 Thread Larry Snyder
On Sat, 5 Apr 2008, Prof Brian Ripley wrote: > Why are you asking here if you should submit a bug report on your compiler? I was asking so that I'd get exactly this answer back! More seriously, I thought there was a chance that the problem was specific to the particular compilation, but I know

Re: [R] bug? nlme 3.1-88 compilation under linx

2008-04-05 Thread Prof Brian Ripley
On Sat, 5 Apr 2008, Larry Snyder wrote: > On Sat, 5 Apr 2008, Prof Brian Ripley wrote: > >> Why are you asking here if you should submit a bug report on your compiler? > > I was asking so that I'd get exactly this answer back! > > More seriously, I thought there was a chance that the problem was s

[R] summary(object, test=c("Roy", "Wilks", "Pillai", ....) AND ellipse(object, center=....)

2008-04-05 Thread Ray Haraf
Dear All, I would be very appreciative of your help with the following 1). I am running multivariate multiple regression through the manova() function (kindly suggested by Professor Venables) and getting two different answers for test=c("Wilks","Roy","Pillai") and tests=c("Wilks","R

[R] pearson's correlation

2008-04-05 Thread Ake Nauta
Hello, I used the function cor to calculate the pearson correlation coefficient between variables. However, the resulting values do not correspond to the outcome of my excel-calculations, for which I used the formula Cor(x,y)=Cov(x,y)/(SD(x)*SD(y)) So my question is: How does the function "cor

Re: [R] bug? nlme 3.1-88 compilation under linx

2008-04-05 Thread Prof Brian Ripley
Why are you asking here if you should submit a bug report on your compiler? This is not a bug in R, but in your compilation enviroment. If you update your compiler you may well need to reinstall R -- you did not mention that you did so. BTW, R is not setting '-mcpu=i686 -pipe', but your Linux

[R] Exporting graphics: labels made with identify disappear

2008-04-05 Thread Robbert Hakkenberg
Hello, The labels that I add to plots using the "identify" function disappear when I export or copy the graphics as metafiles. Copying as bitmap keeps the labels in the plot but the quality of these graphics is much lower than that of the metafiles. What may cause this problem? And how could it

Re: [R] Stopping a function execution automatically after a given time

2008-04-05 Thread Prof Brian Ripley
For information, the R-devel version of R now has an experimental function setTimerLimit() to set time limit(s) (elapsed and/or CPU) for each top-level function. It will be a while before (or even if) it is released, but it may prove useful to those with an immediate need. On Wed, 2 Apr 2008

[R] bug? nlme 3.1-88 compilation under linx

2008-04-05 Thread Larry Snyder
>From http://bugs.r-project.org/cgi-bin/R: If you are not sure whether you have observed a bug or not, it is a good idea to ask on the mailing list R-Help by sending an e-mail to [EMAIL PROTECTED] rather than submitting a bug report. I'm wondering whether to submit a bug report on this:

Re: [R] Reading an ArcGIS raster file

2008-04-05 Thread Jens Oldeland
> How can I read and plot an ArcGIS raster file into R ? Hi Juliane, I think what you are looking for is something like a function in the "adehabitat" package called "import.asc". First you need to convert your raster images in ArcGIS to ascii files. You have to use the conversion toolbox -->

Re: [R] Conditional ploting with logical vector

2008-04-05 Thread Jim Lemon
Armin Goralczyk wrote: > Hi list > Maybe someone can help with the following problem (thanks in advance): > > In a function I have a plot and want to add symbols/text only when > indicated by a logical vector (which was generated by the function > before, not manually like in the following example

Re: [R] Conditional ploting with logical vector

2008-04-05 Thread ken knoblauch
Armin Goralczyk gmail.com> writes: > In a function I have a plot and want to add symbols/text only when > indicated by a logical vector (which was generated by the function > before, not manually like in the following example): > > plot(1:10, 1:10) > lv <- c(T,T,T,F,F,F,T,T,T,F) > text(1:10, 1:10

Re: [R] Reading an ArcGIS raster file

2008-04-05 Thread Roger Bivand
Liviu Andronic gmail.com> writes: > > Hello, > > On Fri, Apr 4, 2008 at 8:09 PM, Martin Rittner thegeologician.net> wrote: > > I don't know too much about R myself, but a little about ArcGIS: Come on, please do use a little time to search! An RSiteSearch("Arc raster") gets you lots of hits o

[R] Conditional ploting with logical vector

2008-04-05 Thread Armin Goralczyk
Hi list Maybe someone can help with the following problem (thanks in advance): In a function I have a plot and want to add symbols/text only when indicated by a logical vector (which was generated by the function before, not manually like in the following example): plot(1:10, 1:10) lv <- c(T,T,T,

[R] How to improve the "OPTIM" results

2008-04-05 Thread kathie
Dear R users, I used to "OPTIM" to minimize the obj. function below. Even though I used the true parameter values as initial values, the results are not very good. How could I improve my results? Any suggestion will be greatly appreciated. Regards, Kathryn Lord #