search for: yvec

Displaying 12 results from an estimated 12 matches for "yvec".

Did you mean: vec
2007 Sep 25
2
Need help with function writing
...or your assistance. Using a 3-level input factor alternative so that a function(below) can compute both a two-sided and one-sided p-values. Making the two-sided test the default. And produce output information about which alternative was tested. Where would I place the ifelse statement? function(yvec,trtvec,alpha=0.05,header="") { ################################################# # A function to compute a two-sample t-test and confidence # interval (equal-variance, independent samples). yvec is # a numeric vector containing both samples' data. trtvec # is a vector, same lengt...
2007 Sep 04
3
how to do interpolation
Hello R Users, How to make a variable equidistance with time i.e. how to interpolate a variable if it is not sampled at equal time interval. Many thanks, Regards, Yogesh [[alternative HTML version deleted]]
2007 Sep 24
1
hypothesis testing
...cause she said it keeps getting bounced when she sends it. #======================================================================= ==================================================================== I am a bit confused with this. If possible do you think you can help me with this? function(yvec,trtvec,alpha=0.05,header="") { ################################################# # A function to compute a two-sample t-test and confidence # interval (equal-variance, independent samples). yvec is # a numeric vector containing both samples' data. trtvec # is a vector, same length a...
1999 Nov 17
3
Plot problem !
Hello, Is there a simple way to make a plot with xy coordinates and a z value which determines the size and the color of point on the plot? Thanks for your help ! Emilie -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe"
2011 May 02
2
easy way to do a 2-D fit to an array of data?
...s there an R function that lets me easily implement that? I've started down the path of something like zvec <- as.vector(Z), and creating applicable x,y vectors by something like (where for the sake of argument Z is 128x128) foo<-matrix(seq(1,128),128,128) xvec <- as.vector(foo) yvec <- as.vector(t(foo)) at which point I can feed zvec, xvec, yvec to lm() . I'm hopeful someone can point me to a much easier way to do the same thing. Oh, and if there's a 2-D splinefunction generator, that would work for me as well. thanks Carl
2006 Oct 27
2
Multivariate regression
...aking into consideration the covariance structure of Y within each unit - this would be represented by a specified matrix V (k x k), assumed to be the same across units. How do I use "lm" to do this? One approach that I was thinking of is as follows: Flatten Y to a vector, say, Yvec (n*k x 1). Create Xvec (n*k, p*k) such that it is made up of block matrices Bij (k x k), where Bij is a diagonal matrix with X_ij as the diagonal (i = 1,.n, and j = 1,.,p). Now I can use "lm" in a univariate mode to regress Yvec against Xvec, with covariance matrix Vvec (n*k x n*k). Vv...
2007 Feb 27
1
Additional args to fun in integrate() not found?
...e problems: 1) why is "p" not recognized? 2) what are these warning messages? PROGRAM CODE: --------------------------- #THIS LIBRARY IS NEEDED FOR THE INCOMPLETE GAMMA FUNCTION library(zipfR) #------------------------------------------------------------------------ gedCDF = function(yvec, p=2, mu=0, scale=1, numint=0) { #------------------------------------------------------------------------- #Setting k to sqrt(2) and the GED with p=2 coincides with standard normal. #Set k=1 and GED with p=1 coincides with Laplace. k<-sqrt(2) #k<-1 scale<-scale*k zvec<-(yvec-mu...
2005 Jul 08
1
help with ARIMA and predict
...with autoregressive terms and additional x variables: y(t+1)=const+B(L)*y(t)+C(1)*x_1(t)...+C(K)*x_K(t) where: B(L) = lag polynom. for AR terms C(1..K) = are the coeffs. on K exogenous variables that have only 1 lag Question 1: ----------- Suppose I use arima to fit the model: df.y<-arima(yvec,order=c(L,0,0),xreg=xmat[,(1:K)],n.cond=maximum.lag) Now suppose I want to do a 1-period ahead prediction based on the results of this regression, using predict: predict(df.y,newxreg=newx,n.ahead=1) I'm expecting newx to be 1X3. After all, I just want to predict 1 value of y, so in my min...
2012 Feb 09
2
Lattice 3d coordinate transformation
...lines)) { ll <- clines[[i]] ll0 <- clines[[i-1]] m <- ltransform3dto3d(rbind(ll$x-.5, ll$y-.5, zlim.scaled[1]), rot.mat, distance) m0 <- ltransform3dto3d(rbind(ll0$x-.5, ll0$y-.5, zlim.scaled[1]), rot.mat, distance) xvec <- c(m0[1,],m[1,ncol(m):1]) yvec <- c(m0[2,],m[2,ncol(m):1]) panel.polygon(xvec,yvec,col=colreg[ll$level],border='transparent') panel.lines(m[1,], m[2,], col = add.line$col, lty = add.line$lty, lwd = add.line$lwd) } panel.3dscatter(x, y, z, rot.mat, distance, zlim.scaled = zlim.scal...
2012 Jun 09
0
-lgsl -lgslcblas fatal error no such file or directory
...SL_test2/lib/ GSL_INC, value c:/R/GSL_test2/inc/ The source C code is #include <stdio.h> #include <math.h> #include <stdlib.h> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #include <R.h> void gibbsGSL(int *Np,int *thinp,int *seedp,double *xvec,double *yvec) { int i,j; int N=*Np,thin=*thinp,seed=*seedp; gsl_rng *r = gsl_rng_alloc(gsl_rng_mt19937); gsl_rng_set(r,seed); double x=0; double y=0; for (i=0;i<N;i++) { for (j=0;j<thin;j++) { x=gsl_ran_gamma(r,3.0,1.0/(y*y+4)); y=1.0/(x+1)+gsl_r...
2012 Jun 16
0
R CMD -lgsl -lgslcblas *.c returns a fatal error: gsl/gsl_rng.h no such file or directory exists
...b/ GSL_INC, value c:/R/GSL_test2/inc/ The failing C source code is #include <stdio.h> #include <math.h> #include <stdlib.h> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #include <R.h> void gibbsGSL(int *Np,int *thinp,int *seedp,double *xvec,double *yvec) { int i,j; int N=*Np,thin=*thinp,seed=*seedp; gsl_rng *r = gsl_rng_alloc(gsl_rng_mt19937); gsl_rng_set(r,seed); double x=0; double y=0; for (i=0;i<N;i++) { for (j=0;j<thin;j++) { x=gsl_ran_gamma(r,3.0,1.0/(y*y+4)); y=1.0/(...
2012 Dec 09
1
Error message "cs_lu(A) failed: near-singular A (or out of memory)"
...e., that the รข1 in all equations is the same value, and the same for all the other coefficients). When I try to run the model without the restricting equations (C2, C3) it runs just fine, but when I add these two equations I get the error: "Error in solve(xtOmegaInv %*% xMat2, xtOmegaInv %*% yVec, tol = solvetol) : cs_lu(A) failed: near-singular A (or out of memory)" Any ideas on what the problem might be? All the best, Rui Neiva P.S.: I've also posted this question on the Matrix help forum, but since I do not know how active that forum is I've decided to see if anyone in...