search for: yfit2

Displaying 8 results from an estimated 8 matches for "yfit2".

Did you mean: fit2
2007 Aug 23
0
weighted nls and confidence intervals
...;- rnorm(x, x, .8) w1 <- rep(1, 10) w2 <- w1; w2[7:10] <- 0.01 * w2[7:10] rr1 <- nls(y ~ a*x + b, data = list(x = x, y = y), start = list(a = 1, b = 0), weights = w1) rr2 <- nls(y ~ a*x + b, data = list(x = x, y = y), start = list(a = 1, b = 0), weights = w2) yfit1 <- fitted(rr1) yfit2 <- fitted(rr2) se.fit1 <- sqrt(apply(rr1$m$gradient(), 1, function(x) sum(vcov(rr1)*outer(x,x)))) luconf1 <- yfit1 + outer(se.fit1, qnorm(c(probex, 1 - probex))) se.fit2 <- sqrt(apply(rr2$m$gradient(), 1, function(x) sum(vcov(rr2)*outer(x,x)))) luconf2 <- yfit2 + outer(se.fit2, qnor...
2007 Aug 31
0
non-linear fitting (nls) and confidence limits
...;- rnorm(x, x, .8) w1 <- rep(1, 10) w2 <- w1; w2[7:10] <- 0.01 * w2[7:10] rr1 <- nls(y ~ a*x + b, data = list(x = x, y = y), start = list(a = 1, b = 0), weights = w1) rr2 <- nls(y ~ a*x + b, data = list(x = x, y = y), start = list(a = 1, b = 0), weights = w2) yfit1 <- fitted(rr1) yfit2 <- fitted(rr2) se.fit1 <- sqrt(apply(rr1$m$gradient(), 1, function(x) sum(vcov(rr1)*outer(x,x)))) luconf1 <- yfit1 + outer(se.fit1, qnorm(c(probex, 1 - probex))) se.fit2 <- sqrt(apply(rr2$m$gradient(), 1, function(x) sum(vcov(rr2)*outer(x,x)))) luconf2 <- yfit2 + outer(se.fit2, qnor...
2007 Sep 25
0
non-linear fitting (nls) and confidence limits
...rnorm(x, x, .8) w1 <- rep(1, 10) w2 <- w1; w2[7:10] <- 0.01 * w2[7:10] res1 <- nls(y ~ a*x + b, data = list(x = x, y = y), start = list(a = 1, b = 0), weights = w1) res2 <- nls(y ~ a*x + b, data = list(x = x, y = y), start = list(a = 1, b = 0), weights = w2) yfit1 <- fitted(res1) yfit2 <- fitted(res2) se.fit1 <- sqrt(apply(res1$m$gradient(), 1, function(x) sum(vcov(res1)*outer(x,x)))) luconf1 <- yfit1 + outer(se.fit1, qnorm(c(probex, 1 - probex))) se.fit2 <- sqrt(apply(res2$m$gradient(), 1, function(x) sum(vcov(res2)*outer(x,x)))) luconf2 <- yfit2 + outer(se.fit2,...
2006 Jul 03
0
Questions concerning function 'svm' in e1071 package
...uot;linear") #Computation of the weight vector w = t(svclass$coefs) %*% svclass$SV if (y[1] == -1) { w = -w } #Derivation of predicted class lavels #Using method in documentation yfit = (x %*% t(w) + svclass$rho) > 0 yfit = factor(2*yfit - 1) #Extracting them directly from the model yfit2 = svclass$fitted #Display where predictions differ from each other yfit != yfit2 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
2010 Jan 18
5
errors appears in my time Series regression fomula
Dear all, I found really difficult with the time series questions, please help me with this monthly airline series! I have run the following r code, and there is an error appeared at the end. The data files was enclosed in the email. I'm sorry the errors message appeared in chinese, but it says "plot.xy(xy.coords(x, y), type = type, ...) : errors in argument has more than 3
2012 Jul 10
1
RGL 3D curvilinear shapes
Dear useRs, I'm trying to simply fill in the area under a curve using RGL. Here' the set up: x <- c(0.75,75.75,150.75,225.75,300.75,375.75,450.75,525.75,600.75,675.75, 0.5,50.5,100.5,150.5,200.5,250.5,300.5,350.5,400.5,450.5, 0.25,25.25,50.25,75.25,100.25,125.25,150.25,175.25,200.25,225.25) y <- c(0.05,4.91,9.78,14.64,19.51,24.38,29.24,34.11,38.97,43.84,
1999 Dec 09
1
nlm() problem or MLE problem?
...b<-.27 fn<-function(p) -sum( log(dweibull(rt,p[1],p[2])) ) cat("starting -log like=",fn(c(a,b)),"\n") out<-nlm(fn,p=c(a,b), hessian=TRUE) xfit<-seq(min(rt),max(rt),(max(rt)-min(rt))/100) yfit<-pweibull(xfit,out$estimate[1], out$estimate[2]) lines(xfit,yfit,lty=2) yfit2<-pweibull(xfit,a, b) lines(xfit,yfit2) list(out=out) } I got the starting values a=9, b=.27 from fitting the Weibull CDF by eye to a quantile plot of the data. The final values fitted by nlm() are a= 4.8299357, b= 0.2753897 I plotted both CDFs against the quantile plot of the data. I would hav...
2004 Aug 25
3
Beginners Question: Make nlm work
Hello, I'm new to this and am trying to teach myself some R by plotting biological data. The growth curve in question is supposed to be fitted to the Verhulst equation, which may be transcribed as follows: f(x)=a/(1+((a-0.008)/0.008)*exp(-(b*x))) - for a known population density (0.008) at t(0). I am trying to rework the example from "An Introduction to R" (p. 72) for my case and