[R] Theil decomposition

2011-11-15 Thread Kitty Lee
I came across the package 'ineq' that computes a variety of inequality measures (e.g. gini, theil etc). I want to compute the Theil index (racial segregation) and decompose the total into sub-components (by geog levels). I think the package doesn't report the decomposition (correct me if I'm

[R] Change Variable Labels in Quantile Plot

2011-08-23 Thread Kitty Lee
Hi Roger, Maybe I'm missing a clue. Here's an example: x-rnorm(50) x1-rnorm(50) y-x+x1+rnorm(50) out-rq(y~x+x1, tau=1:9/10) plot(summary(out)) plot.out-plot(summary(out)) #I change the variable names dimnames(plot.out)-list(c(intercept, sex, inc)) #Look at the plot #it's ONE simple

[R] Change Variable Labels in Quantile Plot

2011-08-23 Thread Kitty Lee
Why not just change the names of the variables before invoking the call to rq, and its formula? Because I won't be able to do longer label e.g. 'Population Density Per Square Mile'. I actually found the solution by accident--- x-rnorm(50) x1-rnorm(50) y-x+x1+rnorm(50) out-rq(y~x+x1, tau=1:9/10)

[R] Change Variable Labels in Quantile Plot

2011-08-22 Thread Kitty Lee
I have spent hours on this ---looked through the quantreg manual and r-help site--- still couldn't figure out the answer. Can someone please help me on this? I plot the result from quantile regression and want to change the variable labels: temp-rq(dep~inc+age50, data=newdata, tau=1:9/10)

[R] Matplot Polygon

2011-08-02 Thread Kitty Lee
I used matplot to plot multiple lines (over 300 lines). I'd like to draw a polygon and shade the area between upper and lower boundary. I know the plot function works pretty well with polygon(). How about matplot? I have too many lines and my upper/lower boundaries are formed by many different

Re: [R] Plotting problems directional or rose plots

2011-08-01 Thread kitty
= label.pos, radlab = radlab, : could not find function boxed.labels I have also tried Rose plots in the (heR.Misc) library to to avail. Sorry, does anyone know how to get the plots I need? Thank you all for reading this and for your help k. On Tue, Jul 26, 2011 at 10:20 PM, kitty kitty.a1

[R] Plotting problems directional or rose plots

2011-07-26 Thread kitty
Hi, I'm trying to get a plot that looks somewhat like the attached image (sketched in word). I think I need somthing called a rose diagram? but I can't get it to do what I want. I'm happy to use any library. Essentially, I want a circle with degree slices every 10 degrees with 0 at the top

[R] Deriving formula with deriv

2011-04-04 Thread kitty
of '.Internal' being evaluated was: (expr, namevec, function.arg, tag, hessian) Why is this not working and how do I get the second derivative? Thank you for reading my post, all help is appreciated, Kitty [[alternative HTML version deleted

[R] grofit package

2011-03-26 Thread kitty
Does anyone know if it is possible to get the length of the log phase (the main growth phase) from a grofit logistic model? I can get the lag phase length, maximum growth and max rate of growth, but I also want to know the length of the log phase (ie, for how long do the bacteria grow

[R] vegan CCA I am Completely new to ordination analyses

2011-03-10 Thread kitty
used is below. Does the output look right? why am I getting a 0 output? Is there something wrong with my data, data format, r code etc? All help is greatly appreciated, Thank you in advance, Kitty #R code data-read.table(y:directory

[R] corspatial

2009-07-09 Thread Kitty Lee
Hi. I have a dataset of unique coordinates (no missing coordinates). When I did the following: lonlat-mydata[, c(lon, lat)] sp1-corSpatial(1,form=~lon+lat,type=g) scor-Initialize(sp1, lonlat , nugget=FALSE) I got a value for sp1 (2.67). But got an error message for scor--Error in

[R] predict.glm predicted prob above 1?

2009-03-09 Thread Kitty Lee
I have a puzzle When I include an interaction in the model, many predicted probabilities are above 1. Is that a problem with my model? I thought the predicted prob can't be bigger than 1... Any help would be really appreciated! Thanks! K.

[R] Plot link points

2009-01-10 Thread Kitty Lee
Hi. This may be a straight-forward question... I have a time series from 1950 to 2000 (by year) with missing values. Sometimes only a year has value and the adjacent years have missing data, e.g. 1950 2.7 1951 1952 1953 3.4 1954 1955 1956 2.9 1957 3.6 1958 2.7 When I use plot (type='l'),

[R] Levelplot + Mosaic Plot hybrid?

2008-11-17 Thread Kitty Lee
Hi. I have built a levelplot with 3 variables, X, Y, and Z where X and Y are the two axes and Z represents the intensity (i.e. Z~X*Y). Now I want to adjust the size of the grid (like a mosaic plot) where the size of each grid is weighted by a variable, W. Just wonder how can I do that with

[R] are these the same?

2008-09-16 Thread Kitty Lee
Dear members, I was trying to simulate W which is iid and depends on X and Y. Here are 2 methods: Method 1: x-rnorm(100) y-rnorm(100) w-rnorm(100, 2x+y,1) Method 2: x-rnorm(100) y-rnorm(100) w-2x+y+rnorm(100,0,1) Are these methods comparable? Since x and y are vectors, the term 2x+y

[R] Installing R on BSD

2008-01-08 Thread Kitty Lee
Dear users, I try to follow the instruction on this page to install R on 4.4BSD network. http://cran.r-project.org/doc/manuals/R-admin.html#Using-make I can unpack the file but the system can't recognize the command: ./configure make Any ideas what should be the right command? Thanks!!

[R] Invoking R on BSD

2008-01-08 Thread Kitty Lee
Thanks to Saeed Abu Nimeh. I used pkg_add to install R package on 4.4BSD. My directory now has the following: BUILDDIRMakefrag.cc_lo config.log m4 tests MakeconfMakefrag.cxxconfig.status po tools MakefileR-2.6.1 doc

[R] Dual Core vs Quad Core

2007-12-17 Thread Kitty Lee
Dear R-users, I use R to run spatial stuff and it takes up a lot of ram. Runs can take hours or days. I am thinking of getting a new desktop. Can R take advantage of the dual-core system? I have a dual-core computer at work. But it seems that right now R is using only one processor. The new