<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: GLIMMIX spatial autocorrelation, syntax in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169657#M43886</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Think about how many more covariance parameters you are now fitting simultaneously.&amp;nbsp; CPU time for this goes up on the order of n log n, I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Dec 2013 17:53:00 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2013-12-12T17:53:00Z</dc:date>
    <item>
      <title>GLIMMIX spatial autocorrelation, syntax</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169652#M43881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;First question I have posted, so please let me know if addition information is needed beyond that provided below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking at a dataset of fish density values, recorded over 3 years at 3 different locations.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;These density values are obtained during surveys that are composed of multiple transect lines at a single site&lt;/LI&gt;&lt;LI&gt;Transect "curtains" are further divided into grids (distance x depth), of which each cell is assigned a density and coordinate&lt;/LI&gt;&lt;LI&gt;Additional parameters (Bottom habitat, salinity, temperature, etc) are assigned to the cells&lt;/LI&gt;&lt;LI&gt;The density values have a very very skewed distribution (many small, few very large), hence the use of GLIMMIX to attempt to address this.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am interested in the effects of these "additional parameters" on density, though I cannot ignore the spatial nature of the data (fish group together, nearby cells will tend to have more similar densities).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I am assuming that spatial correlations would only exist within a single survey.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My model currently looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data=Data.BankPresent pconv =1e-5 maxopt=30;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class Site Habitat Season Survey;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; model Density= Relief DShallow MeanSalinity MeanTemp Site|Habitat|Season&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / dist=gamma link=log;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; random Survey / subject=intercept type=sp(exp) (Easting Northing);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I am unsure of where to put the spatial autocorrelation component [type=sp(exp) (Easting Northing)], or if this model is doing what I have attempted to describe above&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If needed/of interest, the variables included are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Relief: continuous, vertical relief of the seafloor below cell &lt;EM&gt;i&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;DShallow: continuous, distance from cell &lt;EM&gt;i&lt;/EM&gt; to the shallowest point at the site&lt;/LI&gt;&lt;LI&gt;MeanSalinity: continuous, salinity of cell &lt;EM&gt;i&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;MeanTemp: continuous, temperature of cell &lt;EM&gt;i&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;Site: categorical, site at which the survey was conducted (1,2,3)&lt;/LI&gt;&lt;LI&gt;Habitat: categorical, habitat classification of seafloor below cell &lt;EM&gt;i &lt;/EM&gt;(1,2,3,4,5)&lt;/LI&gt;&lt;LI&gt;Season: categorical, season in which the survey was conducted (1,2,3,4)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To reiterate, I want to run the above model with a consideration for spatial autocorrelation on a survey-by-survey basis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for any information you may be able to provide, applicable references, or questions of clarification.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 23:30:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169652#M43881</guid>
      <dc:creator>tdlang</dc:creator>
      <dc:date>2013-12-10T23:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX spatial autocorrelation, syntax</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169653#M43882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very close.&amp;nbsp; Rearrange the random statement to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;random intercept/subject=survey type=sp(exp)(easting northing);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I think you will be able to fit the model (of course, this supposes sufficient data...).&amp;nbsp; This does kind of depend on the easting, northing values being unique within survey.&amp;nbsp; If you have exact duplicates, you may need to specify the subject with greater detail (say survey(season), if the measurements were taken at exactly the same locations in each season).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you get that, you may want to consider that season induces autocorrelation, and so a second random term that addresses that may be worth a look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 16:11:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169653#M43882</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-12-11T16:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX spatial autocorrelation, syntax</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169654#M43883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Steve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I gave that a shot and it does run, however in the resulting "Covariance Parameter Estimates," the spatial term comes back with an estimate of 1.000 and no standard error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cov Parm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subject&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Estimate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standard Error&lt;/P&gt;&lt;P&gt;Variance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.1279&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.04371&lt;/P&gt;&lt;P&gt;SP(EXP)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.0000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;Residual&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.4454&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.06207&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This yields a model that is no different from one that was run without the type= option included.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could this be due to the easting/northing duplication you mentioned?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible that there is duplication of easting/northing pairs:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Within a Survey (since grid cells are in multiple layers, stacked cells would receive the same easting/northing)&lt;UL&gt;&lt;LI&gt;Can the type=sp option handle three dimensions? I think that would solve this problem.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Between surveys (since surveys were conducted in the same locations multiple times)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate the response very much, one step closer!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 17:57:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169654#M43883</guid>
      <dc:creator>tdlang</dc:creator>
      <dc:date>2013-12-11T17:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX spatial autocorrelation, syntax</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169655#M43884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would think the duplication may well be the problem--you are seeing perfect correlation within each survey, which may not be surprising if we are dealing with a marginal over all the fixed effects.&amp;nbsp; I have not seen three dimensional spatial covariances, and I don't think GLIMMIX allows them.&amp;nbsp; What might work is if you included layer in the model, and then would try subject=survey group=layer in the random statement.&amp;nbsp; That should fit separate 2 dimensional errors for each layer by survey combination.&amp;nbsp; Hopefully, your data are rich enough in both detail and N to fit such a model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 19:55:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169655#M43884</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-12-11T19:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX spatial autocorrelation, syntax</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169656#M43885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Steve.&lt;/P&gt;&lt;P&gt;I have given this a run as well, looks to increase computing time &lt;STRONG&gt;dramatically&lt;/STRONG&gt; so I am still waiting on output (11hrs and counting!) but I will report back once it finishes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From reading about the options again, this seems to make sense.&lt;/P&gt;&lt;P&gt;I appreciate your help putting these things in a context I can understand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 17:25:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169656#M43885</guid>
      <dc:creator>tdlang</dc:creator>
      <dc:date>2013-12-12T17:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX spatial autocorrelation, syntax</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169657#M43886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Think about how many more covariance parameters you are now fitting simultaneously.&amp;nbsp; CPU time for this goes up on the order of n log n, I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 17:53:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169657#M43886</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-12-12T17:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX spatial autocorrelation, syntax</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169658#M43887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not much progress here. Even after including the group=layer option, the sp(exp) term for each group is still 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I double checked that there are no duplicated coordinates within the Name*Layer combinations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for data richness in N, each Name*Layer combination has at least 1 observation (usually many, many more, dataset is 37,000 observations).&lt;/P&gt;&lt;P&gt;I can see how those groups with a single observation would cause a problem, but I would think that since I have tried to "partition" the calculations, the problem would be confined to only those groups with a single observation. I may be mistaken, as I don't know exactly how SAS is computing this giant covariance matrix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even when I restrict the analysis to those Name*Layer combinations with at least 3 observations, I have the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides this, I cannot think of anything else that might be causing the problem. I am open to suggestions and, as always, appreciative of your comments.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Dec 2013 22:28:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169658#M43887</guid>
      <dc:creator>tdlang</dc:creator>
      <dc:date>2013-12-16T22:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: GLIMMIX spatial autocorrelation, syntax</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169659#M43888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried other spatial autocorrelation types?&amp;nbsp; Anisotropic spatial power, maybe?&amp;nbsp; You might also want to look at Radial Smoothing Based on Mixed Models in the documentation for a multidimensional approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the part where I grasp at straws.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Dec 2013 20:04:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-spatial-autocorrelation-syntax/m-p/169659#M43888</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-12-17T20:04:52Z</dc:date>
    </item>
  </channel>
</rss>

