search for: zhat

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

Did you mean: that
1999 Nov 30
1
image stops detecting wrong sized z matrix (PR#352)
Full_Name: Albrecht Gebhardt Version: 0.90.0 OS: Linux + Tru64 Submission from: (NULL) (143.205.61.72) This is where example(krige) from library(sgeostat) stops with R 0.90.0: krige> image(grid$x, grid$y, grid$krige$zhat, add = T) Error in length(x) == nrow(z) : comparison (1) is possible only for vector types in previous versions of R the above image() call worked, because image() did the transformation grid$krige$zhat -> matrix(grid$krige$zhat,length(grid$x),length(grid$x)) iself. (BTW, contour() didn...
2012 Nov 16
2
R-Square in WLS
...;- sum(Weights*(To)^2) # log SST lgSSE <- sum(Weights*(Er)^2) # log SSE lgSSR <- sum(Weights*(Re)^2) # log SSR lgR-sq <- lgSSR/lgSST ############################### Z Scale ###################################### Z <- exp(Y) muZ <- mean(Z) Zhat <- exp(Yhat+0.5*Sigma2) ToZ <- Z-muZ ErZ <- Z - Zhat ReZ <- Zhat - muZ SST <- sum(Weights*(ToZ)^2) # SST SSE <- sum(Weights*(ErZ)^2) # SSE SSR <- sum(Weights*(ReZ)^2) # SSR Rsq <- SSR/SST I don't understand what is wrong with the code. The s...
2003 Jun 17
0
plot.formula
...be protected by I() to prevent the summands in the expression being plotted separately. - you can't replace one of the response variables by a constant, as this will be evaluated as a vector of length 1. It's a lot easier with cbind() , for example plot(cbind(z1 -zhat + bias, 0) ~ x) gets you a plot of (z1-zhat+bias) versus x together with a horizontal line at y=0. The idea of using cbind() was indeed modelled on the glm() usage. ---- Adrian Baddeley, Mathematics & Statistics, University of Western Australia <http://maths.uwa.edu.au/~adrian/>
2013 Feb 05
1
R -HELP REQUEST
Good morning to you all, Sorry for taking your time from your research and teaching schedules.   If you have a non-stationary univariate time Series data that has the transformation: Say; l.dat<-log (series) d.ldat<-diff (l.dat, differences=1) and you fit say arima model. predit.arima<-predict (fit.series, n.ahead=10, xregnew= (n+1) :( n+10)) How could I re-transform
1999 Nov 24
0
problem with multiple figure postscript file
...mfcol=c(2,2)) par(mfg=c(1,1,2,2)) par(mai=c(0.5, 0.5, 0.5, 0.5)) plot(croche.day.epi.grid$xy, type="n", xlim=c(0,100), ylim=c(0,200), xlab="", ylab="") image(croche.day.epi.grid$x, croche.day.epi.grid$y, matrix(croche.day.epi.grid$krige$zhat, length(croche.day.epi.grid$x), length(croche.day.epi.grid$y)), add=T, col=grays) contour(croche.day.epi.grid$x, croche.day.epi.grid$y, matrix(croche.day.epi.grid$krige$zhat, length(croche.day.epi.grid$x), length(croche.day.epi.grid$y)), add=T) par(mfg=c(2,1,2...
2002 Apr 24
3
nonlinear least squares, multiresponse
I'm trying to fit a model to solve a biological problem. There are multiple independent variables, and also there are multiple responses. Each response is a function of all the independent variables, plus a set of parameters. All the responses depend on the same variables and parameters - just the form of the function changes to define each seperate response. Any ideas how I can fit
2012 Jul 17
1
Threshold Quantile Regression code CRASHES in R
...ind(matrix(1,n,1),q) for(i in 1:reps){ e <- matrix(rnorm(n*2,quantile(rnorm(n),tau),1),n,2)%*%chol(sig) z1=0.5+0.5*x*(q<=0)+1*x*(q>0)+e[,2] y=0.5+1*z1*(q<=1)+1.5*z1*(q>1)+1*z2[,2]+e[,1] out1 <- joint_thresh(y=z1,x=x,q=q) z1hat<- out1$yhat rhohat[i] <- out1$qhat zhat <- cbind(z1hat,z2)out2 <- joint_thresh_2(y=y,x=zhat,q=q) qhat[i] <- out2$qhat } #Close for loop. list(rhohat=rhohat,qhat=qhat) } #************************************************************#You can easily run it yourselves. The problem is that when i write, stqr_thresh_loop(n=200,reps=5...
2011 Sep 02
5
Hessian Matrix Issue
...1)*(d-1))/mu) #print(aa[j]) } a[i]<-sum(aa) #print(a[i]) } a arg3<-sum(a) llh<-arg1+arg2+arg3 if(! is.finite(llh)) llh<-1e+20 -llh } ac<-optim(NegBin,par=c(xbar,dbar),method="L-BFGS-B",hessian=TRUE,lower= c(0,1) ) ac print(ac$hessian) muhat<-ac$par[1] dhat<-ac$par[2] zhat<- 1+(log(dhat)/(1-dhat)) infor<-solve(ac$hessian) var.dhat<-infor[2,2] se.dhat<-sqrt(var.dhat) var.muhat<-infor[1,1] se.muhat<-sqrt(var.muhat) var.func<-dhat*muhat var.func d.prime<-cbind(dhat,muhat) se.var.func<-d.prime%*%infor%*%t(d.prime) se.var.func lower.d[i]<-dh...