[R] repeating autocovariate functions

David Winsemius dwinsemius at comcast.net
Sat Feb 2 03:41:56 CET 2013


The short answer is ... because it was from Nabble.

The longer answer is that the filters needed to be tightened on Nabble  
postings because of a an autobot spammer and the moderation queue was  
being swamped with cases.

If you send your questions as email (from your email client) to r-help at r-project.org 
  you should have fewer problems. (you might want to learn to post in  
plain text, too.)

-- 
David

On Feb 1, 2013, at 7:58 PM, rachel buxton wrote:

>
> Hi there,
>
> Just wondering why my post was rejected?
>
> cheers
> Rachel
>
> Subject: repeating autocovariate functions
> From: r-help-owner at r-project.org
> To: moyble at hotmail.com
> Date: Sat, 2 Feb 2013 02:56:27 +0100
>
> Message rejected by filter rule match
>
>
>
> --Forwarded Message Attachment--
> Date: Fri, 1 Feb 2013 17:56:14 -0800
> From: moyble at hotmail.com
> To: r-help at r-project.org
> Subject: repeating autocovariate functions
>
> Hi there,
>
> I would like to repeat an autocovariate term calculation using 30  
> different
> neighborhood sizes.  Then I would like to run a nominal logistic  
> regression
> on the generated autocovariate values and their respective  
> neighborhood
> sizes to see which would be most appropriate to use in the final  
> calculation
> of my autocovariate term.
>
> I have a matrix of x,y values:
> x	y
> 174.7173	-35.967
> 174.7166	-35.9649
> 174.7174	-35.968
> 174.7418	-35.9678
> 174.741	-35.9672
> 174.7395	-35.9671
> (and 150 more)
>
> To calculate the autocovariate terms my code is as follows:
> library(spdep)
> Taranga <- read.csv(file.choose()) #contains xy coordinates
> xy <- cbind(Taranga$x, Taranga$y)
> acinvb <- autocov_dist(Taranga$burrows.pa, xy, nbs=1,zero.policy =  
> TRUE,
> type="inverse")
> datfrm <- data.frame(autocov=acinvb, nbs=1)
> write.table(dfrm, file = 'results.csv',sep=",",row.names = FALSE)
>
> acinva <- autocov_dist(Taranga$burrows.pa, xy, nbs=100,zero.policy =  
> TRUE,
> type="inverse")
> dfrm <-data.frame(autocov=acinva, nbs=100)
> names(datfrm) <- NULL
> write.table(datfrm, file = 'results.csv',sep=",",append=TRUE,  
> row.names =
> FALSE, col.names=FALSE)
>
> I want to repeat this function, each time adding 100 to "nbs"
>
> Then I will run a model from the resulting "results.csv"
>
> thanks in advance for any insight!
>
> Rachel
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/repeating-autocovariate-functions-tp4657353.html
> Sent from the R help mailing list archive at Nabble.com.
>

David Winsemius, MD
Alameda, CA, USA



More information about the R-help mailing list