Displaying 20 results from an estimated 4000 matches similar to: "creating a new variable."
2003 Jan 08
1
Lattice: Plotting two densities on the same plot(s)?
I am trying to plot two density lines on the same graph. Using the
functions on the base package, I would go:
plot(density(x), col = 1)
lines(density(y), col = 2)
And I get two distinct (one-bump) density lines. When I try to do it
using lattice, I get two two-humped lines. (In other words, I think the
smoothing function is taking the next set of data points and smoothing them
in the same
2012 Jul 05
1
Different level set when predicting with e1071's Naive Bayes classifier
Hi!
I'm using the Naive Bayes classifier provided by the e1071 package (
http://cran.r-project.org/web/packages/e1071) and I've noticed that the
predict function has a different behavior when the level set of the columns
used for prediction is different from the ones used for fitting. From
inspecting the predict.naiveBayes I came to the conclusion that this is due
to the conversion of
2005 Apr 24
4
Vncserver not serving up my gnome desktop, just a fancy terminal!
I have the vncserver running on CentOS 4, but when I log in
using vncviewer from another box, I don't see my gnome
desktop, just a fancy terminal. I suspect I need to edit
the ~/.vnc "xstartup file, but what do I add to fix this.
On all other distros I have tried, the vncserver serves up
my gnome desktop by default.
--
Lee Parmeter Emperor, linXos - The Flying Penguin
2005 Apr 24
3
apt repo's for centos
I downloaded and installed apt and synaptic using yum ok,
but are there corresponding apt repo's for the yum ones? If
so, what are they?
--
Lee Parmeter Emperor, linXos - The Flying Penguin
http://www.linXos.com
Linux Registered User #337161
'It's free. It works. Duh.'" - Eric Harrison
The United States is NOT a democracy, it was founded as a Republic!
God is not a
2013 Mar 28
4
bayesian HLM random effects
Hello, all.
I've been working on this for sometime and was almost at the end/ last chunk of code i would need.... When I received an error. Rather than go to bed and think about it in the morning, I messed with my data and now I am not getting anything. I was up until 4am trying to fix this.
Zip files of my data are attached (the data which ends in 'a' matches with wvsA and the
2005 Apr 27
4
CentOS 4 Software Raid1 questions
I want to mirror an existing 40GB data only drive using
software Raid1 on my new CentOS 4 server. The existing
drive is connected to a Promise Ultra 100 TX2 controller
(non-raid). I have read about mdadm and understand how to
create the Raid1 on /dev/mdxx devices. However I would like
to know if the existing data on the orignal 40GB drive in
the system will be destroyed when I create the raid with
2005 May 24
4
Custom kernel needed for ndiswrapper? (for Linksys WPC54G wireless pcmcia)
Greetings:
I'm just installed Centos-4 on an IBM T-21 laptop. So far so good. Now
I'd like to pop in a wireless lan adapter. I'm looking at a buying a
Linksys WPC54G adapter (although I haven't done so yet).
After doing some searching, it looks like the best way to get this card
working is via ndiswrapper [http://ndiswrapper.sourceforge.net] and then
to use Windoze
2005 Apr 21
2
Forums
I created an account on the Forums this morning, but I got
an error saying they were having a problem sending e-mail.
I sent a message to the webmaster and no response either.
So I can't post to the forum until my account is activated.
Are the forums new?
By the amount of traffic on the list, this must be where
most people resolved their problems. I am thinkgng about
installing CentOS 4 on my
2013 Mar 31
1
lmer effects-type plot?
hello, all.
while i have a mcmc running, i am looking at the frequestist method of my model. i have never done HLM so i am looking for ways to plot them that might yeild something useful like dr. fox's effects plot package.
this is my model, where dem is democracy ranked continuous 1:10, trsut is a 3 level categorical variable, cpi is 1:10, etc...
> hier.jags2.mod <- lmer(dem ~
2006 Jan 08
1
lmer with nested/nonnested groupings?
I'm trying to figure out how to use lmer to fit models with factors that
have some nesting and some non-nested groupings. For example, in this
paper:
http://www.stat.columbia.edu/~gelman/research/published/parkgelmanbafumi.pdf
we have a logistic regression of survey respondents' political
preferences (1=Republican, 0=Democrat), regressing on sex, ethnicity,
state (51 states within 5
2012 Nov 12
1
Invalid 'times' argument three-category ordered probit with maximum likelihood
Hello,
First time poster here so let me know if you need any more information. I am
trying to run an ordered probit with maximum likelihood model in R with a
very simple model (model <- econ3 ~ partyid). Everything looks ok until i
try to run the optim() command and that's when I get " Error in rep(1,
nrow(x)) : invalid 'times' argument". I had to adapt the code from a 4
2005 Apr 26
2
using vino on centos 4
sorry i figured this out after deleting the other parts of the thread.
just run vino-preferences as the user who runs the main x display. it
will have various options to enable and as soon as you do that you can get
to hostname:0 via vnc. works quite well.
2013 Mar 28
1
unique not working
i am using mac OSX 10.7.5, running R version 2.15.2 (2012-10-26) -- "Trick or Treat"
when i do:
uncountry <- unique(wvsAB[,7])
wvsAB$numcountry <- match(wvsAB$country, uncountry)
"unstate" isn't attaching.
> library(base)
> uncountry <- unique(wvsAB[,7])
> wvsAB$numcountry <- match(wvsAB$country, uncountry)
> ls(wvsAB)
[1] "age"
2005 Nov 08
1
Need advice about models with ordinal input variables
Dear colleagues:
I've been storing up this question for a long time and apologize for the
length and verbosity of it. I am having trouble in consulting with
graduate students on their research projects. They are using surveys to
investigate the sources of voter behavior or attitudes. They have
predictors that are factors, some ordered, but I am never confident in
telling them what
2006 Nov 08
0
Dataset from one precinct's turnout in yesterday's election
FWIW, here's a little data set I collected yesterday while working as an
election judge in a precinct in Maryland:
End DEM REP IND LIB OTH
8:00 40 12 7 1 0
9:00 30 7 3 0 0
10:00 35 13 6 0 0
11:00 31 10 8 0 0
12:00 23 4 2 0 0
1:00 23 5 0 0 0
2:00 20 8 1 0 0
3:00 24 5 6 0 0
4:00 15 6 4
2009 Dec 29
2
pass functions and arguments to function
Hi,
I wonder how to pass several functions and their arguments as arguments to
a function. For example, the main function is
f = function(X ) {
process1(X)
...
process2(X)
}
I have a few functions that operate on X, e.g. g1(X, par1), g2(X, par2),
g3(X, par3). par1, par2 and par3 are parameters and of different types. I
would like to pass g1, g2, g3 and their arguments to f and g1,
2012 Apr 19
3
Help in using unique count by match function
Hi
My code looks like this
I have two parameters x and par1. X contains values and par1 contains the
function which i required to use
if par1 is max then output should be max(x).
FUN <- match.fun(par1)
result=FUN(x)
Is it possible to incorporate the unique count of x within this code
eg
x=("a","b","a","c") . The output should be 3
2007 Oct 30
2
flexible processing
Hello,
unfortunately, I don't know a better subject. I would like to be very flexible
in how to process my data.
Assume the following dataset:
par1 <- seq(0,1,length.out = 100)
par2 <- seq(1,100)
fac1 <- factor(rep(c("group1", "group2"), each = 50))
fac2 <- factor(rep(c("group3", "group4", "group5", "group6"), each =
2006 Feb 08
1
expand.grid without expanding
Dear list,
I've recently came across a problem that I think I've solved and that I wanted
to share with you for two reasons:
- Maybe others come across the same problem.
- Maybe someone has a much simpler solution that wants to share with me ;-)
The problem is as follows: expand.grid() allows you to generate a data.frame
with all combinations of a set of values, e.g.:
>
2007 Dec 19
2
recode based on filter
Hi, I have a data frame DATA, which (simplified of course) looks like this:
know1 = c("Y","N","N","Y","N","N","Y","Y","N")
par1=c(1,4,5,3,3,2,3,3,5)
know2 = c("Y","Y","N","Y","N","N","N","Y","Y")