[R] predict.glm predicted prob above 1?

2009-03-09 Thread Kitty Lee
I have a puzzle When I include an interaction in the model, many predicted probabilities are above 1. Is that a problem with my model? I thought the predicted prob can't be bigger than 1... Any help would be really appreciated! Thanks! K.

Re: [R] predict.glm predicted prob above 1?

2009-03-09 Thread Simon Blomberg
There is a bug in your code: Try reg2-predict.glm(reg1, se.fit=T, data.frame(male=1, edu=1, married=1,inc=1, relig=1, YEAR=seq(1,33,1)), type=response) You put type=response into your newdata frame, so it wasn't visible to predict.glm. So predict.glm assumed the default type, which is link.

[R] arfima model

2009-03-09 Thread dorina.lazar
Hello, I am trying to estimate an arfima model with R. fracdiff(rdu, nar = 2, nma = 2, ar = rep(NA, max(nar, 1)), ma = rep(NA, max(nma, 1)), dtol = NULL, drange = c(0, 0.5), h, M = 100). The procedure give the message: Error in ar[is.na(ar)] - 0 : object nar not found What can I do? With

[R] [R-pkgs] mgcv 1.5-0

2009-03-09 Thread Simon Wood
mgcv 1.5-0 is now on CRAN. Main changes are: * REML and ML smoothness selection are now available. * A Tweedie family has been added. * `gam.method' has been replaced (see arguments `method' and `optimizer' for `gam') For other changes see the changeLog. Simon -- Simon Wood,

[R] How to optimize a matrix

2009-03-09 Thread b88207001
I would like to estimate the sigma matrix of multinormal distribution through ML. But I don't know how to optimize the parameter sigma. Could any one help me? Thank you so much~ Yen Lee __ R-help@r-project.org mailing list

[R] Chull function

2009-03-09 Thread Alexandre Pratte
Hi everyone, Using a simulation, I have to find what are the probabilities that, in a square region, the convex hull is a triangle, using the chull function. However, I have a hard time with the chull function, i did not see many examples in which the chull function is used. I searched a

Re: [R] Cross Tables with odfTable in odfweave

2009-03-09 Thread Paul Jones
Hey Marc, Your code was very helpful. You should make a new R function out of it. Actually it looks like adding margins may be a little bit tricky if I only want sums of the counts, not the percentages. If I add margins after I rbind, then R will sum together the counts with the

Re: [R] Accessing the Sources; was: Help

2009-03-09 Thread Uwe Ligges
nitin kumar wrote: Hello Everyone, I am trying to excess the inbuit .Fortran and .C codes of R. Can any one help me in that. For example in kmeans clustering the algorithms are written in .Fortran I want to access them and see the .Fortran syntax of the codes. Can any one help me how can I do

Re: [R] difference between Primitive and Generic

2009-03-09 Thread Duncan Murdoch
Edna Bell wrote: Dear R Gurus: What is the difference between a Primitive and a Generic, please? They are talking about different things (though both look like functions): generic talks about the user interface, primitive talks about the internal implementation. A generic is a

Re: [R] plot confidence limits of a regression line - problem

2009-03-09 Thread Eik Vettorazzi
Hi, the predict-function is not very good in guessing names from a given new dataset. So if you want to predict x1 from some new x2 values, your newdata argument should contain some x2 - values. predict(model, newdata=data.frame(x2=seq(0,4)), interval = c(confidence), level =

[R] LCP procedure Mercurio-time homogeneity

2009-03-09 Thread Olivier PERON
Hello Is there somebody who have code for estimation of time homogeneity and local change procedure based on the papers of Spokoiny and Mercurio ? Thanks a lot in advance! Olivier [[alternative HTML version deleted]] __

Re: [R] Chull function

2009-03-09 Thread Yihui Xie
Isn't the single example enough in help(chull)? In your case I think you are finding the probability of length(chull(x)) == 3. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http://www.yihui.name School of

Re: [R] Help

2009-03-09 Thread Richard . Cotton
I am trying to excess the inbuit .Fortran and .C codes of R. Can any one help me in that. For example in kmeans clustering the algorithms are written in .Fortran I want to access them and see the .Fortran syntax of the codes. Can any one help me how can I do that? Download the R source

[R] statDA arw and plotmvoutlier function

2009-03-09 Thread François Collienne
Hi, I am using the methods developped in the packages statDA and mvoutliers to detect multivariate outliers. I used the plotmvoutlier to detect the outliers. The only thing I don't understand is that the results given by the vector w from arw and o from plotmvoutlier are not the same (i.e.

[R] Re : How to optimize a matrix

2009-03-09 Thread justin bem
See ?optim See ?mle (stats4 package) or help.search(MLE) Justin BEM BP 1917 Yaoundé Tél (237) 99597295 (237) 22040246 De : b88207...@ntu.edu.tw b88207...@ntu.edu.tw À : r-help@r-project.org Envoyé le : Lundi, 9 Mars 2009, 6h55mn 20s Objet : [R] How to

[R] How to select randomly from a matrix?

2009-03-09 Thread WXE83
Dear all, I got one problem here and hoping someone can help me on this. Say I have a 50 by 2 matrix and I don't know how to randomly select: 1. a pair of observations from the last 10th of the 50 observation from the matrix. 2. how to select randomly an observation from the first 5

[R] Odp: How to select randomly from a matrix?

2009-03-09 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 09.03.2009 11:29:41: Dear all, I got one problem here and hoping someone can help me on this. Say I have a 50 by 2 matrix and I don't know how to randomly select: 1. a pair of observations from the last 10th of the 50 observation from the

[R] [sem package] path.diagram() ignores the edge.label argument ..?

2009-03-09 Thread Martin Batholdy
hi, I plot path diagrams with the path.diagram() function of the sem package in combination with the graphviz application. Now I want the graphviz code for a path-plot with the actual standardized coefficients on the arrows (not the names). I tried to add edge.labels=values as an argument

[R] Normal Probability Plot - Time series

2009-03-09 Thread Will Stone
Hi, I have some time-series data and wish to plot a normal probability plot in R. How do I go about this? Thanks. W. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] how to estimate distribution?

2009-03-09 Thread Mike Lawrence
I know it only causes a shift and scale transformation of the distribution, but it always gets my goat when I see people using the sum as a statistic of interest when the mean has a more general application (i.e. some other researcher obtains a different number of observations per subject) and a

Re: [R] How to select randomly from a matrix?

2009-03-09 Thread Domenico Vistocco
WXE83 wrote: Dear all, I got one problem here and hoping someone can help me on this. Say I have a 50 by 2 matrix and I don't know how to randomly select: data - matrix(1:25, 50, 2) 1. a pair of observations from the last 10th of the 50 observation from the matrix. data[sample(41:50,

Re: [R] info

2009-03-09 Thread Mike Lawrence
http://lmgtfy.com/?q=Parallel+R First entry provides an article that notes the various solutions thus far (rmpi, snow, pnmath). On Wed, Mar 4, 2009 at 7:06 AM, Enrico Giorgi giorgi_enr...@hotmail.it wrote: Dear Sir or Madam, I've been using R for one year and I really appreciate it. I

[R] RES: portable R editor

2009-03-09 Thread Leandro Marino
Another possibility is buy an U3 smartdrive (U3). And then you can use de UltraEdit Portable. It’s a good text editor with some level of support for R. Atenciosamente, Leandro Lins Marino Centro de Avaliação Fundação CESGRANRIO Rua Santa Alexandrina, 1011 - 2º andar Rio de Janeiro, RJ - CEP:

Re: [R] Normal Probability Plot - Time series

2009-03-09 Thread Richard . Cotton
I have some time-series data and wish to plot a normal probability plot in R. How do I go about this? In R, they are known as quantile-quantile plots. Check out ?qqplot and ?qqnorm. Regards, Richie. Mathematical Sciences Unit HSL

[R] Zero distance error in corSpatial - correlation structure using lme

2009-03-09 Thread John Poulsen
Hello, I am having a problem specifying the correlation structure in lme which leads to the error: Error in getCovariate.corSpatial(object, data = data) : Cannot have zero distances in corSpatial. I have specified a grouping variable which is the only fix I could find by searching this

[R] understanding the output from survival analysis

2009-03-09 Thread Ullrika Sahlin
Why do I get different sign of the coefficients of covariates when I run the semi-parametric proportional hazard model (coxph) compared to the parametric proportional hazard model (survreg)? Anyone with experience in extracting information form survreg to make predictions are free to contact

Re: [R] Cross Tables with odfTable in odfweave

2009-03-09 Thread Max Kuhn
PJ, If I use odfweave, the odfweave function produces an output file, but the for loop produces no tables. If I use R2HTML with similar code, I just get the last table the for loop produces. Here is a look at the code of odfweave, which seems to be correct with syntax but doesn't produce any

Re: [R] info

2009-03-09 Thread Max Kuhn
Enrico, I've been using R for one year and I really appreciate it. I would like to know if a version performing parallel computations on multicore computers and computer clusters exists. There is a high-performance computing SIG (special interests group) for R. See:

Re: [R] [sem package] path.diagram() ignores the edge.label argument ..?

2009-03-09 Thread John Fox
Dear Martin, It helps if you spell the name of the argument correctly, edge.labels=values. BTW, this will give you the unstandardized, not standardized, coefficients. John -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Martin

Re: [R] Making tapply code more efficient

2009-03-09 Thread Doran, Harold
Thierry and Jim: Thank you both for your reply. I remain a bit baffled over something. Here is the sample data generated by jim and code by Thierry, which works exactly as expected. x - cbind(sample(326397, 800967, TRUE), sample(20, 800967, TRUE)) x - data.frame(x) names(x)[1:2] -

Re: [R] Making tapply code more efficient

2009-03-09 Thread Doran, Harold
I think I might be able to answer my own question here. It turns out in the step tab - table(dats3$student_unique_id, dats3$teacher_unique_id) The dimensions of this table in my data are significantly larger than the simulated data, thus consuming more memory. So, I know that the lme4 package

[R] rcorr.cens Goodman-Kruskal gamma

2009-03-09 Thread Kim Vanselow
Dear r-helpers! I want to classify my vegetation data with hierachical cluster analysis. My Dataset consist of Abundance-Values (Braun-Blanquet ordinal scale; ranked) for each plant species and relevé. I found a lot of r-packages dealing with cluster analysis, but none of them is able to

[R] Adding text to both grid and base graphs

2009-03-09 Thread Rik Schoemaker
Dear all, I'm stuck with the following problem: I generate graphs using both the grid system (with lattice) and the base system. I'd like to be able to identify these graphs later on with a bit of identifying text (e.g. a date and some comments). Adding text to these graphs cannot be done using

Re: [R] How to select randomly from a matrix?

2009-03-09 Thread WXE83
Thanks, it works.. Regards, Siti Domenico Vistocco wrote: WXE83 wrote: Dear all, I got one problem here and hoping someone can help me on this. Say I have a 50 by 2 matrix and I don't know how to randomly select: data - matrix(1:25, 50, 2) 1. a pair of observations from the last

[R] How to write a function that accepts unlimited number of input arguments?

2009-03-09 Thread Sean Zhang
Dear R-helpers: I am an R newbie and have a question related to writing functions that accept unlimited number of input arguments. (I tried to peek into functions such as paste and cbind, but failed, I cannot see their codes..) Can someone kindly show me through a summation example? Say, we have

Re: [R] Adding text to both grid and base graphs

2009-03-09 Thread Richard . Cotton
I generate graphs using both the grid system (with lattice) and the base system. I'd like to be able to identify these graphs later on with a bit of identifying text (e.g. a date and some comments). Adding text to these graphs cannot be done using a common system if you want to save them as

Re: [R] rcorr.cens Goodman-Kruskal gamma

2009-03-09 Thread David Winsemius
I looked at the help page for rcorr.cens and was surprised that function, designed for censored data and taking input as a Surv object, was being considered for that purpose. This posting to r-help may be of interest. John Baron offers a simple implementation that takes its input as

[R] nlme: problem with fitting logistic function

2009-03-09 Thread jakub kreisinger
Dear colegues I am trying to analyze growth data on mice. To do this I attempted to fit logistic curve using nlme package. However, the dataset I use is large (in total ca 20 000 measures on ca 3 000 individuals) with relatively complicated structure (several explanatory variables with

Re: [R] How to write a function that accepts unlimited number of input arguments?

2009-03-09 Thread baptiste auguie
Hi, On 9 Mar 2009, at 15:32, Sean Zhang wrote: Dear R-helpers: I am an R newbie and have a question related to writing functions that accept unlimited number of input arguments. it's usually through the ... argument, e.g in paste(...). (I tried to peek into functions such as paste and

[R] error correcting a signal

2009-03-09 Thread Oliver Bandel
Hello, I know, this list is for R, not for mathematics, but because of this problem in question, which may be interesting for others too, I ask it here. I want to correct a signal (timeseries). There is a jump up, and later a jump down. This error signal (must be an error, because the normal

Re: [R] Adding text to both grid and base graphs

2009-03-09 Thread Rik Schoemaker
Dear Richie, Unfortunately that doesn't help because it requires you to know beforehand what sort of graph you're generating. I want to be able to generate a graph (irrespective of the type) and then use a common process to label them so I don't have to think about which way I generated the graph

Re: [R] How to write a function that accepts unlimited number of input arguments?

2009-03-09 Thread baptiste auguie
On 9 Mar 2009, at 16:04, Sean Zhang wrote: Dear Baptiste: Many thanks for your help! Using the Reduce way, it works almost perfectly. I ran into this problem when thinking of appending vectors. Is it possible to not use list() within add() so add(vec1,vec2,vec3) below can work? add -

Re: [R] How to write a function that accepts unlimited number of input arguments?

2009-03-09 Thread Sean Zhang
Big thanks for your help and suggestion for email communication. -s On Mon, Mar 9, 2009 at 12:18 PM, baptiste auguie ba...@exeter.ac.uk wrote: On 9 Mar 2009, at 16:04, Sean Zhang wrote: Dear Baptiste: Many thanks for your help! Using the Reduce way, it works almost perfectly. I ran

[R] Is there any method to identify the distribution of a given dataset?

2009-03-09 Thread GreenBrower
It's important to identify the distribution of a dataset before do analysis and inference. Is there any method to identify the distribution of a given dataset? For example, I want to identify a dataset belong to normal of poisson distribution, how can I do that? -- View this message in context:

[R] singular matrices in plm::pgmm()

2009-03-09 Thread Millo Giovanni
Dear Richard, although I am co-author of some (other) parts of 'plm', my understanding of GMM methods is still rudimentary. Yet I have tried a quick exercise replicating Example 18.5 in Greene's Econometric Analysis (5th ed.) like this ## retrieve data from the book's site here

Re: [R] Adding text to both grid and base graphs

2009-03-09 Thread Dieter Menne
Rik Schoemaker RikSchoemaker at zonnet.nl writes: Unfortunately that doesn't help because it requires you to know beforehand what sort of graph you're generating. I want to be able to generate a graph (irrespective of the type) and then use a common process to label them so I don't have to

[R] Cannot update 2.8.1 packages: unable to access index for repository...

2009-03-09 Thread Marcus, Jeffrey
I am having trouble updating packages for R 2.8.1 in Windows XP. Note that I *am* able to update packages for R 2.7.0 (see bottom of posting) so this is not an Internet proxy problem. The steps I took were to (a) Copy over packages from my existing (2.7.0) library subdiretory to the R 2.8.1

Re: [R] nlme: problem with fitting logistic function

2009-03-09 Thread Dieter Menne
jakub kreisinger jakubkreisinger at seznam.cz writes: I am trying to analyze growth data on mice. To do this I attempted to fit logistic curve using nlme package. However, the dataset I use is large (in total ca 20 000 measures on ca 3 000 individuals) with relatively complicated structure

Re: [R] Cannot update 2.8.1 packages: unable to access index for repository...

2009-03-09 Thread Uwe Ligges
Marcus, Jeffrey wrote: I am having trouble updating packages for R 2.8.1 in Windows XP. Note that I *am* able to update packages for R 2.7.0 (see bottom of posting) so this is not an Internet proxy problem. The steps I took were to (a) Copy over packages from my existing (2.7.0) library

[R] mean reverting model

2009-03-09 Thread Josuah Rechtsteiner
dear useRs, i'm working with a mean reverting model of the following specification: y = mu + beta(x - mu) + errorterm, where mu is a constant currently I estimate just y = x (with lm()) to get beta and then calculate mu = estimated intercept / (1-beta). but I'd like to estimate mu and beta

[R] Median and prodlim

2009-03-09 Thread Ove Björ
Dear all, I would like to know how to calculate the median follow-up time from using function prodlim. By using reverse=TRUE i should get correct estimates when there are ties involved and I want to know how to get the median follow-up times from a Kaplan-meier survival function stratified by

Re: [R] nlme: problem with fitting logistic function

2009-03-09 Thread Dieter Menne
Dieter Menne dieter.menne at menne-biomed.de writes: 4) Use C for the core function. This is very effective, and there is at least on example coming with nlme (was it SSlogist?). I correct: it is phenoModel, calling nlme_one_comp_first in nlme.c Dieter

Re: [R] Cannot update 2.8.1 packages: unable to access index forrepository...

2009-03-09 Thread Charles Annis, P.E.
Are you using Microsoft OneCare? I had a similar problem accessing CRAN (actually setting a CRAN mirror) several weeks ago with R2.8.1 while R2.6.2 could access CRAN with no difficulties. Even running R as Administrator wouldn't work. The problem proved to be that OneCare had asked for my

[R] Moving Histogram?

2009-03-09 Thread Oliver Bandel
Hello, is there a function, that creates a moving histogram? I need a moving histogram analogical to a moving average. Is there such a thing in R? Ciao, Oliver __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] detecting NULL in recursive lists

2009-03-09 Thread Vadim Ogranovich
Dear R-users, How can I detect a NULL in a recursive list? For a regular list I could use lapply: lapply(list(x=NULL), is.null) $x [1] TRUE However that doesn't work for structures like list(list(x=NULL)). I tried rapply but it treats NULL as a list and discards them: rapply(list(a=1,

Re: [R] rcorr.cens Goodman-Kruskal gamma

2009-03-09 Thread Frank E Harrell Jr
David Winsemius wrote: I looked at the help page for rcorr.cens and was surprised that function, designed for censored data and taking input as a Surv object, was being considered for that purpose. This posting to r-help may be of interest. John Baron offers a simple implementation that takes

[R] Creating an Excel file with multiple spreadsheets

2009-03-09 Thread Jorge Ivan Velez
DeaR all, I'd like to know how to create an Excel file with multiple spreadsheets from R. I searched the help files and found [1] but it is not what I want to do. Let's say I have a data frame called DF as in the following code # Some data set.seed(123) ID-sample(5,100,replace=TRUE)

Re: [R] Making tapply code more efficient

2009-03-09 Thread William Dunlap
The sparse xtabs solution is good. It avoids the overhead of a long list of small vectors that tapply can require. Here is another approach, perhaps more like what a SAS programmer might do. It can run quickly and use little memory but also can be tricky to set up. Sort the data into groups (by

Re: [R] repeated measures anova, sphericity, epsilon, etc

2009-03-09 Thread Paul Gribble
After much research I've listed a couple of ways to do repeated measures anova here: http://gribblelab.org/2009/03/09/repeated-measures-anova-using-r/ including univariate and multivariate methods, post-hoc tests, sphericity test, etc. It appears to me that the most useful way is a multivariate

Re: [R] Creating an Excel file with multiple spreadsheets

2009-03-09 Thread Patrick Connolly
On Mon, 09-Mar-2009 at 02:34PM -0400, Jorge Ivan Velez wrote: | DeaR all, | | I'd like to know how to create an Excel file with multiple | spreadsheets from R. I searched the help files and found [1] but it | is not what I want to do. I use the Perl script from Marc Schwartz in that list.

Re: [R] Ideal (possible) configuration for an exalted R system

2009-03-09 Thread Matthew Keller
I also work with very large datasets, and currently am using an early 2008 MacPro 2x3GHz Quad-Cpre Intel Xeon with 32 GB RAM. This works very well, although (I'm ashamed to say, since it's partly a reflection of my programming skills) I still run out of RAM occasionally! But this system works well

Re: [R] Is there any method to identify the distribution of a given dataset?

2009-03-09 Thread Bert Gunter
Below. Brief summary is: You **need** to consult a statistician. You know far too little statistics to do statistical analysis on your own. -- Bert Bert Gunter Genentech Nonclinical Biostatistics 650-467-7374 -Original Message- From: r-help-boun...@r-project.org

Re: [R] repeated measures anova, sphericity, epsilon, etc

2009-03-09 Thread Kingsford Jones
Hi Paul, Note that in your example subject/myfactor is conflated with the error term. The error thrown when you use intervals on the lme object is a result: am2 - lme(dv ~ myfactor, random = ~1|subject/myfactor, data=mydata) intervals(am2) Error in intervals.lme(am2) : Cannot get confidence

Re: [R] Zero distance error in corSpatial - correlation structure using lme

2009-03-09 Thread Kingsford Jones
I believe you are stuck with what the error says -- i.e. you 'Cannot have zero distances in corSpatial'. If you recorded locations for observations within transects then you should be able to model the spatial autocorrelation, either within transects or across the study area (although the latter

Re: [R] Creating an Excel file with multiple spreadsheets

2009-03-09 Thread Whit Armstrong
if you don't find the solution you need, I have a package that uses Apache POI to do this, but you will need to compile it yourself. contact me if you want to go this route. -Whit On Mon, Mar 9, 2009 at 3:34 PM, Patrick Connolly p_conno...@slingshot.co.nz wrote: On Mon, 09-Mar-2009 at 02:34PM

Re: [R] mean reverting model

2009-03-09 Thread andrew
Mean reverting model = autoregression? If so, then search for ?ar or ?arima to fit a time series. On Mar 10, 4:36 am, Josuah Rechtsteiner rechtstei...@bgki.net wrote: dear useRs, i'm working with a mean reverting model of the following specification: y = mu + beta(x - mu) + errorterm,

[R] Data Restructuring Question

2009-03-09 Thread Jason Rupert
I think I am overlooking a call or concept in R to help me easily and quickly restructure my data.frame:   Sometimes the data I receive looks like: VariableName, Run1, Run2, Run3, Location temp,   15.0,  16.0,  17.0, There   And other times it looks like: VariableName, Run, Location

Re: [R] nlme: problem with fitting logistic function

2009-03-09 Thread Douglas Bates
On Mon, Mar 9, 2009 at 12:13 PM, Dieter Menne dieter.me...@menne-biomed.de wrote: jakub kreisinger jakubkreisinger at seznam.cz writes: I am trying to analyze growth data on mice. To do this I attempted to fit logistic curve using nlme package. However, the dataset I use is large (in total ca

Re: [R] Creating an Excel file with multiple spreadsheets

2009-03-09 Thread Carl Witthoft
Just wondering -- the referenced thread at [1] http://tinyurl.com/aurprr included a comment from Gabor (I think) that some day the gdata package might include a 'write.xls' based on M Schwartz' perl script. Any progress there? Carl __

Re: [R] How to write a function that accepts unlimited number of input arguments?

2009-03-09 Thread Gabor Grothendieck
Try this: sum.test - function(...) sum(c(...)) More commonly one uses the list(...) construct. On Mon, Mar 9, 2009 at 11:32 AM, Sean Zhang seane...@gmail.com wrote: Dear R-helpers: I am an R newbie and have a question related to writing functions that accept unlimited number of input

Re: [R] Creating an Excel file with multiple spreadsheets

2009-03-09 Thread Gabor Grothendieck
It was from Greg, not me. On Mon, Mar 9, 2009 at 5:53 PM, Carl Witthoft c...@witthoft.com wrote: Just wondering -- the referenced thread at  [1] http://tinyurl.com/aurprr included a comment from Gabor (I think) that some day the gdata package might include a   'write.xls' based on M

[R] Problem with capabilities() in R2-8.1

2009-03-09 Thread Marcus, Jeffrey
I just installed R 2.8.1 on Windows XP. When I ran the source command, I got the error: Error in capabilities(iconv) : 1 argument passed to .Internal(capabilities) which requires 0 I looked at the code for source and it indeed has a call to capabilities(iconv) if (capabilities(iconv)) {

Re: [R] mean reverting model

2009-03-09 Thread Josuah Rechtsteiner
hi andrew, the problem is that I don't know what kind of model this exactly is... I only know that I have to do it this way and how the model is structured. Mean reverting model = autoregression? If so, then search for ?ar or ?arima to fit a time series. On Mar 10, 4:36 am, Josuah

[R] lme anova() and model simplification

2009-03-09 Thread Menelaos Stavrinides
I am running an lme model with the main effects of four fixed variables (3 continuous and one categorical – see below) and one random variable. The data describe the densities of a mite species – awsm – in relation to four variables: adh31 (temperature related), apsm (another plant feeding mite)

Re: [R] Creating an Excel file with multiple spreadsheets

2009-03-09 Thread Marc Schwartz
I do not believe that anything formal has been done. Calling the perl script within an R function call would not be overly difficult, the key would be to package the perl modules required by the script, otherwise the user would have to install these manually from CPAN or via an OS specific

Re: [R] Creating an Excel file with multiple spreadsheets

2009-03-09 Thread Phil Spector
The xlsReadWrite package provides write.xls for Windows, while the dataframes2xls package provides write.xls for non-Windows systems. - Phil Spector Statistical Computing Facility

[R] Help on MLInterfaces

2009-03-09 Thread Tul Gan
Hi,   I am trying to use MLearn in MLInterfaces package to do randomforest, clustering, knn etc. How do I predict on a test set for which I do not know the classes? My training set has two classes. Thanks, Tulgan

Re: [R] lme anova() and model simplification

2009-03-09 Thread Kingsford Jones
Read section 2.4.2 of Pinheiro and Bates again. It describes the differences between the 4 methods of inference you tried (marginal t-test, sequential F-tests, LRTs and CIs) and makes some recommendations. There are some tricky issues involved in drawing inferences from mixed models, and

Re: [R] mean reverting model

2009-03-09 Thread andrew
Autoregression is just X(n+1) = a X(n) + b + error. The mean reverting model is when |a| 1. Estimation is carried out using x_ar - ar(x) summary(x_ar) standard error is found in the square root of the diagonal of the x_ar $asy.var.coef matrix. please read the documentation found at ?ar to

Re: [R] detecting NULL in recursive lists

2009-03-09 Thread Charles C. Berry
On Mon, 9 Mar 2009, Vadim Ogranovich wrote: Dear R-users, How can I detect a NULL in a recursive list? For a regular list I could use lapply: lapply(list(x=NULL), is.null) $x [1] TRUE However that doesn't work for structures like list(list(x=NULL)). I tried rapply but it treats NULL as

Re: [R] mean reverting model

2009-03-09 Thread markleeds
i think there's confusion here between a time series that reverts to its long term mean and an ornstein uhlenbeck type of mean reversion. they're not the same thing and I don't want to go into the difference because I would probably just add to the confusion. you might be better off sending

Re: [R] Moving Histogram?

2009-03-09 Thread Kjetil Halvorsen
library(help=zoo) make your time series into a zoo object then you can probably get something out of, rollapply(yourdata.zoo, FUN=hist, ...) but you must program the plotting yourself. Kjetil On Mon, Mar 9, 2009 at 3:18 PM, Oliver Bandel oli...@first.in-berlin.dewrote: Hello, is there a

[R] link for OU versus AR

2009-03-09 Thread markleeds
below is one link for an explanation of the equivalence between AR(1) and OU so I was wrong about needing an AR(2). at a quick glance, i think OU's that can always be written as AR(1)'s ( with a correct mapping of parameters ) but not every AR(1) can be written as an OU ?

Re: [R] mean reverting model

2009-03-09 Thread andrew
Autoregression is more general than the (discretized) Ornstein Uhlenbeck process. For a start, a discretized version of the Ornstein- Uhlenbeck is just an AR(1) process X(n+1) = X(n) + a (X(n) - mu) + error(n+1), but with the coefficient a restricted to 0 a 1. This restriction is necessary as

Re: [R] popular R packages

2009-03-09 Thread David Duffy
Given we are talking about statistical software, one bibliometric measure of relative package popularity is scientific citations. Web of Science is not too useful where the citation has been to a website or computer package, but Google Scholar for lme4: Linear mixed-effects models using S4

Re: [R] Data Restructuring Question

2009-03-09 Thread stephen sefick
look at package reshape there is a cool little function input that once you get the hang of is handy. On Mon, Mar 9, 2009 at 5:50 PM, Jason Rupert jasonkrup...@yahoo.com wrote: I think I am overlooking a call or concept in R to help me easily and quickly restructure my data.frame: Sometimes

Re: [R] popular R packages

2009-03-09 Thread Ted Harding
On 10-Mar-09 01:07:54, David Duffy wrote: Given we are talking about statistical software, one bibliometric measure of relative package popularity is scientific citations. Web of Science is not too useful where the citation has been to a website or computer package, but Google Scholar for

Re: [R] popular R packages

2009-03-09 Thread Matthew Keller
Hi all, Put me in the camp that says more information is better than less information - even if imperfect. Interpretation can be left to those using the data. Also, popular can mean many things. An alternative to number of times a package is downloaded would be a ratings system, where R users

Re: [R] popular R packages

2009-03-09 Thread hadley wickham
There was a discussion on this a while back in which Bill Venables said: To me a much more urgent initiative [than rating responders on R listserves] is some kind of user online review system for packages, even something as simple as that used by Amazon.com has for customer review of books. I

Re: [R] Data Restructuring Question

2009-03-09 Thread Jason Rupert
Stephen - Thanks a bunch for the suggestion to use reshape.  Thank is exactly what I needed.  Here is the test code that I put together so far.  I can probably get rid of the time and id columns from the resulting reshaped_test_data data.frame, but this is will allow me to move forward. 

Re: [R] popular R packages

2009-03-09 Thread Gabor Grothendieck
R-Forge already has this but I don't think its used much. R-Forge does allow authors to opt out which seems sensible lest it deter potential authors from submitting packages. I think objective quality metrics are better than ratings, e.g. does package have a vignette, has package had a release

[R] perform subgroup meta-analysis and create forest plot displaying subgroups

2009-03-09 Thread Steven Lubitz
Hello, I'm using the rmeta package to perform a meta analysis using summary statistics rather than raw data, and would like to analyze the effects in three different subgroups of my data. Furthermore, I'd like to plot this on one forest plot, with corresponding summary weighted averages of the

[R] problem with concatinating string while taking as a path of a file

2009-03-09 Thread venkata kirankumar
Hi all, I have a problem with concatinating strings while taking as a path here the problem is i have to take path as FPATH-D:\\Kiran and file name as Fname-FINDINGS.CSV and while I am reading this table I have to take path with using these two strings because in FPATH there is many

Re: [R] problem with concatinating string while taking as a path of a file

2009-03-09 Thread Simon Blomberg
Does this do what you want? paste(FPATH, Fname, sep=\\) Simon. On Tue, 2009-03-10 at 10:48 +0530, venkata kirankumar wrote: Hi all, I have a problem with concatinating strings while taking as a path here the problem is i have to take path as FPATH-D:\\Kiran and file name as