Re: [R] Estimated Standard Error for Theta in zeroinfl()

2010-02-16 Thread Achim Zeileis
On Tue, 16 Feb 2010, Lam, Tzeng Yih wrote: Dear Dr. Turner, Thank you very much for taking the time to answer my request. The suggestion that you have provided did ring a bell for me. So, I went digging a bit and found the following article that I have read a while ago: Baskerville, G.L. 197

Re: [R] Reshaping grouped data

2010-02-16 Thread Peter Dalgaard
Whoops, forgot to cc. the list... -pd Myrland Øystein wrote: > Dear R-help list, > > > > I have grouped data, looking like this: > > > > cases <- c(23,12,56,81) > > total <- c(123,234,248,390) > > x1 <- c(0,0,1,1) > > x2 <- c(0,1,0,1) > > > > Data <- as.data.frame(cbind(cases,total

Re: [R] False convergence of a glmer model

2010-02-16 Thread Shige Song
Hi Doug, Thanks. Next time I will post it to the R-SIG0-mixed-models mailing list, as you suggested. With respect to your question, the answer is no, these parameters do not make sense. Here is the Stata output from "exactly" the same model: . xi:xtlogit inftmort i.cohort, i(code) i.cohort

Re: [R] lmer - error asMethod(object) : matrix is not symmetric

2010-02-16 Thread Douglas Bates
This is similar to another question on the list today. On Tue, Feb 16, 2010 at 4:39 AM, Luisa Carvalheiro wrote: > Dear R users, > > I  am having problems using package lme4. > > I am trying to analyse the effect of a continuous variable (Dist_NV) > on a count data response variable (SR_SUN) usin

Re: [R] svm and RMSE

2010-02-16 Thread Steve Lianoglou
Hi, On Fri, Feb 12, 2010 at 3:00 PM, Amy Hessen wrote: > > Hi, > Every time I run a svm regression program, I got different RMSE value. > Could you please tell me what the reason for that? Sorry, your question is a bit vague. Can you provide an example/code that shows this behavior? Is the diff

Re: [R] survival - ratio likelihood for ridge coxph()

2010-02-16 Thread Terry Therneau
> It seems to me that R returns the unpenalized log-likelihood for the > ratio likelihood test when ridge regression Cox proportional model is > implemented. Is this as expected? It is easy to verify that this is correct: > fit1 <- coxph(Surv(time, status) ~ ridge(age) + ph.ecog, lung) > fit2 <- c

Re: [R] False convergence of a glmer model

2010-02-16 Thread Douglas Bates
On Tue, Feb 16, 2010 at 9:05 AM, Shige Song wrote: > Dear All, > I am trying to fit a 2-level random intercept logistic regression on a > data set of 20,000 cases.  The model is specified as the following: >  m1 <- glmer(inftmort ~ as.factor(cohort) + (1|code), family=binomial, data=d) > I got

Re: [R] for loop Vs apply function Vs foreach (REvolution enhancement)

2010-02-16 Thread Liviu Andronic
Hello On 2/16/10, julien cuisinier wrote: > 1. apply Vs for loop > > >> Seems apply is (was?) supposed to be faster than using for loop, some > posts mention that it is now more of a cosmetic function (wrapper for "for > loop") making the code essentially neater. Any thoughts/opinion/experien

Re: [R] error : unused argument(s) when boxplot

2010-02-16 Thread Uwe Ligges
On 16.02.2010 15:18, Pauline Haleux (JIC) wrote: Dear all, I am a total beginner in R, so sorry if this is the wrong place. I am using R 2.10.1 on a Mac (Mac OS 10.6.2). I have this small dataset : growth sugar 75 C 72 C 73 C 61 F 67

[R] False convergence of a glmer model

2010-02-16 Thread Shige Song
Dear All, I am trying to fit a 2-level random intercept logistic regression on a data set of 20,000 cases. The model is specified as the following: m1 <- glmer(inftmort ~ as.factor(cohort) + (1|code), family=binomial, data=d) I got "Warning message: In mer_finalize(ans) : false convergence (8)

[R] False convergence of a glmer model

2010-02-16 Thread Shige Song
Dear All, I am trying to fit a 2-level random intercept logistic regression on a data set of 20,000 cases. The model is specified as the following: __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

[R] error : unused argument(s) when boxplot

2010-02-16 Thread Pauline Haleux (JIC)
Dear all, I am a total beginner in R, so sorry if this is the wrong place. I am using R 2.10.1 on a Mac (Mac OS 10.6.2). I have this small dataset : growth sugar 75 C 72 C 73 C 61 F 67 F 64 F 62 S 63

[R] Triangular filled contour plot

2010-02-16 Thread kajo
Hi all, I am working on a filled contour plot which shows a triangular matrix data set (as shown below). Is there a possibilty to draw a triangular filled contour in a equilateral triangle (like a ternary plot)? Thanks in advance Johannes http://n4.nabble.com/file/n1557386/Bild3.png -- View

Re: [R] density estimates for fixed points

2010-02-16 Thread geir
But since you don't, why not calculate the density directly for each point (e.g., in a loop). The formula is simple enough: mean(dnorm(x-gx,sd=h1)*dnorm(y-gy,sd=h2)) yes, this was my initial thought, and it works. (But i was hoping kde2d or some similar function could do it faster). I'l try

Re: [R] tree-drawing in R ?

2010-02-16 Thread Upton, Stephen C
Also try igraph Stephen C. Upton Research Associate SEED (Simulation Experiments & Efficient Designs) Center for Data Farming Naval Postgraduate School > From: William Revelle > Date: Mon, 15 Feb 2010 13:57:19 -0600 > To: Oliver Kullmann , > Subject: Re: [R] tree-drawing in R ? > > try > >

Re: [R] Estimated Standard Error for Theta in zeroinfl()

2010-02-16 Thread Lam, Tzeng Yih
Dear Dr. Zeileis, Thank you for pointing out on the maximum likelihood estimator property as well as the delta method to obtain the standard error of estimated Theta. I agree with you in that whether getting the standard error of estimated Theta is useful or not. I will think about this further

[R] ellipsis-related error: used in an incorrect context, no ... to look in

2010-02-16 Thread lith
Hi, I have the following code snippet: require(lattice) f.barchart <- function(...) { barchart(..., panel = function(x, y, ...) { panel.barchart(x, y, ...) } ) } x <- data.frame(a = c(1,1,2,2), b = c(1,2,3,4), c = c(1,2,2,1)

Re: [R] Estimated Standard Error for Theta in zeroinfl()

2010-02-16 Thread Lam, Tzeng Yih
Dear Dr. Turner, Thank you very much for taking the time to answer my request. The suggestion that you have provided did ring a bell for me. So, I went digging a bit and found the following article that I have read a while ago: Baskerville, G.L. 1972. Use of logarithmic regression in the estima

Re: [R] PLEASE HELP!!! Total and heading of portfoilo table

2010-02-16 Thread Benilton Carvalho
say you read the quantity.csv file into a variable called 'quantity'... similarly, 'equity_price.csv' to equity. sweep(equity, 2, quantity, "*") b On Tue, Feb 16, 2010 at 11:20 AM, Sarah Sanchez wrote: > Dear Madam / R helpers, > > Unfortunately the solution you have suggested is not working in

Re: [R] lint for R? and debugging

2010-02-16 Thread Karl Ove Hufthammer
On Tue, 16 Feb 2010 08:00:09 -0500 Esmail wrote: > And along the same lines, any type of interactive debugging > utility for R? See this article in R News: 'Debugging Without (Too Many) Tears' http://cran.r-project.org/doc/Rnews/Rnews_2003-3.pdf#page=29 -- Karl Ove Hufthammer

Re: [R] density estimates for fixed points

2010-02-16 Thread Karl Ove Hufthammer
On Tue, 16 Feb 2010 03:36:17 -0800 (PST) geir wrote: > I want the density estimates for the points in a k x 2 matrix like for > example > > A=[(0,7,0.3),(0.1,0.2),...,(0.5,0.9)]^T > > which is not equally spaced, (and i do not need the density of every > combin

Re: [R] RODBC - Any faster driver?

2010-02-16 Thread Dieter Menne
Yoni Schamroth-3 wrote: > > > We are currently using the odbcConnect and odbcDriverConnect functions of > RODBC package to connect to a DB built on SQL Server 2005. > Are there any other packages / drivers/ methodology that may provide a > faster connection? > Dates back to 1997: for SQL Ser

Re: [R] converting character vector "hh:mm" to chron or strptime 24 clock time vectors

2010-02-16 Thread stephen sefick
library(chron) #untested as.chron(paste(tdata[,"date"], tdata[,"time"]), "%Y/%m/%d %H:%M") On Tue, Feb 16, 2010 at 4:47 AM, Alex Anderson wrote: > Hi All, > I am attempting to work with some data from loggers. I have read in a .csv > exported from MS Access that already has my dates and times (in

Re: [R] PLEASE HELP!!! Total and heading of portfoilo table

2010-02-16 Thread Sarah Sanchez
Dear Madam / R helpers,   Unfortunately the solution you have suggested is not working in the sense that the quantities are not multplying the rows but its multiplying columnwise and hence I am getting all wrong results.   I am again submitting my problem. Please guide me.   I have two input file

[R] for loop Vs apply function Vs foreach (REvolution enhancement)

2010-02-16 Thread julien cuisinier
Dear all, I know this topic has already been covered in other posts (at least the for loop Vs apply family of function), but I am looking for fresh / up-to-date opinion and feedback on those 3 methods to run unavoidable loops in R. I realise that it may be too general question for many, so an

[R] converting character vector "hh:mm" to chron or strptime 24 clock time vectors

2010-02-16 Thread Alex Anderson
Hi All, I am attempting to work with some data from loggers. I have read in a .csv exported from MS Access that already has my dates and times (in 24 clock format), (with StringsAsFactors=FALSE). > head(tdata) LogData date time 177.16 2008/04/24 02:00 261.

[R] lmer - error asMethod(object) : matrix is not symmetric

2010-02-16 Thread Luisa Carvalheiro
Dear R-help, I am having problems using package lme4. I am trying to analyse the effect of a continuous variable (Dist_NV) on a count data response variable (SR_SUN) using Poisson error distribution. However, when I run the model: summary(lmer((SR_SUN)~Dist_NV + (1|factor(Farm_code)) , family=p

[R] lint for R? and debugging

2010-02-16 Thread Esmail
Good morning .. sorry if this is a basic question, but is there a lint-like utility for R to check for suspicious language constructs? And along the same lines, any type of interactive debugging utility for R? My main use of R is under Linux (though I run code sometimes under Window XP). R versi

[R] RODBC - Any faster driver?

2010-02-16 Thread Yoni Schamroth
Hi, We are currently using the odbcConnect and odbcDriverConnect functions of RODBC package to connect to a DB built on SQL Server 2005. Are there any other packages / drivers/ methodology that may provide a faster connection? Any help or advice would be appreciated. Thanks [[alterna

Re: [R] density estimates for fixed points

2010-02-16 Thread geir
Trafim Vanishek posted a similar problem: "Joint density approximation?" (without any solution for kde2d). Here is an example to illustrate my problem. Originally data is for example: a=runif(10) (yes, the number of data should be larger) b=runif(10) c=kde2d(a,b,n=10,lims=c(0,1,0,1)) attach(c

Re: [R] HELP on Non-Linera Mixed-Effect model

2010-02-16 Thread Dieter Menne
vaibhav dua wrote: > > Hi, > > I'm trying to fit nonlinear mixed effects model using nlme function but > getting an error message. Here is what I have: > > fitted_model = nlme(scores~spline(b1,b2,b3,kt,time), >fixed = list(b1~1, b2~1, b3~1, kt~1), >random = b1+b2+b3~1,

Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-16 Thread Peter Ehlers
On 2010-02-16 1:24, Kum-Hoe Hwang wrote: Howdy, R Grues I have enjoyed R, but I cannot solve one problem easily. Please help my problem. When I tried the R script, I got the following Error. This error results from input data file exported through a Excel spreadsheet software. Error in step(l

Re: [R] How can I associate a list of defined names with the dataframes to be downloaded

2010-02-16 Thread Paul Hiemstra
Alex Levitchi wrote: Hello I am very thankful for the reply from Jim Holtman and David Winsemius, especially for the understandable explanations. it really works. Now I get another problem I cannot figure out. That is the situation: I work in biology. I need to download several files according

[R] penalized package for ridge regression

2010-02-16 Thread linda garcia
Dear all, I am using "penalized" package for "Ridge" regression. I do not know how can I get regression coefficients using that package . Please help me. Thanks -- Linda Garcia [[alternative HTML version deleted]] __ R-help@r

Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-16 Thread Mohamed Lajnef
Hi Kum, If you look at the code step function ( by typing step in the R console), the condition (if (length(fit$residuals) != n) ) is not fulfilled, this explains the error! i hope this can help Regards M Kum-Hoe Hwang a écrit : Howdy, R Grues I have enjoyed R, but I cannot solve one

[R] nls.lm & AIC

2010-02-16 Thread Baudron, Alan Ronan
Hi there, I'm a PhD student investigating growth patterns in fish. I've been using the minpack.lm package to fit extended von Bertalanffy growth models that include explanatory covariates (temperature and density). I found the nls.lm comand a powerful tool to fit models with a lot of parameters

[R] lmer - error asMethod(object) : matrix is not symmetric

2010-02-16 Thread Luisa Carvalheiro
Dear R users, I am having problems using package lme4. I am trying to analyse the effect of a continuous variable (Dist_NV) on a count data response variable (SR_SUN) using Poisson error distribution. However, when I run the model: summary(lmer((SR_SUN)~Dist_NV + (1|factor(Farm_code)) , family=

Re: [R] HELP on Non-Linera Mixed-Effect model

2010-02-16 Thread Walmes Zeviani
I never had seen spline() inside some nls()/nlme() function. Are you sure that this fit is possible? Splines makes a lot or successive local polynomial fits, so they need a lot of parameters. I don't think that is possible a good spline fit with only four parameters. In this case you could use loe

[R] How can I associate a list of defined names with the dataframes to be downloaded

2010-02-16 Thread Alex Levitchi
Hello I am very thankful for the reply from Jim Holtman and David Winsemius, especially for the understandable explanations. it really works. Now I get another problem I cannot figure out. That is the situation: I work in biology. I need to download several files according to an experiment, w

Re: [R] argh .. if/else .. why?

2010-02-16 Thread Peter Dalgaard
Gabor Grothendieck wrote: > On Mon, Feb 15, 2010 at 11:24 AM, David Winsemius > wrote: >> On Feb 15, 2010, at 11:01 AM, hadley wickham wrote: >> I, personally, utilize the ifelse(test,statement,statement) function when possible over the methodology outlined. >>> if + else and ifelse perf

Re: [R] Reshaping grouped data

2010-02-16 Thread Dimitris Rizopoulos
one approach is: Data.long <- with(Data, data.frame( w = c(rbind(total - cases, cases)), y = rep(0:1, nrow(Data)), x1 = rep(x1, each = 2), x2 = rep(x2, each = 2) )) I hope it helps. Best, Dimitris Myrland Øystein wrote: Dear R-help list, I have grouped data, looking lik

Re: [R] error message when downloading packages using the OS X shell

2010-02-16 Thread Jessica Joganic
> > I apologize for not including my entire script. What I typed into the shell > was: > > *download.packages(ape)* > > to which R responded with a Tcl/Tk interface allowing me to set my CRAN. > After I did so it proceeded to spit out the following error: > > *Loading Tcl/Tk interface ... done* > E

[R] Reshaping grouped data

2010-02-16 Thread Myrland Øystein
Dear R-help list, I have grouped data, looking like this: cases <- c(23,12,56,81) total <- c(123,234,248,390) x1 <- c(0,0,1,1) x2 <- c(0,1,0,1) Data <- as.data.frame(cbind(cases,total,x1,x2)) Data I would like to run a logistic regression with group weights on these, where cases

[R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-16 Thread Kum-Hoe Hwang
Howdy, R Grues I have enjoyed R, but I cannot solve one problem easily. Please help my problem. When I tried the R script, I got the following Error. This error results from input data file exported through a Excel spreadsheet software. Error in step(lm(pop.rate ~ as.numeric(year) + as.factor(po

<    1   2