[R] Problem of Running Simulations for Monte Carlo Spatial Segregation Test using Spatialkernel Package

2006-12-08 Thread Wei Zhang
Hello,

When I used spseg function in the spatialkernel package to run Monte
Carlo spatial segregation test, R would not let me run more than 50
simulations. That is, I tried to run the following code,

sp - spseg(pts, bin, hcv, opt=3, ntest=1000, poly=polyb)

where pts was a 116*2 matrix containing lat/long; bin was a vector
containing categorical types with length of 116; hcv was the selected
bandwidth; polyb was a 4*2 matrix which would form a rectangle. But R
immediately gave an error message cannot locate vector of size. I used
gc() but it would not help. I could only make it work when ntest=50 or
less.

Any suggestion is appreciated.

Wei Zhang

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] basis and penalty matrices for natural cubic splines

2005-12-16 Thread Wei Zhang
Hi,
I am trying to get the basis matrix and penalty matrix
for natural cubic splines. I found R function ns can
generate the B-spline basis matrix for a natural cubic
spline; and  bsplinepen  
can compute the penalty matrix for functions expressed
in terms of a B-spline basis. However, these two
functions seem not compatible. I could not get the
penalty matrix by bsplinepen using the basis matrix
generated from ns.
Anyone knows any compatible functions to give the
basis
matrix and penalty matrix for natural cubic splines? 
Thanks a lot!
Wei

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html