search for: zhliur

Displaying 17 results from an estimated 17 matches for "zhliur".

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
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]]
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
2004 Oct 11
2
memory in R
Hi: I am doing a MCMC algorithm which is well known to consume much computer memory. And I have a problem everytime I run my R program. It stopped at certain iteration and says "can not allocate a vector of 19 kb". It seems that the computer's memory has been exhausted. However, it is said that after each iteration the objects (such as a huge matrix) can be set to NULL. And the
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
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
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
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
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!
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 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"
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 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 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 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
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
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 LD_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.