?
--
Donald Braman
http://ssrn.com/author=286206
http://www.culturalcognition.net/braman/
http://www.law.gwu.edu/Faculty/profile.aspx?id=10123
Henrique Dallazuanna
Tue, 26 Oct 2010 09:11:33 -0700
Try this:
read.table('don.5.clusters.txt', header = TRUE, comment.char = '', quote =
'')
On Tue, Oct 26
read.delim2 did the trick -- many thanks!!!
On Wed, Oct 27, 2010 at 10:01 AM, Jorge Ivan Velez jorgeivanve...@gmail.com
wrote:
?read.delim2
HTH,
Jorge
On Wed, Oct 27, 2010 at 9:51 AM, Donald Braman dbra...@law.gwu.eduwrote:
Thanks for your advice! I still get the same error, though
I'm importing a lot of text tables of data (from Latent Gold) that includes
hashes in some of the column names (Cluster#1, Cluster#2, etc.). Is
there an easy way to strip the offending hashes out before pushing the text
into a table or data frame? I thought I'd use gsub, e.g., but can't figure
, 2010 at 10:49 AM, Duncan Murdoch
murdoch.dun...@gmail.comwrote:
On 26/10/2010 10:33 AM, Donald Braman wrote:
I'm importing a lot of text tables of data (from Latent Gold) that
includes
hashes in some of the column names (Cluster#1, Cluster#2, etc.). Is
there an easy way to strip the offending
Does anyone know of a package (or workaround) for fitting a dirichlet
distribution by maximum likelihood?
(I'm looking for something like this: http://repec.org/bocode/d/dirifit.html,
that allows for both dependent variables summing to 1 predictive variables
of any sort.)
Don
--
Donald
As an alternative to Latent GOLD, I'm wondering if anyone knows of and R
package that can manage Latent Class Analysis with mixed variable types
(continuous, ordinal, and nominal/binary).
[[alternative HTML version deleted]]
__
Thanks! I've figured out how to fix it, but how I got here is still a
puzzle. :-) Cheers, Don
On Sat, Oct 17, 2009 at 5:36 PM, Peter Ehlers ehl...@ucalgary.ca wrote:
Donald Braman wrote:
Can someone help me understand this results?
levels(as.factor(miset1$facts_convict))
[1] 1 1 2 3
Can someone help me understand this results?
levels(as.factor(miset1$facts_convict))
[1] 1 1 2 3 4 5 6
converting to numeric and back doesn't seem to help:
levels(as.factor(as.numeric(miset1$facts_convict)))
[1] 1 1 2 3 4 5 6
It's messing up my ologits. Any way to correct this?
I want the standard error associated with a correlation. I can calculate
using cor var, but am wondering if there are libraries that already
provide this function.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
- paste(iv, dv, .png, sep = )
png(file=graphname, width=300, height=300)
plot(dv ~ iv, pch=.)
lines(loess.smooth(iv, dv), lty=1)
dev.off()
}
}
Clearly that doesn't work. I'm not sure how to make R see the iv and dv
strings as variables. Advice?
Donald Braman
phone: 413-628-1221
http
I was trying to fit a curve to the number of people who identify as liberal
by age. I got some puzzling results which suggested to me that I don't
really understand how local polynomial fitting works. Why, I am wondering,
is lowess producing a local fit of zero for every age?
liberal.bin
[1]
I am trying to fit a curve to the number of people who identify as liberal
by age. I got some puzzling results which suggested to me that I don't
really understand how local polynomial fitting works. Why, I am wondering,
is lowess producing a local fit of zero for every age?
liberal
[1] 0 0 0
Resolved. It works if I set iter=0.
On Thu, Aug 6, 2009 at 9:03 PM, Donald Braman dbra...@law.gwu.edu wrote:
I was trying to fit a curve to the number of people who identify as liberal
by age. I got some puzzling results which suggested to me that I don't
really understand how local
Curious to know if recode can work with strings containing colons. I
haven't gotten it to work yet, but perhaps there is a way?
Donald Braman
http://www.culturalcognition.com/braman/
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
', param=50,
region = c(syg, dtr),
fill=TRUE,
col=c('red', 'blue'))
Obviously that doesn't work. A couple questions:
1. How do I get Alaska Hawaii on the map?
2. How to I set the col atttribute for a subset of the states I'm mapping?
Many thanks in advance for any help!
Don
Donald Braman
I've been playing around with various table tools, trying to construct a
fairly simple cross-tab. It shouldn't be hard, but for some reason it
turning out to be (for me).
If I want to see how many men and how many women agree with a agree/disagree
question (coded 1,0), I can do this:
Thanks for the help everyone! I'm new to vectors, and don't quite get it.
This works for me:
binary.vars - c(q1, q2, q3, ...)
apply(mydata[binary.vars], 2, tapply, mydata[male], mean)
but this doesn't:
other.vars - c(male, race, religion)
apply(mydata[other.binary.vars], 2, tapply,
Is there an easy way to invert a table? (not to solve for the inverted
matrix, just swap rows for columns vice versa). I've gone through my data
manipulation bible (Phil Spector's book), but to no avail.
[[alternative HTML version deleted]]
I'm wondering if there is a simple way to assign a quantile to a vector in a
data frame, much like one could in Stata using centile. Let's say I want 100
slices in my assignation. I can easily see what the limits of each slice by
using quantile:
quantile(my.df$my.var, probs=seq(0, 1, 0.01))
But
Dallazuanna [EMAIL PROTECTED]wrote:
Try this:
my.df$my.newvar - quantile(my.df$my.var, probs = seq(0.01,1, 0.01))
On Sat, Sep 27, 2008 at 3:50 AM, Donald Braman [EMAIL PROTECTED]
wrote:
I'm wondering if there is a simple way to assign a quantile to a vector
in a
data frame, much like one could
I'm coming from the AMOS world and am wondering if there is a simple
way to do multiple hypothesis testing in the manner of BIC analyses in
AMOS using the sem package in R. I've read the documentation, but
don't see anything in there except for basic BIC scores. Perhaps
someone has devised a
around all the ways to ditch looping in R.
Donald Braman
http://www.law.gwu.edu/Faculty/profile.aspx?id=10123
http://research.yale.edu/culturalcognition
http://ssrn.com/author=286206
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
), add=TRUE, col=black)
curve (cbind (1, 0, x, 0*x) %*% coef(my.fit), add=TRUE, col=gray)
dev.off()
}
))
On Sun, Jun 22, 2008 at 6:26 PM, Donald Braman [EMAIL PROTECTED]
wrote:
# I've tried to make this easy to paste into R, though it's probably
so simple you won't need to.
# I have
I'm stumbling my way through manipulating data in multiply imputed datasets,
and have run into a problem translating code I used to run on my pre-imputed
dataset to multiple datasets. The imputation runs just fine, as does the
reading of the mi data sets into an imputationList. I run into
and when it creates a new
one. I suppose I could do this in Python and the use PyR, but I'd
really like to learn a bit more about how R syntax.
Any help on this specific problem or general advice on manipulating
data in multiply imputed datasets in R would be much appreciated.
--
Donald Braman
http
# I'm new to R and am trying to get the hang of how it handles
# dataframes loops. If anyone can help me with some simple tasks,
# I'd be much obliged.
# First, i'd like to generate some random data in a dataframe
# to efficiently illustrate what I'm up to.
# let's say I have six variables as
Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On
Behalf Of Donald Braman
Sent: Monday, May 19, 2008 12:42 PM
To: r-help@r-project.org
Subject: [R] recoding data with loops
# I'm new to R and am trying to get the hang of how it handles
# dataframes loops. If anyone can help me
Many thanks --
You are right; I had rnorm() and sample() mixed up in my code. I'll work on
generating a normal ordinal sample next.
Cheers, Don
On Mon, May 19, 2008 at 4:07 PM, Erik Iverson [EMAIL PROTECTED]
wrote:
Hello -
Donald Braman wrote:
# I'm new to R and am trying to get the hang
(reverse_me_varnames))
{mdf$reversed_varnames[i] - recode(mdf$reverse_me_varnames[i], '5:7=NA;
1=4; 2=3; 3=2; 4=1;', as.factor.result=FALSE)
While I don't get an error message, the data don't change. Any advice on
reverse coding non-continguous variables?
On Mon, May 19, 2008 at 4:12 PM, Donald Braman
not allow 'computed' indices.
I hope this helps!
Erik
Donald Braman wrote:
Erik,
Your example was just what I needed to generate the data -- many, many
thanks! The names() function was something I had not grasped fully. I now
have this and it works very nicely:
var_list - c(HEQUAL
30 matches
Mail list logo