[R] constraints in optim?

2004-10-02 Thread Christian Schulz
optim(c(1,1),LL,method=SANN,control=list(fnscale=-1),trans=trans,times=times) $par [1] 17.422635 -1.606859 How could i constraint that the parameters should be both positive in my maximizing problem? I check constrOptim but here i could only constraint the variables trans and times and not my

Re: [R] constraints in optim?

2004-10-02 Thread Prof Brian Ripley
Do you know what you are doing using method SANN? It is a very strange choice for a 2D problem. Method L-BFGS-B would allow non-negativity constraints. optim() does not have control options trans and times ... The standard way would be to transform your problem, for example to optimize over

Re: [R] gnls or nlme : how to obtain confidence intervals of fitted values

2004-10-02 Thread Spencer Graves
Pinhiero and Bates (2000) Mixed-Effects Models in S and S-Plus (Springer) describe the use of intervals for that. In library(nlme), R 1.9.1 for Windows, I found documentation for intervals, intervals.gls, intervals.lme, intervals.lmList, and gnls. To an example in the documentation for

[R] Inverse CWT?

2004-10-02 Thread Manojit Roy
Hello R, Is there a function (in Contrib packages maybe) that can do inverse of continuous wavelet transform? I am using cwt() from Rwave library to get the transform of a time series, and need to reconstruct the series within a subset of scales. Thanks a bunch, Manojit

[R] I am out of the office

2004-10-02 Thread Sharon Freeman, DGIM
I am away from the office the week of Sept 27 through Oct 1. I will read your message regarding Mail Delivery (failure [EMAIL PROTECTED]) and respond as soon as I can. For urgent matters or those regardng the UCSF Primary Care Internal Medicine Residency, please call Katherine Li (via the

[R] conditional assignments and calculations

2004-10-02 Thread Michael Lachmann
Hello! I am using the TeXmacs interface to R. (Though I encountered a similar problem when using Sweave) In doing calculations I often ecounter this scenario: I'll have some calculations in my file: -- A=read.lots.of.data() B=huge.calculation.on(A) C=another.calculation.on(B) -- Now, if A has

[R] lme function with marginal terms for ANOVA?

2004-10-02 Thread Bill Shipley
Hello. The linear mixed model (lme) function has an anova (anova()) function. This anova function has a type argument that can be “marginal”. I understood that this was equivalent to the “type III” (type=ssType3) sum of squares of the ordinary linear model. Is this correct? Specifically, if

Re: [R] Reading multiple files into R

2004-10-02 Thread Vikas Rawal
Thanks Kevin and Roger. This gave me the clue and was a great help. I have been trying it out. There is some problem in the code that still needs to be figured out. For the first 9 files, paste(wb-0, i, vc.dbf, sep=) works fine. But as you rightly guessed, I have more files. So when I use

Re: [R] Lattice .ps graphic is rotated in LaTeX slides

2004-10-02 Thread John Maindonald
On 2 Oct 2004, at 8:04 PM, [EMAIL PROTECTED] wrote: On Fri, 2004-10-01 at 10:58, Peter Dalgaard wrote: Michael Friendly [EMAIL PROTECTED] writes: ! Package graphics Error: Division by 0. What am I doing wrong, or how could I do it differently so it would work? You might try \usepackage{graphicx}

Re: [R] Reading multiple files into R

2004-10-02 Thread Vikas Rawal
I progressed when I combined the Kevin-Roger method with the Jomes-holtman method. sprintf() in place of formatC did the trick. Holtman's method does not work because of some problem with the assign. It seems you cannot have a variable target of the assignment. Now I have a vector of lists