[R] Markov chain transition model, data replication project

2011-02-24 Thread Eric R. Schmidt
Hello all, I am currently attempting to replicate data from a political science article that utilized a Markov chain transition model to predict voter turnout intention at time *t*; the data was separated into two different models based on whether prior intent was to vote or not to vote. The deta

Re: [R] WISP-survey part of created area?

2009-07-21 Thread Eric R.
Anja: Unfortunately, WiSP does not offer a spatially-explicit way to specify capture probabilities for the designated study region. Although the members of the population are assigned spatial coordinates within the study region, there is no specification of where the 'captures' take place within

Re: [R] Calculating home ranges using mcp in adehabitat

2009-06-26 Thread Eric R.
Tom: The structure of your dataframe (mydata) differs from the structure of the example dataframe (puechabon) in that the example dataframe has the structure 'locs' in which resides the x,y data and the individual identifier. The clue to your difficulty could be found when you asked to see the o

Re: [R] Sweave and \Sexpr{}

2009-02-05 Thread Eric R.
Felipe: See Leisch's FAQ A18. http://www.statistik.lmu.de/~leisch/Sweave/FAQ.html#x1-2A.18 You likely have R2HTML loaded (likely because you are using Tinn-R) and that causes some difficulties for Sweave that are easily solved as described in the FAQ. Felipe Carrillo wrote: > > Hi: >

Re: [R] Can a dynamic graphic produced by rgl be saved?

2008-01-06 Thread Eric R.
?rgl.snapshot Michael Kubovy wrote: > > Dear r-helpers, > > Can one save a dynamic graphic produced by rgl, e.g.: > open3d(); x <- sort(rnorm(1000)); y <- rnorm(1000); z <- > rnorm(1000) + atan2(x,y); plot3d(x, y, z, col=rainbow(1000), size=2) > as a dynamic figure that can be embedd

Re: [R] a very easy question, how to extract the name of the response variable

2007-11-13 Thread Eric R.
This may not be the smoothest way to produce the result, but here is a two-step solution: first find the formula within the object created by the call to glm(): form <- qq["formula"] or equivalently form <- qq$formula then apply the function all.vars() to the result, and return the first elemen

Re: [R] drawing direction fields

2007-11-01 Thread Eric R.
Jong-Hoon: If a direction field is the equivalent of a phase plane diagram, then you can use a function written by Daniel Kaplan, Macalester College. You can find the function in his online notes for an applied calculus course: http://www.macalester.edu/~kaplan/math135/index.html Jong-Hoon K

Re: [R] Export Step Function Coefficients to Spreadsheet or Text File

2007-09-13 Thread Eric R
Thanks, this works great! --Eric D L McArthur wrote: > > Eric R juno.com> writes: >>... I want to export the coefficients to a spreadsheet > > names(w) > write.csv (w$coefficients, file=...) > > -- D L McArthur, UCLA S

[R] Export Step Function Coefficients to Spreadsheet or Text File

2007-09-13 Thread Eric R
Hello, After I use the lm() function to perform a multiple linear regression, and then use the step function to eliminate variables that predict the weakest, I need to export the final equation to a spreadsheet or a text file. Below is some sample code. In the end I want to export the coefficien