similar to: memory in R

Displaying 20 results from an estimated 20000 matches similar to: "memory in R"

2006 Nov 22
1
question about the "solve" function in library "Matrix"
Hi: I have some problems when I use the function "solve" function in a loop. In the following code, I have a diagonal martix "ttt" whose elements change in every iteration in a loop. I defined a "dpoMatrix"class before the loop so I do not need to define this class every time in the loop. The reason is to save some computing time. The code is below. The inverse
2006 Jul 01
1
polynomial expansion in R
Hi: I have two vectors of data, x and y and I want to get the "polynomial" expansion of (x+y)^p with any integer power p in R. Suppose p=2, then I want a matrix of five vectors, namely, x y x^2 y^2 x*y. The coefficient of the polynomial is not needed. I can write it manully if p is small. But I want it in the case of p=10 or even bigger, is there any function in R can do that
2005 Mar 09
3
from long/lat to UTM
Hi: Is there any function in R which can convert the long/lat to UTM(Universal Transverse Mercator)? There are quite a few converters on Internet. However, the interface is designed as input->output which I can not convert lots of locations at the same time. Another question is whether there is a function in R which can tell the time zone from the location's lat/long? Thank you!
2005 Jul 08
2
time series regression
Hi: I have two time series y(t) and x(t). I want to regress Y on X. Because Y is a time series and may have autocorrelation such as AR(p), so it is not efficient to use OLS directly. The model I am trying to fit is like Y(t)=beta0+beta1*X(t)+rho*Y(t-1)+e(t) e(t) is iid normal random error. Anybody know whether there is a function in R can fit such models? The function can also let me specify
2007 Feb 05
2
"lme" in R and Splus-7
Hi: I used the function "lme" in R and Splus-7. With the same dataset and same argument for the function, I got quite different estimation results from these two software. Anyone has this experience before? zhong --------------------------------- Get your own web address. [[alternative HTML version deleted]]
2008 Jun 08
3
how to important a date file into R
Hi: I have a data file in the following format. The first three digits stand for the ID of a respondent such as 402, 403. Different respondents may have the same ID. Followed the ID are 298 single digit number ranging from 1 to 5. My question is how to read this data file into R. I tried "scan" and "read" but they do not work because the numbers in the file are not
2006 Nov 06
1
question about function "gls" in library "nlme"
Hi: The gls function I used in my code is the following fm<-gls(y~x,correlation=corARMA(p=2) ) My question is how to extact the AR(2) parameters from "fm". The object "fm" is the following. How can I extract the correlation parameters Phi1 and Phi2 from "fm"? These two parametrs is not in the "coef" componenet of "fm". Thanks a
2005 Aug 11
1
include C functions from nmath in my own C functions
Hi: I followed the README in src/nmath/standalone/ to make the use the command "make shared" to make the libRmath.so file. I also add the directories containg libRmath.so to LD_LIBRARY_PATH by using command "export D_LIBRARY_PATH=$LD_LIBRARY_PATH:$/home/zhliu/Backup/R-2.0.1/src/nmath/standalon e " However, when I try to run the following codes by the command
2004 Oct 10
1
Modified Bessel function (third kind)
Hi: There is a Modified Bessel function (third kind, real order) besselK in R. Is there a C version of this function? I can only find a Fortran function rkbesel on http://www.netlib.org/specfun/. However, this rkbesel fortran function is the second kind. Thank you! liu _______________________________ Declare Yourself - Register online to vote today!
2005 Mar 23
1
Confirmatory Factor Analysis in Non-Normal case
Hi: I am doing a confirmatory factor analysis now. In the analysis, I have null hypothesis test which specify some special structure for the loading matrix. And the alternative is there is no such special structure. Then the log likelihood ratio test can be used. The problem I have is my data comes from a questionnaire and all the variables are discrete from 1 to 7, which makes the normality
2005 Jul 04
1
question about boxplot axis
Hi: I have a question making side by side boxplot. My response is numeric and I want to make a side by side boxplot of it accroding to a factor vector. So, there are several boxplots on the same plot. Each boxplot is with respect to one level for a factor. The levels of the factor are some characters. When I make the plot, the boxplots are arranged according to the alphabetic order of the
2005 Sep 23
4
books about MCMC to use MCMC R packages?
Dear list users, I need to learn about MCMC methods, and since there are several packages in R that deal with this subject, I want to use them. I want to buy a book (or more than one, if necessary) that satisfies the following requirements: - it teaches well MCMC methods; - it is easy to implement numerically the ideas of the book, and notation and concepts are similar to the corresponding R
2005 Feb 22
1
include C functions from nmath in my own C functions
Hi: I am writing a C program which need a gamma random number generator. I download the source file of R and compile, make it myself. There is a "rgamma.c" function in the installing directory of R("/home/zhliu/Backup/R-2.0.1/src/nmath/rgamma.c"). My question is how to call this function in my own program which is in another directory. I can not copy this "rgamma.c"
2012 Dec 13
4
Running MCMC in R
Dear all I am now running a MCMC iteration in the R program. But it is always stucked in some loop. This cause big problems for my research. So I want to know whether we can skip the current dataset and move to next simulated data when the iteration is stucked? Alternatively, can the MCMC chain skip the current iteration when it is stucked and automatically to start another chain with different
2005 May 27
1
images and maps in R
Hi: I have a question arising from my project. A sample of the data is below. The first row stands for the names of state in USA. The second row stand for some numeric value in that state. Some of them are NA. I can use the commands "data(stateMapEnv)" and "map('state', fill = F)" in library "maps" to make a plot of USA states. What I want to do is: 1.
2005 Jul 07
1
spurious regression in R
Hi: I am trying to do a spurious regression in R but I can not find the function. Anybody used it before? The problem I have is try to do a regression with several time series. An alternative is to use the GLS function to fit the linear regression with the correlation structure AR(3) for the response (or residual). I hope the residuals after the GLS regression will be independent judged by
2012 Dec 13
1
An important question about running MCMC
Dear officer I have a question concerning running R when I am doing my research. Can you help me to figure that out? I am now running a MCMC iteration in the R program. But it is always stucked in some loop. This cause big problems for my research. So I want to know whether we can skip the current dataset and move to next simulated data when the iteration is stucked? Alternatively, can the MCMC
2006 Mar 29
2
bivariate case in Local Polynomials regression
Hi: I am using the package "KernSmooth" to do the local polynomial regression. However, it seems the function "locpoly" can only deal with univariate covaraite. I wonder is there any kernel smoothing package in R can deal with bivariate covariates? I also checked the package "lcofit" in which function "lcofit" can indeed deal with bivariate case. The
2010 May 30
1
Building a list
Hello, I need to build a "list of lists" We have 20 groups we are generating MCMC samples for. There are 10 coefficients, and 10000 MCMC iterations. I would like to store each iteration by-group in a list. My problem is with the first iteration. Here is a toy example: Chain <- list() for (j in 1:10000){ coef <- c(1,2,3,4,5,6,7,8,9,10) #would be actual MCMC samples
2004 Feb 12
1
How do you create a "MCMC" object?
I have been running a Gibbs Sampler to estimate levels of efficiency in the Louisiana Shrimp Industry. I created a matrix (samp) where I stored the results of each iteration for 86 variables. I run 10,000 iterations. So, the matrix samp is 10,000 x 86. I want to use the gelman-rubin test to check for convergence. To do that, I need at least two chains. If I run second chain with different starting