turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Fitting Spatial covariance model - Proc Mixed

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-07-2013 05:44 PM

Dear All,

I am trying to fit various spatial covariance model such as spherical, exponential, gaussian, power, linear, linear log and other anisotropic structure using proc mixed. The spatial data has west longitude, latitude, and yield. I converted the spatial coordinates into easting and northing for efficient statistical analysis. Each time I run my SAS script for the entire data set which 12009 observations, I got insufficient memory despite running the script on system with 24 GB of RAM. I suspect the inability of REML algorithm to fit the 12009 x 12009 variance-covariance structure of R matrix of the residual term. Please see my script

** %spatialcov(var= cov=)**

** proc mixed**

** model &var=/ddfm=residual;**

** repeated/subject=intercept type=sp(&cov)(easting northing);**

** parms (25) (20);**

** run;**

** quit;**

%mend spatialcov;

%spatialcov(var=yield cov=sph)

%spatialcov(var=yield cov=exp)

%spatialcov(var=yield cov=gau)

%spatialcov(var=yield cov=pow)

%spatialcov(var=yield cov=lin)

%spatialcov(var=yield cov=linl)

I have to substract a constant 321000 and 5708000 from easting and northing respectively when I discovered that the values are extremely high to facilitate the computation but all effort in vain. Please could any one advise me on better approach? Does it mean PROC MIXED can not fit spatial model with a very large dataset? Could anyone suggest alternative approach or how to modify my SAS code? Look forward to reading from you.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-08-2013 02:53 PM

Can you take multiple random samples of your data, run PROC MIXED on each of these samples, and then summarize the results across the samples? If your sample were one-half the size of your original data set, the corresponding matrices would be only one-fourth the size as those from your original data set.

Or can you group observations near to one another and summarize/average their yields to reduce your sample size?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-10-2013 09:51 AM

You are probably running SAS 9.3. There is a 2 GB software memory limit in MIXED, not matter how much memory you have on your machine. Starting with SAS/STAT 12.1, this restriction has been eliminated.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-10-2013 12:52 PM

Dear lvm,

I appreciate your informative response to my request. I would like to ask if SAS/STAT 12.1 is available for use now. I have to think of alternative now that the usage of PROC MIXED is not feasible for my analysis. Could you please suggest any other approach? It is better I work with the entire data rather than subset.

My contact email is bakare@ualberta.ca

Let us keep in touch please.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-10-2013 12:59 PM

12.1 has been available for about a year. But, your installation may not have it yet -- it depends when your installation gets the updates. Note, SAS/STAT 12.1 runs with SAS/Base 9.There is a cost for the increased memory: programs may run an extremely long time to reach convergence.

I would suggest you consider sampling of your dataset.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-11-2013 08:01 AM

The OP may also want to look at PROC KRIGE2D. I think all (or almost all) of the spatial forms in the macro are available in that procedure. I have to admit that I have never used it, but looking through the documentation examples, it seems like a possible alternative.

Steve Denham