Displaying 20 results from an estimated 7000 matches similar to: "Splitting variables"
2007 Oct 19
1
plot.Design
Dear R-users:
I am trying to use the following code to reproduce the figures on page 140
of Prof. Frank Harrell's book 'Regression Modeling Strategies':
rm(list=ls())
options(width=128)
library(Hmisc)
library(Design)
getHdata(counties)
counties$older <- counties$age6574 + counties$age75
label(counties$older) <- '% age >= 65, 1990'
counties$pdensity <-
2007 Sep 27
1
R: anova.Design
Dear All:
I tried to replicate a case study described by Prof. Harrell in Chapter 7 of
his Regression Modeling Strategies book, but failed on using anova.Design to
reproduce his table 7.1, Following is the code:
rm(list=ls())
library(Hmisc)
library(Design)
getHdata(counties)
counties$older <- counties$age6574 + counties$age75
label(counties$older) <- '% age >= 65, 1990'
2011 May 17
2
can not use plot.Predict {rms} reproduce figure 7.8 from Regression Modeling Strategies (http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/course2.pdf)
Dear R-users,
I am using R 2.13.0 and rms 3.3-0 , but can not reproduce figure 7.8 of the
handouts *Regression Modeling Strategies* (
http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/course2.pdf) by the
following code. Could any one help me figure out how to solve this?
setwd('C:/Rharrell')
require(rms)
load('data/counties.sav')
older <- counties$age6574 + counties$age75
2007 Jan 31
2
mca-graphics: all elements overlapping in the help-example for multiple correspondence analysis
Dear all,
I tried out the example in the help document for mca (the multiple correspondence analysis of the MASS package):
farms.mca <- mca(farms, abbrev=TRUE)
farms.mca
plot(farms.mca)
But the graphic that I get seems unfeasible to me: I cannot recognize the numbers (printed in black) because they are all overlapping and concealing each other. I don ?t dare using my own data, which
2006 Aug 10
6
passing hash from controller to view and pluralization?
hi,
i have 2 tables (counties and towns). counties has_many towns and towns
belong_to counties.
now my question:
i thought i would need to do is say @counties = Counties.find(:all).
should that not return to me all counties in the counties table WITH all
towns associated with each county?
in my view i was getting error when doing this
if(counties.has_towns?)
saying undefined has_towns
2012 Jan 13
1
Coloring counties on a full US map based on a certain criterion
Dear Rers,
is there a way to color counties on a full US map based on a criterion
one establishes (i.e., all counties I assign the same number should be
the same color)?
I explored a bit and looks like the package "maps" might be of help.
library(maps)
One could get a map of the US: map('usa')
One could get countries within a US state: map('county', 'iowa', fill
2006 Oct 20
2
CORRESPONDENCE ANALYSIS
Enio Jelihovschi" eniojelihovs@gmail.com
Date: Fri, 20 Oct 2006 11:28:12 -0200
Subject: CORRESPONCE ANALYSIS
Dear All
I am new R user, trying to do correspondence analysis using the function mca
of the package MASS. My question is: In the following example
farms.mca <- mca(farms, abbrev = T) # Use levels as names
plot(farms.mca, cex = rep(0.7, 2), axes = F)
How can I change the
2006 Jun 16
3
Does HABTM support non "id" FKs?
Quick question. Say I have a geographical database with counties and zip
codes where counties have and belong to many zip codes.
zip_codes (id, zip_code)
counties (id, name)
When I create the association table, the Rails way says to do the
following: counties_zip_codes (county_id, zip_code_id).
However, given that zip_codes.zip_code is itself a candidate key, I
would much prefer to do the
2012 Jan 16
1
Package "maps": what is the name of county # 2395?
I am using "maps". I am running the following code to get this list of
all the counties:
map('county', plot=FALSE)$names
In the output, all counties have first the state listed and then,
after a comma, the name of the county.
However, county # 2395 (State = south dakota) has no county name.
Anyone knows what this county is?
Thank you!
--
Dimitri Liakhovitski
2012 Jan 25
1
Coloring Canada provinces (package maps?)
Dear R'ers,
I am wondering what is the smallest geographicterritorial unit
available for formatting in Canada. Provinces?
I know that in the US it is the county so that I can color US
counties any way I want, for example:
### Example for coloring US counties
### Creating an ARTIFICIAL criterion for coloring US counties:
library(maps)
allcounties<-data.frame(county=map('county',
2004 Mar 15
2
R equiv to proc gremove in maps package
Is there an R equivalent to SAS's proc gremove? You would use this procedure to combine the units on an existing map, for example to build a map of Metropolitan Statistical Areas (MSAs) from the [US] counties dataset where the internal boundries surround the MSAs (which are groups of counties) rather than the individual counties. I can imagine the mechanism would be to find and erase the
2000 Jul 11
0
A small error in mca ?
Dear list,
Working the example in Stats complements to V&R 3rd ed., I found this :
> library(MASS)
> library(mva)
> data(farms)
> plot(mca(farms,abbrev=TRUE),cex=rep(0.7,2))
# ... Works OK
# Sheer curiosity ...
> plot(mca(farms,abbrev=TRUE,nf=4),cex=rep(0.7,2))
Error in rep(p * X.svd$d[sec], c(n, n)) : invalid number of copies in "rep"
A bit of exploration in the
2008 Oct 25
1
Methods for showing statistics over space
Hi,
I have a question which is a little off-topic but then again, it should stay in the boundaries of what can be done with available R functions.
Has anyone pointers to tutorials or the like where one can get inspiration on how to visualize some "spatial" statistics?
I want to analyze different statistics of 60 counties in a country. I have a shape file for those counties thus I can
2006 May 21
3
has_many :through with a polymorphic join
Hi,
Four tables: users, user_counties, uk_counties and us_counties.
Each user has many counties, and each county has many users, so I
decided to make user_counties a polymorph, so it can have counties
from different countries (each country requires a completely different
set of tables with a completely different set of properties, that''s
why there''s one table for uk_counties and
2006 Dec 27
3
counties in different colours using map()
Hi,
I would like to plot a map of US counties using different colors. map()
seems to be the function to use, e.g.
library(maps); map('usa'); map('county', 'colorado', add=T,fill = T,
col=c(1:5))
plots Colorado counties using colours 1 to 5.
However, I want each color to represent a certain value - a value to be
picked from a data frame.
This code should show a
2009 Aug 12
1
Map of UK Counties - to use in R
Hi,
Can anyone help me with either of these:
1) Map of the UK counties that I could use in R?
2) How could I use an existing map for example, a map from here
http://www.itraveluk.co.uk/maps/england.html - in R. I need to use a UK map
to plot locations on it by lat & long.
Would appreciate help on any of these.
Thanks,
Raoul
--
View this message in context:
2010 May 25
2
segplot (latticeExtra)
Hi,
I'm having a bit of trouble with 'scales="free"' in the segplot()
function of latticeExtra. Say we need panels for each year, showing
only those counties that are represented in each one:
---<--------------------cut here---------------start------------------->---
library(latticeExtra)
data(USCancerRates)
uscr.w <- subset(USCancerRates, state ==
2006 Aug 10
5
RJS in Internet Explorer to update a list box
Hi,
I''m trying some RJS to update a series of list boxes in which the user
selects a state, and the following list gets updated with a list of
counties, and the same for the next list of areas.
My code works perfectly (albeit a bit slow) on Firefox, but on Internet
Explorer it clears the list box (instead of filling it) and Netscape
shows all the counties cramped together on one
2011 Feb 05
1
different results in MASS's mca and SAS's corresp
Dear list:
I have tried MASS's mca function and SAS's PROC corresp on the
farms data (included in MASS, also used as mca's example), the
results are different:
R: mca(farms)$rs:
1 2
1 0.059296637 0.0455871427
2 0.043077902 -0.0354728795
3 0.059834286 0.0730485572
4 0.059834286 0.0730485572
5 0.012900181 -0.0503121890
6
2020 May 10
2
1. character a factors (Jose Betancourt B.)
Estimados
No me resultó, describo paso a paso y adjunto base de datos
str((df[,1:2]))# evaluo el tipo de variable
salida
data.frame': 101 obs. of 2 variables:
$ alergia1 : chr "no" "no" "si" "si" ...
$ parasitismo1: chr "si" "si" "si" "si" ...
#esto es lo que quiero hacer
library(MASS)
farms.mca <-