Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: spatial weights which also take into account time
From
"Ben Hoen" <[email protected]>
To
<[email protected]>
Subject
RE: st: spatial weights which also take into account time
Date
Thu, 31 Jan 2013 13:08:55 -0500
Thanks Nick,
Though, I am not sure think I understand. Are suggesting calculating a knn
weights matrix and interacting it with some expression that would limit the
data based on time? Would this account for the fact that each interaction
is based on the target case's "time" (i.e., only those nn that transacted
within the previous 1 year from the target cases date) and therefore would
be a "moving window" of time for each transaction?
I expect that I am missing some significant aspect of your response b/c of
my limited understanding of how to employ weights.
Ben
Ben Hoen
LBNL
Office: 845-758-1896
Cell: 718-812-7589
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: Thursday, January 31, 2013 12:05 PM
To: [email protected]
Subject: Re: st: spatial weights which also take into account time
A very general answer is
1. Many programs support weights of various kinds.
2. If you want your weights to depend on several variables, that's
often fine: you just have to compute them.
3. The syntax is typically [<weighttype> = <exp>] so that the <exp>
can depend on several variables. Often it would be a product or a
dividend.
4. The general syntax (literally -syntax-) for checking weights and
the specific ways that weights are handled within a program should be
considered separate matters. (At the worst end, I've seen user
programs support specification of weights but then ignore them, it
being supposed by novice programmers that it's sufficient to allow
weights via a -syntax- statement.)
All that said, your specific problem sounds like a case for using an
-if- restriction, not more complicated weights, but I can't comment
authoritatively on -spwmatrix-.
Nick
On Thu, Jan 31, 2013 at 4:51 PM, Ben Hoen <[email protected]> wrote:
> I have been unsuccessful in my search this morning for a way to deal with
> both space and time (or for that matter any other variable other than
space)
> in developing a spatial weights matrix. ALERT: I am a novice - slowly
> learning - about spatial models.
>
> The k nearest neighbors options in some user written programs (e.g.,
> spwmatrix - SSC) allows me to limit the number of neighbors based on
> "nearness". Alternatively I could use some cutoff distance (e.g., 1 mile)
> to limit the collection of "neighbors". But in addition to distance I
would
> like to use time to limit my data. For example I have home transactions
> that I want to test for spatial autocorrelation between. I concern myself
> with BOTH the k (e.g., 5) nearest neighbors that ALSO transacted within
the
> previous year. (I.e., using a transaction that occurred, for example, 10
> years later does not make sense, even if it is "nearest".)
>
> Are there any ideas out there for how to limit the data based on both
space
> AND time in developing the weights matrix?
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/