similar to: indexing a parameter in nls

Displaying 20 results from an estimated 6000 matches similar to: "indexing a parameter in nls"

2010 May 11
1
nls() and nls2() behavior?
first, apologies for so many posts yesterday and today. I am wrestling with nls() and nls2(). I have tried to whittle it down to a simple example that still has my problem, yet can be cut-and-pasted into R. here it is: library(nls2) options(digits=12); y= c(0.4334,0.3200,0.5848,0.6214,0.3890,0.5233,0.4753,0.2104,0.3240,0.2827,0.3847,0.5571,0.5432,0.1326,0.3481) x=
2017 Jun 06
0
integrating 2 lists and a data frame in R
Thank you David. Using xtabs operation simplifies the code very much, many thanks ;) On Tue, Jun 6, 2017 at 7:44 AM, David Winsemius <dwinsemius at comcast.net> wrote: > > > On Jun 6, 2017, at 4:01 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > > > > Hi Bogdan, > > Kinda messy, but: > > > > N <-
2017 Jun 06
1
integrating 2 lists and a data frame in R
Simple matrix indexing suffices without any fancier functionality. ## First convert M and N to character vectors -- which they should have been in the first place! M <- sort(as.character(M[,1])) N <- sort(as.character(N[,1])) ## This could be a one-liner, but I'll split it up for clarity. res <-matrix(NA, length(M),length(N),dimnames = list(M,N)) res[as.matrix(C[,2:1])] <-
2017 Jun 06
2
integrating 2 lists and a data frame in R
> On Jun 6, 2017, at 4:01 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > > Hi Bogdan, > Kinda messy, but: > > N <- data.frame(N=c("n1","n2","n3","n4")) > M <- data.frame(M=c("m1","m2","m3","m4","m5")) > C <-
2017 Jun 06
1
integrating 2 lists and a data frame in R
Here's another approach: N <- data.frame(N=c("n1","n2","n3","n4")) M <- data.frame(M=c("m1","m2","m3","m4","m5")) C <- data.frame(n=c("n1","n2","n3"), m=c("m1","m1","m3"), I=c(100,300,400)) # Rebuild the factors using M and N C$m <-
2008 Aug 04
1
simulate data based on partial correlation matrix
Given four known and fixed vectors, x1,x2,x3,x4, I am trying to generate a fifth vector,z, with specified known and fixed partial correlations. How can I do this? In the past I have used the following (thanks to Greg Snow) to generate a fifth vector based on zero order correlations---however I'd like to modify it so that it can generate a fifth vector with specific partial
2011 Jun 07
1
rgl: insert pauses in animation sequence / movie formats other than gif?
Two questions related to creating animated movies with rgl: 1. I've created an rgl scene with 5 different views I want to display in a movie, but I'd like to insert pauses (say, 5 seconds) at each view. How can I do this? I first created 5 userMatrix's, then play3d( par3dinterp( userMatrix=list(M1, M2, M3, M4, M5)), ,duration=2*60/5) ) then tried simply repeating each twice,
2013 Mar 19
1
How to automate this model selection algorithm?
I've got a complicated semi-parametric model that I'm fitting with mgcv. I start with a model based on theory. Its got lots of interaction terms. I want to winnow it down: removing each interaction term or un-interacted main effect one by one, checking the AIC, and retaining the model that gives me the lowest AIC. I then want to repeat the procedure on the retained model. Here is
2017 Jun 06
0
integrating 2 lists and a data frame in R
Hi Bogdan, Kinda messy, but: N <- data.frame(N=c("n1","n2","n3","n4")) M <- data.frame(M=c("m1","m2","m3","m4","m5")) C <- data.frame(n=c("n1","n2","n3"), m=c("m1","m1","m3"), I=c(100,300,400))
2005 Dec 20
1
nls problem
Hi list, I tried to use nls to do some nonlinear least square fitting on my data with 340 observations and 10 variables, but as I called nls() function, I got this error message: Error in qr.qty(QR, resid) : 'qr' and 'y' must have the same number of rows Then I traced back a little bit into nls() function, the error seemed to happen when calling nlsiter() internal function, but
2011 Aug 13
1
Own R function doubt
Hi to all the people again, I was writting a simply function in R, and wish to collect the results in a excel file. The work goes as follows, Ciervos<-function(K1, K0, A, R,M,Pi,Hembras) {B<-(K1-K0)/A T1<-(R*Pi*Hembras-M*Pi+B)/(Pi-M*Pi+R*Pi*Hembras) P1<-Pi-B R1<-P1*Hembras*R M1<-P1*M T2<-(R1-M1+B)/(P1-M1+R1) P2<-P1-B R2<-P2*Hembras*R M2<-P2*M
2011 Jul 26
0
How do you report lmer results?
Dear R-Gurus I am a PhD student from South Africa working on chimpanzee behaviour. I am looking at patterns of shade utilization and am using generalized linear mixed models to examine the effects of various factors on whether chimpanzees choose to spend time in the sun or shade. I realise that the lme4 package and the outputs of the lmer functions have been discussed ad nauseum but I have been
2017 Jun 06
4
integrating 2 lists and a data frame in R
Dear Bert, thank you for your response. here it is the piece of R code : given 3 data frames below --- N <- data.frame(N=c("n1","n2","n3","n4")) M <- data.frame(M=c("m1","m2","m3","m4","m5")) C <- data.frame(n=c("n1","n2","n3"),
2017 Jun 06
0
integrating 2 lists and a data frame in R
Reproducible example, please. -- In particular, what exactly does C look ilike? (You should know this by now). -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Jun 5, 2017 at 6:45 PM, Bogdan Tanasa <tanasa at gmail.com>
2017 Jun 06
2
integrating 2 lists and a data frame in R
Dear all, please could you advise on the R code I could use in order to do the following operation : a. -- I have 2 lists of "genome coordinates" : a list is composed by numbers that represent genome coordinates; let's say list N : n1 n2 n3 n4 and a list M: m1 m2 m3 m4 m5 2 -- and a data frame C, where for some pairs of coordinates (n,m) from the lists above, we have a
2007 Nov 14
1
Name collisions
I am receiving a list of name collisions when I launch R as seen below. I'm new to R and any suggestion or help with how I can go about getting rid of these collisions would be greatly appreciated. % R R version 2.5.1 (2007-06-27) Copyright (C) 2007 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to
2009 Apr 22
4
read.table or read.csv without row index?
Hello all, Probably my concepts about the data.frame and matrix and array in R are not clear, I need some clarification to help me understand them better. >M <- read.table("test1.csv",sep=",",row.names=NULL,header=T) gives me: M as M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 1 9 11 14 15 18 20 20 20 20 20 2 3 4 8 9 11 12 14 15 15 15 3 4 5 8 8 9 9 9 9 9 9 4 4
2005 Sep 05
2
model comparison and Wald-tests (e.g. in lmer)
Dear expeRts, there is obviously a general trend to use model comparisons, LRT and AIC instead of Wald-test-based significance, at least in the R community. I personally like this approach. And, when using LME's, it seems to be the preferred way (concluded from postings of Brian Ripley and Douglas Bates' article in R-News 5(2005)1), esp. because of problems with the d.f. approximation.
2005 Oct 05
1
Analyses of covariation with lme() or lm()
Hello all! I have a problem that calls for a better understanding, than mine, of how lme() uses the random part of the call. The dataset consists of eleven field trials (Trial) with three replicates (Block) and four fertiliser treatments (Treat). Analysing for example yield with lme() is easy: m1 <- lme(Yield ~ Treat, data=data, random =~1| Trial/Block) giving estimates of
2010 Jun 08
0
GMM: "The covariance matrix of the coefficients is singular"
Hi All, I'm trying to estimate some parameters in my model via GMM using the function gmm(), but I keep getting the message "The covariance matrix of the coefficients is singular". I've changed the moment conditions and the initial value of the parameters, and I still get this message. Are the results valid after receiving this message? Any ideas on how to get rid of it?