Re: [R] help: cannot allocate vector of length 828310236

2006-08-15 Thread Prof Brian Ripley
Does it make any statistical sense to do polr or probit regression (not the same thing) on `really huge data'? There are few regression-like problems in which model inadequacy does not swamp estimation uncertainty for as few as a 1000 cases. If you want to do that sort of thing, by all means

Re: [R] Help with workaround for: Function '`[`' is not in thederivatives table

2006-08-15 Thread Bill.Venables
Earl F. Glynn asks: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Earl F. Glynn Sent: Tuesday, 15 August 2006 8:44 AM To: r-help@stat.math.ethz.ch Subject: [R] Help with workaround for: Function '`[`' is not in thederivatives table # This works

[R] how to call forth a class definition buried in a package

2006-08-15 Thread Bálint Czúcz
Dear list, I would like to use this C call: tmp - .Call(R_MPinv, covariance, tol, svdmem) but it gives me the following error: Error in getClass(LinStatExpectCovarMPinv) : LinStatExpectCovarMPinv is not a defined class I think the reason for this is that the C code starts with this

Re: [R] Question on .Options$max.print - print/cat extremely long strings on a screen

2006-08-15 Thread Hans-Joerg Bibiko
Dear list members, sorry for my incompleteness! My problem is the following: (R 2.3.1 on Mac OS X 10.4.7 RAM 1GByte using Mac GUI) I have a function like this: foo1 - function() { out - NULL for(i in 1:10010) out - paste(out, i, . line\n, sep=) return(out) } a -

[R] Protection stack overflow

2006-08-15 Thread Paul Koufalas
G'day all. I'm a new user of R -- but an arms-length user, as I'm running it from Octave via the ROctave interface that Duncan Temple Lang wrote some years ago and Stephan Van Der Walt recently updated for use with Octave 2.1.71. I'm using R version 2.1.1. ROctave uses libR.so to provide the

[R] Query the kind of calling a funcion

2006-08-15 Thread Hans-Joerg Bibiko
Dear all, My question is concerned to the kind how a function is called. Example A: foo(1) Example B: a - foo(1) Is there any way for the function foo() to recognise whether the returned value of foo() is stored in a variable or not, i.e. to distinguish between Example A and B?

Re: [R] Protection stack overflow

2006-08-15 Thread Prof Brian Ripley
R has a command-line option to set the ppstack size, --max-ppsize=NSet max size of protect stack to N Looks like you need to supply this (and it can be done with embedded R) if the problem persists with current R. You could also try arima0 or even ar to do the fitting. On Tue, 15 Aug

Re: [R] How to reply to a thread if .. R-help mails .. in digest

2006-08-15 Thread Martin Maechler
Thanks a lot, Ted, for the good extensive explanation. Let me try summarize, confirm and add a bit w/o repeating too much: - If you get regular mailing list e-mails, and reply to postings, any decent mail software will take the 'Message-Id:' header of the message you reply to, and produce

Re: [R] split a y-axis to show data on different scales

2006-08-15 Thread Johannes Hüsing
The pro's and con's of using scale breaks were discussed by Cleveland (1985) The Elements of Graphing Data (Wadsworth, pp. 85-91, 149). I don't know what Cleveland said about this is the second edition Spencer Graves: but I believe there are times when scale breaks are appropriate,

[R] A plot with a bisector

2006-08-15 Thread Amir Safari
Dear R Users, How to make a plot with a bisector is my question. Indeed, I want to plot a QQplot. But it doesn't have such a bisector. Thanks a lot. Amir - [[alternative HTML version deleted]]

[R] Aliases for arguments in a function

2006-08-15 Thread [EMAIL PROTECTED]
Hi all. I have a function that I would like to use either the argument name as originally defined or another name. Within the function (and other functions) use the argument name as originally written, so I don't want to simply remove the old argument name for the new one, but simply allow

Re: [R] Aliases for arguments in a function

2006-08-15 Thread Richard M. Heiberger
foo - function(arg1, this, that) { if (missing(this) !missing(that)) this - that if(this 0) stop(this must be positive) return(arg1/this) } foo(arg1=5, this=10) foo(arg1=5, that=10) __ R-help@stat.math.ethz.ch mailing list

[R] nls

2006-08-15 Thread Xiaodong Jin
Is there anyway to change any y[i] value (i=2,...6) to make following NLS workable? x - c(0,5,10,15,20,25,30) y - c(1.0,0.82000,0.68000,0.64000,0.7,0.68667,0.64000) lm(1/y ~~ x) nls(1/y ~~ a+b*x^c, start=list(a=1.16122,b=0.01565,c=1), trace=TRUE) #0.0920573 : 1.16122

Re: [R] nls

2006-08-15 Thread Prof Brian Ripley
You problem is x^c for x = 0. If you intended only c 1, try a starting value meeting that condition (but it seems that the optimal c is about 0.27 is you increase x slightly). Why have you used ~~ ? (Maybe because despite being asked not to, you sent HTML mail?) On Tue, 15 Aug 2006,

Re: [R] Aliases for arguments in a function

2006-08-15 Thread Prof Brian Ripley
foo - function(arg1, this=that, that) ... works. On Tue, 15 Aug 2006, [EMAIL PROTECTED] wrote: Hi all. I have a function that I would like to use either the argument name as originally defined or another name. Within the function (and other functions) use the argument name as

[R] ARCH Jump diffusion models

2006-08-15 Thread Hazrachoudhury, Avishek \(RSCH\)
Hi I was wondering if you could tell me how would I go abt fitting the following model to a data series. It is an ARCH jump diffusion model. X(t)=k+ ó (t)z(t)+J x Y, and ó(t)= sqrt[a +b [X(t-1)-k]^2] Here k is mean of the series. z(t) is iid standard normal error J is a jump variable

Re: [R] nls

2006-08-15 Thread Peter Dalgaard
Prof Brian Ripley [EMAIL PROTECTED] writes: You problem is x^c for x = 0. If you intended only c 1, try a starting value meeting that condition (but it seems that the optimal c is about 0.27 is you increase x slightly). Surely you mean c 0. nls(1/y ~ a+b*x^exp(c),

Re: [R] nls

2006-08-15 Thread Petr Pikal
Hi Why do you want to change your variable values? It smells a rat to me. If you just change your a,b,c values nls arrives to some finite result (e.g. c=1.5 or c=0.3) . BTW by what magic you obtained such precise and wrong estimates for a,b,c? HTH Petr On 15 Aug 2006 at 5:54, Xiaodong

Re: [R] nls

2006-08-15 Thread Prof Brian Ripley
On Tue, 15 Aug 2006, Peter Dalgaard wrote: Prof Brian Ripley [EMAIL PROTECTED] writes: You problem is x^c for x = 0. If you intended only c 1, try a starting value meeting that condition (but it seems that the optimal c is about 0.27 is you increase x slightly). Surely you mean c

[R] question re: summarry.lm and NA values

2006-08-15 Thread r user
Is there a way to get the following code to include NA values where the coefficients are “NA”? ((summary(reg))$coefficients) explanation: Using a loop, I am running regressions on several “subsets” of “data1”. “reg - ( lm(lm(data1[,1] ~., data1[,2:l])) )” My regression has 10 independent

[R] Presentation of multiple models in one table using xtable

2006-08-15 Thread Ajay Narottam Shah
Consider this situation: x1 - runif(100); x2 - runif(100); y - 2 + 3*x1 - 4*x2 + rnorm(100) m1 - summary(lm(y ~ x1)) m2 - summary(lm(y ~ x2)) m3 - summary(lm(y ~ x1 + x2)) Now you have estimated 3 different competing models, and suppose you want to present the set of models in one table.

[R] fMultivar OLS - how to do dynamic regression?

2006-08-15 Thread Kerpel, John
Hi folks! Does anybody know how to use the OLS function in fMultivar to do dynamic regression? I've tried specifying lags in OLS using a data series created in fSeries and it doesn't seem to work. I've done dynamic regression using dyn$lm and I was wondering how to accomplish the same thing

Re: [R] question re: summarry.lm and NA values

2006-08-15 Thread Petr Pikal
Hi On 15 Aug 2006 at 7:01, r user wrote: Date sent: Tue, 15 Aug 2006 07:01:13 -0700 (PDT) From: r user [EMAIL PROTECTED] To: rhelp r-help@stat.math.ethz.ch Subject:[R] question re: summarry.lm and NA values Is there a way to

Re: [R] question re: summarry.lm and NA values

2006-08-15 Thread Petr Pikal
Hi just as a quick workaround you probably can use aliased value from summary fff-rep(summary(reg)$aliased,4) dim(fff)-c(no.of.your.variables,4) fff[which(fff)]-NA fff[which(!fff)]-coef(summary(reg)) to get coef matrix with NA values HTH Petr On 15 Aug 2006 at 17:15, r user [EMAIL

[R] Looking for info on the Regression Modeling Strategies in R course in DC area

2006-08-15 Thread Tim McDonald
Hello list, A colleague of mine mentioned a great course on Regression Modeling Strategies in R. Anyone knows if this course is offered as public course in DC area? Thanks a bunch - TM - [[alternative HTML version deleted]]

[R] REML with random slopes and random intercepts giving strange results

2006-08-15 Thread Simon Pickett
Hi everyone, I have been using REML to derive intercepts and coeficients for each individual in a growth study. So the code is m2 - lmer(change.wt ~ newwt+(newwt|id), data = grow) Calling coef(model.lmer) gives a matrix with this information which is what I want. However, as a test I looked at

Re: [R] question re: summarry.lm and NA values

2006-08-15 Thread Prof Brian Ripley
On Tue, 15 Aug 2006, Petr Pikal wrote: Hi On 15 Aug 2006 at 7:01, r user wrote: Date sent:Tue, 15 Aug 2006 07:01:13 -0700 (PDT) From: r user [EMAIL PROTECTED] To: rhelp r-help@stat.math.ethz.ch Subject: [R] question re:

Re: [R] question re: summarry.lm and NA values

2006-08-15 Thread Berton Gunter
Is there a way to... always has the answer yes in R (or C or any language for that matter). The question is: Is there a GOOD way...? where good depends on the specifics of the situation. So after that polemic, below is an effort to answer, (adding to what Petr Pikal already said): -- Bert Gunter

Re: [R] REML with random slopes and random intercepts giving strange results

2006-08-15 Thread Doran, Harold
I don't this is because you are using REML. The BLUPs from a mixed model experience some shrinkage whereas the OLS estimates would not. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Simon Pickett Sent: Tuesday, August 15, 2006 11:34 AM To:

[R] nls convergence problem

2006-08-15 Thread Earl F. Glynn
I'm having problems getting nls to agree that convergence has occurred in a toy problem. nls.out never gets defined when there is an error in nls. Reaching the maximum number of iterations is alway an error, so nls.out never gets defined when the maximum number of iterations is reched. From

[R] How to show classes of all columns of a data frame?

2006-08-15 Thread T Mu
Hi all, Suppose I have a data frame myDF, col A is factor, col B is numeric, col C is character. I can get their classes by class(myDF$A) but is there a quick way to show what classes of all columns are? Thank you. Tian [[alternative HTML version deleted]]

Re: [R] How to show classes of all columns of a data frame?

2006-08-15 Thread Marc Schwartz (via MN)
On Tue, 2006-08-15 at 13:10 -0400, T Mu wrote: Hi all, Suppose I have a data frame myDF, col A is factor, col B is numeric, col C is character. I can get their classes by class(myDF$A) but is there a quick way to show what classes of all columns are? Thank you. Tian Depending upon

[R] zlim not working in persp3d

2006-08-15 Thread Ken Nussear
Hi list, I'm trying to limit the z axis plotted using persp3d {rgl} to a given range. I'm trying the following statement persp3d(g0,pa,D, xlim=range(g0),ylim=range(pa), zlim=range (zbounds),col=lightblue) where g0 and pa are both a range of 20 numbers from 0.05 to 1, and D is a 20 x 20

[R] rexp question

2006-08-15 Thread Spencer Jones
I am using rexp to generate several exponential distributions. I am passing rexp a vector of rates , r. I am wanting to simulate a sample of size 200 for each rate so the code looks like: rexp(n=200*length(r),rate=r) this gives me a vector of the random exponential variables, but they are all

[R] Grasper model error

2006-08-15 Thread Ken Nussear
I tried this over a the grasp users yahoo group and got no responseSo I wonder if anyone here knows about grasper I keep getting this error when trying to run a model. Error in smooth.construct.tp.smooth.spec(object, data, knots) : Too many knots for t.p.r.s term: see `gam.control' to

Re: [R] rexp question

2006-08-15 Thread Greg Snow
Try: rexp(n=200*length(r), rate=rep(r, each=200) ) Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spencer Jones

Re: [R] nls convergence problem

2006-08-15 Thread Dieter Menne
Earl F. Glynn efg at stowers-institute.org writes: Here's my toy problem: ?nls.control ?nls # Method 2 X - 0:15 Y - 9.452 * exp(-0.109*X) + 5.111 # Toy problem nls.out - nls(Y ~ a*exp(b*X)+c, +start=list(a=6,b=-0.5,c=1), +

[R] Hierarchical clustering

2006-08-15 Thread Davendra Sohal
Hi, I'm new to R; this is my second email to this forum. I have a dataset that looks like this: GeneA B C D A 511 6116 15151515 B

[R] model = F causing error in polr()

2006-08-15 Thread T Mu
Hi all, I got an error message if I set model =F in polr(), like polr(y ~ x1 + x2, data1, model = F, method = probit) Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ (found for '(model)') but polr(y ~ x1 + x2, data1, method

Re: [R] model = F causing error in polr()

2006-08-15 Thread Rolf Turner
Try ``model = FALSE'' rather than ``model = F'' and see if it makes a difference. You make have an unwanted variable named ``F'' lurking somewhere. (In general it is a *bad* idea to use ``F'' when ``FALSE'' is intended.) cheers, Rolf

Re: [R] nls convergence problem

2006-08-15 Thread Earl F. Glynn
Dieter Menne [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Earl F. Glynn efg at stowers-institute.org writes: This toy problem is exactly what the warning is for: Warning Do not use nls on artificial zero-residual data. Add some noise and try again. Thank you! I had adapted

[R] Hierarchical clustering

2006-08-15 Thread Davendra Sohal
Hi, I'm new to R; this is my second email to this forum. I have a dataset that looks like this: Gene AB 12536.25 2532.2 22527.35 4583.3 There are about 4 genes with 3-10 patients per dataset. Gene expression values fill

Re: [R] nls convergence problem

2006-08-15 Thread Berton Gunter
Or, maybe there's something I don't understand about the algorithm being used. Indeed! So before making such comments, why don't you try to learn about it? Doug Bates is a pretty smart guy, and I think you do him a disservice when you assume that he somehow overlooked something that he

[R] A model for possibly periodic data with varying amplitude [repost, much edited]

2006-08-15 Thread Andrew Robinson
Hi dear R community, I have up to 12 measures of a protein for each of 6 patients, taken every two or three days. The pattern of the protein looks periodic, but the height of the peaks is highly variable. I'm testing for periodicity using a Monte Carlo simulation envelope approach applied to a

Re: [R] nls convergence problem

2006-08-15 Thread Earl F. Glynn
Berton Gunter [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Or, maybe there's something I don't understand about the algorithm being used. Indeed! So before making such comments, why don't you try to learn about it? Doug Bates is a pretty smart guy, and I think you do him a

[R] coefficients' order in polr()?

2006-08-15 Thread T Mu
Hi all, I am using polr(). The resulting coefficients of first levels are always 0. What to do if I wnat to get the coefficients of the last level 0. For example, suppose x has 3 levels, 1, 2, 3 probit - plor(y ~ x, data1, method='probit') will get coefficients of level 2, 3 of x, but I want

Re: [R] Looking for info on the Regression Modeling Strategies in R course in DC area

2006-08-15 Thread Frank E Harrell Jr
Tim McDonald wrote: Hello list, A colleague of mine mentioned a great course on Regression Modeling Strategies in R. Anyone knows if this course is offered as public course in DC area? Thanks a bunch - TM I'll be teaching this course in DC Sept 28-29 for XL Solutions.

Re: [R] coefficients' order in polr()?

2006-08-15 Thread ronggui
you can use _relevel_ to Reorder Levels of Factor. use ?relevel to get more information. 2006/8/16, T Mu [EMAIL PROTECTED]: Hi all, I am using polr(). The resulting coefficients of first levels are always 0. What to do if I wnat to get the coefficients of the last level 0. For example,

[R] Specifying Path Model in SEM for CFA

2006-08-15 Thread Rick Bilonick
I'm using specify.model for the sem package. I can't figure out how to represent the residual errors for the observed variables for a CFA model. (Once I get this working I need to add some further constraints.) Here is what I've tried: model.sa - specify.model() F1 - X1,l11, NA F1 -