Re: [R] how to keep up with R?

2008-09-18 Thread Robin Hankin
Hi Wensei. Why not do as I do? Find an interesting area of numerical computation (perhaps not statistical) that has not been implemented in open-source. Then write an R package for it, under GPL-2, then write an article about the new package in R-news or JSS. works for me. Best wishes Ro

Re: [R] help on sampling from the truncated normal/gamma distribution on the far end (probability is very low)

2008-09-18 Thread Peter Dalgaard
Daniel Davis wrote: Hi, guys, I am trying to sample from a truncated normal/gamma distribution. But only the far end of the distribution (where the probability is very low) is left. e.g. mu = - 4; sigma = 0.1; The distribution is Normal(mu,sigma^2) truncated on [0,+Inf]; How can I get a sample

Re: [R] Mixed effects model with binomial errors - problem

2008-09-18 Thread RFTW
anyone? RFTW wrote: > > ok... the model now runs properly (say, without errors). Now about the > result. > These are the averages per treatments > > tapply(VecesArbolCo.VecesCo.C1,T2,mean) > a b c d > 0.49 0.56 0.45 0.58 > > > I run this very simple model > >> summary(model

[R] problems with too many NA in the function ideal() from pscl package.

2008-09-18 Thread Antonio P. Ramos
Hi all, I'm trying to run some monte carlo simulation for my roll call data using the ideal() function, which resides in the pscl package. However, I'm receiving an error message that I don't understand. Error in ideal(a, maxiter = 1000, thin = 10, burnin = 50, store.item = TRUE, : NA/NaN/Inf

Re: [R] Loop on vector name

2008-09-18 Thread Megh Dal
oh god!! I used lapply() instead sapply(). Now it is ok. Thank you so much. By the way after a long time I saw your post. Hope you are well and everything going on fine :) --- On Fri, 9/19/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > Subject:

Re: [R] Axes Labels on the Right side of lattice panel

2008-09-18 Thread Deepayan Sarkar
On 9/18/08, Saptarshi Guha <[EMAIL PROTECTED]> wrote: > Hello, > My plot has two curves on different scales. To create the scale on > the extreme right hand side of a panel > I followed the example in panel.axis (in this example, the tick marks > are at the same location and labels are t

Re: [R] how to keep up with R?

2008-09-18 Thread Wensui Liu
first of all, thanks so much for your insight. regardless your bike skills, it is very inappropriate to compare riding bike with using r. in additionally, simply knowing R is very different from using it skillfully in production envirnment. On Fri, Sep 19, 2008 at 1:24 AM, Rolf Turner <[EMAIL PR

Re: [R] Loop on vector name

2008-09-18 Thread Megh Dal
Thanks for this mail. It runs perfectly, but now I stuck on how to convert the result in a vector format for further matrix-compputation. e.g. How to convert "sapply(lis, sd)" to vector? --- On Wed, 9/17/08, Dimitris Rizopoulos <[EMAIL PROTECTED]> wrote: > From: Dimitris Rizopoulos <[EMAIL PR

[R] Axes Labels on the Right side of lattice panel

2008-09-18 Thread Saptarshi Guha
Hello, My plot has two curves on different scales. To create the scale on the extreme right hand side of a panel I followed the example in panel.axis (in this example, the tick marks are at the same location and labels are the same too) axis=function(side, ... ) {

Re: [R] how to keep up with R?

2008-09-18 Thread Rolf Turner
On 19/09/2008, at 5:01 PM, Wensui Liu wrote: Dear Listers, I've been a big fan of R since graduate school. After working in the industry for years, I haven't had many opportunities to use R and am mainly using SAS. My most extreme sympathies and condolences! However, I am still

Re: [R] how to keep up with R?

2008-09-18 Thread Yihui Xie
Hi Wensui, I do think you need to do something with R. Any language will be forgotten if you don't use it for a long time - at least that's true for me. For example, if you have enough time, why not write a book named "R for SAS users" or something like that? (although there's an English book 'R f

Re: [R] How to do knn regression?

2008-09-18 Thread Yihui Xie
Hi Shengqiao, I don't know any direct solutions to your question, but I don't think it's difficult to write a few lines of code to find the k-nearest neighbours for an observation with a missing value. Typically you need the function dist() to compute distances, rank() or order() to find the k-nea

Re: [R] Error: function cannot be evaluated at initial parameters

2008-09-18 Thread Rolf Turner
On 19/09/2008, at 2:33 PM, sandsky wrote: I have an error for a simple optimization problem. It is not a simple optimization problem. It is a totally silly optimization problem. Is there anyone knowing about this error? lambda1=-9 lambda2=-6 L<-function(a){ s2i2f<-(exp(-l

[R] how to keep up with R?

2008-09-18 Thread Wensui Liu
Dear Listers, I've been a big fan of R since graduate school. After working in the industry for years, I haven't had many opportunities to use R and am mainly using SAS. However, I am still forcing myself really hard to stay close to R by reading R-help and books and writing R code by myself for f

[R] the distribution of robust distances

2008-09-18 Thread arezoo bagheri
Hello everybody,I faced the same problem as Kevin Wright in 2004 and Harry In 2007 about using use a paper by Hardin & Rocke: http://handel.cipic.ucdavis.edu/~dmrocke/Robdist5.pdf in finding the distribution of robust distances. Also I have seen the answer of  Valentin for correcting the R code

Re: [R] How to show complete time values in a plot x axis

2008-09-18 Thread Yihui Xie
Hi, I'd suggest you use dotchart() instead of plot(). I believe this is what you expected: dotchart(value, time) Regards, Yihui -- Yihui Xie <[EMAIL PROTECTED]> Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http://www.yihui.name School of Statistics, Room 103

Re: [R] Use of colour in plots

2008-09-18 Thread Yihui Xie
Hi Steve, I don't know how large is your data, but I think usually alpha-transparency can solve the problem of overplotting, if small points won't work. For example, you can specify alpha = 0.1 in rgb() to generate transparent colors and plot your data points. You may take a look at the example 1

[R] Error: function cannot be evaluated at initial parameters

2008-09-18 Thread sandsky
I have an error for a simple optimization problem. Is there anyone knowing about this error? lambda1=-9 lambda2=-6 L<-function(a){ s2i2f<-(exp(-lambda1*(250^a)-lambda2*(275^a-250^a)) -exp(-lambda1*(250^a)-lambda2*(300^a-250^a))) logl<-log(s2i2f) return(-logl)} optim(1,L) Error in optim(1,

[R] (no subject)

2008-09-18 Thread Desmond Jimenez
Our internal Python developer may be interested in using R for our internal network data base processing of dose response relationships. I found a nice overview by Kim Vincent indicating that R has been used for Probit analysis. Can anybody help us streamline the acquisition of code for dose r

Re: [R] PDF fonts problem

2008-09-18 Thread Paul Murrell
Hi Mihalicza Péter wrote: Dear List, I am writing a paper in Hungarian, that I Sweave and than pdfLaTeX. Everything is fine, except for two accented letters in the graphs that behave strange, though on the screen and in eps exports they look perfect. The problem is that I need pdf graphs, s

[R] Use of distribution model to estimate probability of an event

2008-09-18 Thread Ted Byers
I have a situation where there ae two kinds of events: A and B. B does not occur without A occuring first, and a percentage of A events lead to an event B some time later and the remaining ones do not. I have n independant samples, with a frequency of events B by week, until event B for a given

Re: [R] outlier and whisker in boxplot

2008-09-18 Thread Yihui Xie
Oh, the 3rd time?! :-) Regards, Yihui -- Yihui Xie <[EMAIL PROTECTED]> Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http://www.yihui.name School of Statistics, Room 1037, Mingde Main Building, Renmin University of China, Beijing, 100872, China On Fri, Sep

Re: [R] about the whisker in boxplot

2008-09-18 Thread Yihui Xie
Hi, it seems you have posted the same question (the day before yesterday?) in previous threads. I think you may try 'bxp()' - just change the argument z as you wish and pass it to bxp(). For example: ## > x = 1:10 > par(mfrow = c(1, 2)) > (b = boxplot(x)) ## the default (min, .25quantile, me

Re: [R] help on sampling from the truncated normal/gamma distribution on the far end (probability is very low)

2008-09-18 Thread Matthias Kohl
you could use package "distr" and function "Truncate"; e.g. library(distr) N <- Norm(mean = -4, sd = 1) NT <- Truncate(N, lower = 0, upper = Inf) r(NT)(10) Unfortunatelly, your example using sd = 0.1 is very extreme and Truncate doesn't work; see also pnorm(0, mean = -4, sd = 0.1, lower.tail =

Re: [R] Coloring spaces between lines in xyplot

2008-09-18 Thread Carl Witthoft
quote: I wish to create a stacked line graph in xyplot, adding color to the spaces between the lines. For example, the code below creates a plot with two lines extending across it, and I want to color the rhomboid that is between the upper and lower line, and between the lower line and the bo

Re: [R] creating rainbow gradients

2008-09-18 Thread Carl Witthoft
quote: From: Gillian Silver Date: Wed, 17 Sep 2008 14:11:39 -0700 What would I do if I have something like: x <- rnorm(1:1000) y <- rnorm(1:1000) z <- x + y and I want the rainbow to increase with z? (i.e., red for lowest z...all the way up to the last color in the rainbow for the highest z)

[R] How to do knn regression?

2008-09-18 Thread Shengqiao Li
Hello, I want to do regression or missing value imputation by knn. I searched r-help mailing list. This question was asked in 2005. ksmooth and loess were recommended. But my case is different. I have many predictors (p>20) and I really want try knn with a given k. ksmooth and loess use band

Re: [R] help on sampling from the truncated normal/gamma distribution on the far end (probability is very low)

2008-09-18 Thread Moshe Olshansky
Well, I made a mistake - your lambda should be 400 and not 40!!! --- On Thu, 18/9/08, Moshe Olshansky <[EMAIL PROTECTED]> wrote: > From: Moshe Olshansky <[EMAIL PROTECTED]> > Subject: Re: [R] help on sampling from the truncated normal/gamma > distribution on the far end (probability is very low

Re: [R] Trouble with difftime()

2008-09-18 Thread Adam D. I. Kramer
I apologize, my original google searches were insufficient to turn up this archived message: http://tolstoy.newcastle.edu.au/R/help/06/04/24642.html ...in which my question is answered. Yes, this is the expected behavior, because range() is designed to operate on difftime objects with any unit..

[R] Trouble with difftime()

2008-09-18 Thread Adam D. I. Kramer
Hello again, I'm interested in manipulating some date objects, and have been playing with the difftime function. I'm not sure that this is the desired behavior: pa$days.before.apr30 <- difftime(may01,as.POSIXct(pa$training.max,origin=as.POSIXct("1969-12-31 16:00:00",tz="PDT")),units="d

Re: [R] Multiple logical operations in a subscript

2008-09-18 Thread Peter Alspach
Mark Try dataframe$newvariable[data$oldvariable %in% c("X","Y","Z")] <- "group1" HTH ... Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Mark Na > Sent: Friday, 19 September 2008 12:11 p.m. > To: [EMAIL PROTECTED] > Subject: [R] M

[R] Multiple logical operations in a subscript

2008-09-18 Thread Mark Na
Hello, I would like to select cases using multiple logical operations (e.g. X or Y or Z) without having to repeat the dataframe$variable within the subscript. My working code (with a single logical operator) currently looks like this: dataframe$newvariable[data$oldvariable=="X"]<-"group1" I

Re: [R] Oja median

2008-09-18 Thread roger
If you had followed the thread of the link that Richard reported you will see an implementation for the general d-dimensional version. Of course this isn't very speedy in higher dimensions, but that is of the nature of the beast, I'm afraid. On Sep 18, 2008, at 4:44 AM, <[EMAIL PROTECTED]>

Re: [R] unix-type commandline keystrokes in the windows RGUI

2008-09-18 Thread Adaikalavan Ramasamy
Ah, I didn't realize Rterm existed (Start -> Run -> Rterm). It works with CTRL-R as you said. Thank you! Regards, Adai Peter Dalgaard wrote: Adaikalavan Ramasamy wrote: ... Anyway, here is how to do what you want: 1) Install bash on your Windows machine - You can use cgywin. Or download a

[R] Coloring spaces between lines in xyplot

2008-09-18 Thread Seth W Bigelow
Greetings: I wish to create a stacked line graph in xyplot, adding color to the spaces between the lines. For example, the code below creates a plot with two lines extending across it, and I want to color the rhomboid that is between the upper and lower line, and between the lower line and the bo

[R] Still no R-2.7.2 rpms for Redhat Enterprise Linux

2008-09-18 Thread Waichler, Scott R
There's already an announcement about R 2.8.0, and yet there are still no R-2.7.2 binaries (rpms) for Redhat Enterprise Linux 4 and 5. Can the usual responsible party get on it? Can the system be improved to get more timely builds out on CRAN? Thanks, Scott Waichler Pacific Northwest National La

Re: [R] reading in results from system(). There must be an easier way...

2008-09-18 Thread Henrik Bengtsson
On Thu, Sep 18, 2008 at 1:39 PM, Michael A. Gilchrist <[EMAIL PROTECTED]> wrote: > Wow, that's elegant and simple. It's also faster than my approach. > > NB, you don't need to use close(), read.delim() closes the pipe when its > done reading. If read.delim() close the connection in this case, it'

Re: [R] Saving a TukeyHSD object as a table

2008-09-18 Thread Rodrigo Aluizio
Nevermind people, I just got it easily just realized that what I wanted is inside the object. So... write.xls(TukeySS$Biofacies,'TukeySS.xls') Solved the problem. Thanks anyway. From: Rodrigo Aluizio Sent: Thursday, September 18, 2008 6:06 PM To: R Help Subject: Saving a TukeyHSD object as a

[R] Saving a TukeyHSD object as a table

2008-09-18 Thread Rodrigo Aluizio
Hi everybody. I have a TukeyHSD object (as fallows): $Biofacies difflwrupr p adj 2-1 2.04392007 0.8128809 3.2749592 0.0001406 3-1 -0.14727913 -1.4102987 1.1157404 0.9993065 4-1 -0.63337954 -1.8963991 0.6296400 0.6738977 5-1 -0.38314928 -1.6461688 0.8798703 0.94

Re: [R] Creating smooth color regions with panel.contourplot()

2008-09-18 Thread Waichler, Scott R
> Does the contour() solution work? If not, there's not really > much that can be done. Yes, I figured out how to add the naming of arguments. This works great: library(gridBase) library(lattice) data(volcano) panel.filledcontour <- function(x, y, z, subscripts, at, col.regions = cm.colors,

Re: [R] Creating smooth color regions with panel.contourplot()

2008-09-18 Thread Deepayan Sarkar
On Thu, Sep 18, 2008 at 1:36 PM, Waichler, Scott R <[EMAIL PROTECTED]> wrote: >> > Thank you very much, Deepayan. There is just one more feature I'd >> > like to get, the ability to add the contour lines. My revision to >> > your code below prints too many lines. What needs to be changed? > >> Y

Re: [R] reading in results from system(). There must be an easier way...

2008-09-18 Thread Michael A. Gilchrist
Wow, that's elegant and simple. It's also faster than my approach. NB, you don't need to use close(), read.delim() closes the pipe when its done reading. Thank you all for your suggestions, they really helped me with this problem and understand R just a bit better. Sincerely, Mike ---

[R] How to find a shift between two curves or data sets

2008-09-18 Thread Sébastien Durand
Hello, I have a issue here! I need to find the offset or shift between two data sets. Each data set does not start nor end at the same time and dont even have the same sampling interval (which by the way isn't constant in any of the data set). It must be known that the data expressed in bot

Re: [R] Creating smooth color regions with panel.contourplot()

2008-09-18 Thread Waichler, Scott R
> > Thank you very much, Deepayan. There is just one more feature I'd > > like to get, the ability to add the contour lines. My revision to > > your code below prints too many lines. What needs to be changed? > You need to name arguments here. as.double(at) is being > matched to 'nlevels', b

[R] generating a key for scatter plot matrix generated by plot.pairs

2008-09-18 Thread robcalm
Hello everyone, I'm new to this, so please be gentle... I was wondering if anyone knows whether you can build a key for a scatter plot matrix generated using plot.pairs, as you can easily with lattice splom's auto.key? all help appreciated Rob -- View this message in context: http://www.nab

[R] quantile regression / problems calling nlrq from inside other functions

2008-09-18 Thread Farrar . David
All, This worked: mBW <- function( ... ) ... # matrix-valued function BaconWatts <- function(formula, mmf=mBW,# model matrix function(x, bp, g) data, plot=T, tau=0.5 ) { ... m.nl <- nlrq(y ~ b0 + mBW(x,bp,g) %*% c(b1,b2), tau=tau, start=pa

Re: [R] Ability estimates for partial credit model

2008-09-18 Thread Doran, Harold
Yes, see the irt.ability function in the MiscPsycho package. This has methods for maximum likelihood, and the two common bayesian estimates (MAP, EAP). I am right now writing code for test characteristic methods. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]

Re: [R] Removing subtitles in levelplot

2008-09-18 Thread Deepayan Sarkar
On Thu, Sep 18, 2008 at 10:20 AM, Sebastian Weirich <[EMAIL PROTECTED]> wrote: > Hello, > > probable a simple question, but I'm unaware with it. When plotting something > like levelplot(z1+z1~x*y|g), each table has a subtitle containing variable > name of z1 respectively z2 and the value of g. Ho

Re: [R] Creating smooth color regions with panel.contourplot()

2008-09-18 Thread Deepayan Sarkar
On Thu, Sep 18, 2008 at 10:23 AM, Waichler, Scott R <[EMAIL PROTECTED]> wrote: > Thank you very much, Deepayan. There is just one more feature I'd like > to get, the ability to add the contour lines. My revision to your code > below prints too many lines. What needs to be changed? > > --Thanks,

Re: [R] Adding 1 month to a dataframe column

2008-09-18 Thread Gabor Grothendieck
Try this: # example data - Jan 31/00, Feb 29/00, Mar 31/00, ..., Dec 31/00 d <- seq(as.Date("2000-02-01"), by = "month", length = 12) - 1 d # find beginning of next month nextmon <- function(d) as.Date(cut(as.Date(cut(d, "month")) + 32, "month")) # add number of days from start of c

Re: [R] using for variable as rowname

2008-09-18 Thread David Winsemius
On Sep 18, 2008, at 6:25 AM, Ralikwen wrote: Thanks for your help, I didn't know where you can or can't use a for variable. Seems that I have to use rownames to do this anyway, so finally I went for a more procedural solution: v=1:6 for (a in 1:3){ for (b in 4:5) { v<-rbind(v,1+a+b:

[R] How to show complete time values in a plot x axis

2008-09-18 Thread Sébastien Durand
Hello, I have the following data and I try to properly import it in R and plot the 4th column relative to time 1 2008-249 17:44:17.973-2.27 : Accepted 2 2008-249 17:44:18.014-2.28 : Accepted 3 2008-249 17:44:18.064-2.29 : Accepted 4 2008

Re: [R] Use of colour in plots

2008-09-18 Thread Steve Murray
Greg, Thanks for this - it works really well! One (hopefully final!) question I have is, is there any way of preventing overplotting? I'm finding that many of the red points are being obscured by the greens - I've tried making the point sizes small (cex=0.1) but this doesn't fully solve the

Re: [R] Difficulty understanding sem errors / failed confirmatory factor analysis

2008-09-18 Thread John Fox
Dear Adam, > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Adam D. I. Kramer > Sent: September-18-08 2:33 PM > To: John Fox > Cc: r-help@r-project.org > Subject: Re: [R] Difficulty understanding sem errors / failed confirmatory > factor analysis > >

Re: [R] Difficulty understanding sem errors / failed confirmatory factor analysis

2008-09-18 Thread Adam D. I. Kramer
Hi John, Thanks very much for your response. It does appear now that my correlation matrix and not your software is the problem. I apologize for wasting your time! I do think that a more informative error message may have prompted me to consider this possibility more fully. --Adam On Th

Re: [R] Difficulty understanding sem errors / failed confirmatory factor analysis

2008-09-18 Thread John Fox
Dear Adam, I'm afraid that our emails have crossed. Please see my previous message. John -- John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster.ca/jfox > -Original Message- > From: Adam D. I. Kramer

Re: [R] propensity score adjustment using R

2008-09-18 Thread Frank E Harrell Jr
ran2 wrote: Frank E Harrell Jr wrote: That is a high variance procedure as compared with covariate adjustment using the propensity score, or stratification. Frank Harrell Ah, wait what if I got very high dimensional X ? Even with 20 binary covariates i would end up with more than 1 mil

[R] graphing netCDF files

2008-09-18 Thread Steve_Friedman
Hello I'm working with a large hydrological data set stored in a netCDF format. The file stores x and y coordinates in the UTM projected coordinate system, yet when I use image to graphically display the z variable, the image is distorted in the sense that it does not plot the map in the correct

[R] outlier and whisker in boxplot

2008-09-18 Thread catherineLF
Hi, Dear R-users: Sorry for bothering your guys again. I think I should rewrite my question. I know how to extend whisker by using range. The question is that I will set the range=1.5, and at the same time, I only want to show the extreme outlier, like 0.01% and 99.99% percentile, so what should

[R] caret package: arguments passed to the classification or regression routine

2008-09-18 Thread Peter Tait
Hi, I am having problems passing arguments to method="gbm" using the train() function. I would like to train gbm using the laplace distribution or the quantile distribution. here is the code I used and the error: gbm.test <- train(x.enet, y.matrix[,7], method="gbm", distribution=list(na

Re: [R] detecting null values in a CSV file

2008-09-18 Thread Hutchinson,David [PYR]
Try length(na.omit()) Here's an example: data <- runif(100,0,10) data[runif(20,0,100)] <- NA file.contents <- matrix(data, ncol = 5, byrow = TRUE) for (i in 1:5) { print (length(na.omit(file.contents[,i]))) } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Beh

Re: [R] Difficulty understanding sem errors / failed confirmatory factor analysis

2008-09-18 Thread Adam D. I. Kramer
Dear John, On Thu, 18 Sep 2008, John Fox wrote: I'm trying to fit a pretty simple confirmatory factor analysis using the sem package. There's a CFA example in the examples, which is helpful, but the output for my (failing) model is hard to understand. I'd be interested in any other ways

Re: [R] Difficulty understanding sem errors / failed confirmatory factor analysis

2008-09-18 Thread John Fox
Dear Adam, (1) Note that your input correlation matrix appears to be numerically singular: > solve(R) Error in solve.default(R) : system is computationally singular: reciprocal condition number = 2.38183e-17 > det(R) [1] -1.753523e-25 > qr(R)$rank [1] 23 (2) In addition, you have specified wh

Re: [R] propensity score adjustment using R

2008-09-18 Thread ran2
Ben Domingue wrote: > > I'm not quite sure what you mean. If all you need is propensity > scores to run an IPW analysis, the fitted values should work. Having > many binary covariates shouldn't be a problem, the whole point of the > propensity score is boiling down many dimensions to a single

[R] Ability estimates for partial credit model

2008-09-18 Thread Andrej Kastrin
Dear all, I'm working on ability estimates using Rasch model. Using the "ltm" package, the procedure is quite simple: ## Factor Scores for the Rasch model fit <- rasch(LSAT) factor.scores(fit) What about Partial Credit Model (PCM)? For PCM I use PCM function from eRm package. Is there any si

Re: [R] detecting null values in a CSV file

2008-09-18 Thread Jason Thibodeau
Phil's suggestion worked like a charm. My NA's were counted in the frequency table. Thanks for the help, all! On Thu, Sep 18, 2008 at 1:28 PM, Henrik Bengtsson <[EMAIL PROTECTED]>wrote: > What have you tried this far? Can't you parse them as missing values, > i.e. NAs? See ?read.csv and argum

Re: [R] Difficulty understanding sem errors / failed confirmatory factor analysis

2008-09-18 Thread Adam D. I. Kramer
No new info, but the model and correlation table are pasted at the end of this message. --Adam On Thu, 18 Sep 2008, Adam D. I. Kramer wrote: Hello, I'm trying to fit a pretty simple confirmatory factor analysis using the sem package. There's a CFA example in the examples, which is hel

Re: [R] detecting null values in a CSV file

2008-09-18 Thread Jason Thibodeau
I haven't given it a shot yet. To complicate matters further, this file I have already passed through a filter, which has already converted my null values to NA. your insight might be of assistance. On Thu, Sep 18, 2008 at 1:30 PM, Sebastian Weirich <[EMAIL PROTECTED]>wrote: Hello, maybe you lo

Re: [R] propensity score adjustment using R

2008-09-18 Thread Ben Domingue
I'm not quite sure what you mean. If all you need is propensity scores to run an IPW analysis, the fitted values should work. Having many binary covariates shouldn't be a problem, the whole point of the propensity score is boiling down many dimensions to a single one. I use matchit() for my psm n

Re: [R] Difficulty understanding sem errors / failed confirmatory factor analysis

2008-09-18 Thread John Fox
Dear Adam, > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Adam D. I. Kramer > Sent: September-18-08 1:02 PM > To: r-help@r-project.org > Subject: [R] Difficulty understanding sem errors / failed confirmatory factor > analysis > > Hello, > >

Re: [R] detecting null values in a CSV file

2008-09-18 Thread Henrik Bengtsson
What have you tried this far? Can't you parse them as missing values, i.e. NAs? See ?read.csv and arguments '...', i.e. the arguments '...' are passed to read.table() which takes argument 'na.strings' - a character *vector* of strings that you want to be interpreted as NAs. See ?read.table for m

Re: [R] Creating smooth color regions with panel.contourplot()

2008-09-18 Thread Waichler, Scott R
Thank you very much, Deepayan. There is just one more feature I'd like to get, the ability to add the contour lines. My revision to your code below prints too many lines. What needs to be changed? --Thanks, Scott Waichler [EMAIL PROTECTED] library(gridBase) library(lattice) data(volcano) pa

[R] Removing subtitles in levelplot

2008-09-18 Thread Sebastian Weirich
Hello, probable a simple question, but I’m unaware with it. When plotting something like levelplot(z1+z1~x*y|g), each table has a subtitle containing variable name of z1 respectively z2 and the value of g. How can I remove the subtitles? Thanks a lot, Sebastian -- Ist Ihr Browser Vista-

[R] about the whisker in boxplot

2008-09-18 Thread catherineLF
Hi, Dear R-users, I have a problem when I drawing a boxplot. I want to extend the whisker to the 5% and the 95% quantiles and only show the most extreme outlier, like 0.01% and 99.99% percentiles. What should I do? I saw something on boxplot.stat, but even I define the parameter in boxplot.sta

[R] detecting null values in a CSV file

2008-09-18 Thread Jason Thibodeau
Hello all, I have a CSV file, that is 2411 columns wide. There are certain instances in teh file, where null values are located. That is: two commas together, without anything in the middle. In a certain section, the only possible values are NULL, 0,1,and 2. I need to be able to detect these NULL'

Re: [R] Use of colour in plots

2008-09-18 Thread Steve Murray
Dear Thierry and all, I've tried out ggplot from the ggplot2 package and it seems to provide much more favourable results! Just a few questions I have after consulting the 'help' file for ggplot. Is there a way of preventing overplotting? Some of the red points are being obscured by the green

[R] Difficulty understanding sem errors / failed confirmatory factor analysis

2008-09-18 Thread Adam D. I. Kramer
Hello, I'm trying to fit a pretty simple confirmatory factor analysis using the sem package. There's a CFA example in the examples, which is helpful, but the output for my (failing) model is hard to understand. I'd be interested in any other ways to do a CFA in R, if this proves troubleso

Re: [R] propensity score adjustment using R

2008-09-18 Thread ran2
Frank E Harrell Jr wrote: > > > > That is a high variance procedure as compared with covariate adjustment > using the propensity score, or stratification. > > Frank Harrell > Ah, wait what if I got very high dimensional X ? Even with 20 binary covariates i would end up with more than 1 m

Re: [R] Suggestion: Re: Fatal error .RData

2008-09-18 Thread Duncan Murdoch
On 18/09/2008 12:23 PM, Richard M. Heiberger wrote: Isn't the full pathname just paste(getwd(), ".RData", sep="/") Only on Unix-alikes, and the code that prints the error message is platform neutral. And at the point where we need this message, R isn't running, so we'd need this in C code

Re: [R] Use of colour in plots

2008-09-18 Thread Greg Snow
Try something like: > x <- runif(25) > y <- rnorm(25) > z <- rnorm(25, 3*x) > plot(x, y, col=ifelse( z > 1.25, 'red', 'green') ) Does this help, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.408.8111 > -Original Message- > From:

Re: [R] Coxph and loglik converged before variable X

2008-09-18 Thread Greg Snow
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > project.org] On Behalf Of Terry Therneau > Sent: Thursday, September 18, 2008 6:49 AM > To: [EMAIL PROTECTED] > Cc: r-help@r-project.org > Subject: Re: [R] Coxph and loglik converged before variable X [snip] >

Re: [R] Writing greek letters and subscripts in graph

2008-09-18 Thread Mike Prager
"Delphine COURVOISIER" <[EMAIL PROTECTED]> wrote: > I would like to write Greek letters followed by subscripts in a graph (on the > X-axis and in a legend). I would appreciate any help. As others have said, try demo(plotmath) and also ? plotmath Here's a brief example: plot(1:10, 1:10) tit

Re: [R] Spectrum of a kernel

2008-09-18 Thread stephen sefick
every value is the same 0.004975 besides you have to apply the smooth to a time series what you get when you plot plot(kernel("daniell", 100)) it isn't in the time domain because there is no association with a time just values, I think. On Thu, Sep 18, 2008 at 11:18 AM, <[EMAIL PROTECTED]> wrote

[R] Adding 1 month to a dataframe column

2008-09-18 Thread ANGELO.LINARDI
Dear R experts, I have a problem in modifying one column of a dataframe with a datatime format using a datetime operator. Here is my dataframe A: DATACONT PROVINCIA VALORE 1 2007-12-31MI 1 2 2007-12-31PV 2 3 2007-12-31NA 3 4 2007-12-31MI

Re: [R] propensity score adjustment using R

2008-09-18 Thread ran2
Frank E Harrell Jr wrote: > > That is a high variance procedure as compared with covariate adjustment > using the propensity score, or stratification. > > Frank Harrell > Yes, I guess the foo$fitted.values was the syntax i missed. I know this method is not optimal and that it yields high va

Re: [R] R2HTML, HTMLStart(): are plots send to HTML?

2008-09-18 Thread Greg Snow
You need to tell R when to include the plots (there is the possibility that you will add to the current plot, or redo it, etc., so R cannot tell when to include plots automatically). Look at the HTMLplot function, you will issue that when you have made a plot (see it on the screen) that you wan

Re: [R] Suggestion: Re: Fatal error .RData

2008-09-18 Thread Richard M. Heiberger
Isn't the full pathname just paste(getwd(), ".RData", sep="/") Rich __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented,

Re: [R] Suggestion: Re: Fatal error .RData

2008-09-18 Thread Duncan Murdoch
On 18/09/2008 12:13 PM, Henrik Bengtsson wrote: Hi. On Thu, Sep 18, 2008 at 8:16 AM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: On 18/09/2008 10:55 AM, Henrik Bengtsson wrote: R-core, may I suggest that the error message returns the absolute path (or even the relative path) and not just the fil

[R] PDF fonts problem

2008-09-18 Thread Mihalicza Péter
Dear List, I am writing a paper in Hungarian, that I Sweave and than pdfLaTeX. Everything is fine, except for two accented letters in the graphs that behave strange, though on the screen and in eps exports they look perfect. The problem is that I need pdf graphs, since I would like to have a

Re: [R] Suggestion: Re: Fatal error .RData

2008-09-18 Thread Henrik Bengtsson
Hi. On Thu, Sep 18, 2008 at 8:16 AM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 18/09/2008 10:55 AM, Henrik Bengtsson wrote: >> >> R-core, may I suggest that the error message returns the absolute path >> (or even the relative path) and not just the filename/basename, e.g. >> >> "Fatal error:

Re: [R] Problem installing packages in newer versions of R

2008-09-18 Thread Miha Staut
Thanks for your help Hadley and Peter. Your suggestions solved the question of installing new packages. But what can be done to get rid of the other mentioned problem in html help files. I am repeating what the problem is. After installation of new packages R-html help files try to follow non-

Re: [R] propensity score adjustment using R

2008-09-18 Thread Frank E Harrell Jr
Bunny, lautloscrew.com wrote: Hi all, i am looking to built a simple example of a very basic propensity score adjustment, just using the estimated propensity scores as inverse probability weights (respectively 1-estimated weights for the non-treated). As far as i understood, MLE predictions o

Re: [R] propensity score adjustment using R

2008-09-18 Thread Ben Domingue
Bunny, lautloscrew.com lautloscrew.com> writes: ix of some covariates. > > I wonder right now if te glm respectively summary(glm(...)) puts out > something comparable to ML estimates that can be used as the estimated > pscores, in such a way that there is one value for every observation. >

Re: [R] rgl: How to position a window during open3d call

2008-09-18 Thread Duncan Murdoch
On 18/09/2008 12:08 AM, Yihui Xie wrote: Thanks Duncan, I have also been wondering about this problem for a long time. This is fixed now on R-forge; eventually it will make it into the next rgl release on CRAN. You should be able to download a binary of the development version from R-forge s

[R] Odp: Fatal error .RData

2008-09-18 Thread Petr PIKAL
> Hi > > [EMAIL PROTECTED] napsal dne 18.09.2008 15:41:07: > > > We are using R in our class. One student claims to > > be receiving the message > > > > "Fatal error: unable to restore saved data in .RData" Well, throw my suggestion away. > I sometimes get such message when I save .RData with

[R] propensity score adjustment using R

2008-09-18 Thread Bunny, lautloscrew.com
Hi all, i am looking to built a simple example of a very basic propensity score adjustment, just using the estimated propensity scores as inverse probability weights (respectively 1-estimated weights for the non-treated). As far as i understood, MLE predictions of a logit model can direct

Re: [R] Problem installing packages in newer versions of R

2008-09-18 Thread Peter Dalgaard
Miha Staut wrote: > Dear all, > > I was wandering what could be wrong with my system (regularly updated Fedora > core 8) so that installing packages does not succeed with almost every > package. I follow the procedure specified in the help file R-admin section > 6.3. This is not a feature new to

Re: [R] Fatal error .RData

2008-09-18 Thread Rodrigo Aluizio
If the students have the permission, maybe run R as administrator solves the question too. Rodrigo. -- From: "Duncan Murdoch" <[EMAIL PROTECTED]> Sent: Thursday, September 18, 2008 10:48 AM To: "Green, Paul" <[EMAIL PROTECTED]> Cc: Subject: Re: [

Re: [R] Reporting with down and across variables

2008-09-18 Thread hadley wickham
Possibly - in the next version, you'll get a helpful warning message and cast will take it's best guess at the column that it should use. Hadley On Thu, Sep 18, 2008 at 10:15 AM, Matthew Pettis <[EMAIL PROTECTED]> wrote: > It does, thanks! Did I miss in the documentation that the variable > has

Re: [R] Suggestion: Re: Fatal error .RData

2008-09-18 Thread Duncan Murdoch
On 18/09/2008 10:55 AM, Henrik Bengtsson wrote: R-core, may I suggest that the error message returns the absolute path (or even the relative path) and not just the filename/basename, e.g. "Fatal error: unable to restore saved data in C:/Users/foo/.RData" That's a good suggestion, but unfortuna

  1   2   >