Displaying 16 results from an estimated 16 matches similar to: "Interaction factor and numeric variable versus separate regressions"
2008 Jan 02
3
Find missing days
Hi,
I have a data.frame like this:
y <- rnorm(60)
lev <- gl(3,20, labels=paste("lev", 1:3, sep=""))
date1 <- as.Date(seq(ISOdate(2007,9,1), ISOdate(2007,11,5),
by=60*60*24))
date1 <- date1[-c(3,4,15,34,38,40)]
df <- data.frame(lev=lev, date1=date1, y=y)
I would like to produce a new data.frame with missing days in df$date1
in each df$lev, like this:
lev
2006 Feb 17
1
Transforming results of the summary function
Hi all,
I have a question about transforming the data from summary function.
Let's say I have a data frame like this:
> x = data.frame(a = c(rep("lev1", 5), rep("lev2", 5)), b = c(rnorm(5)+2, rnorm(5)))
> x
a b
1 lev1 1.5964765
2 lev1 2.2945609
3 lev1 3.5285787
4 lev1 1.4439838
5 lev1 2.2948826
6 lev2 1.7063506
7 lev2 -0.4042742
8 lev2
2008 Oct 19
2
definition of "dffits"
R-users
E-mail: r-help@r-project.org
Hi! R-users.
I am just wondering what the definition of "dffits" in R language is.
Let me show you an simple example.
function() {
library(MASS)
xx <- c(1,2,3,4,5)
yy <- c(1,3,4,2,4)
data1 <- data.frame(x=xx, y=yy)
lm.out <- lm(y~., data=data1, x=T)
lev1 <- lm.influence(lm.out)$hat
sig1 <-
2007 Aug 07
1
Naming Lists
Hi
Im pretty new to R and I have run in to a problem. How do I name all the
levels in this list.
Lev1 <- c("A1","A2")
Lev2 <- c("B1","B2")
Lev3 <- c("C1","C2")
MyList <- lapply(Lev1,function(x){
lapply(Lev2,function(y){
lapply(Lev3,function(z){
paste(unlist(x),unlist(y),unlist(z))
})})})
I would like to name the different
2007 Aug 23
1
How to merge string to DF
#Hi R-users,
#I have an example DF like this:
y1 <- rnorm(10) + 6.8
y2 <- rnorm(10) + (1:10*1.7 + 1)
y3 <- rnorm(10) + (1:10*6.7 + 3.7)
y <- c(y1,y2,y3)
x <- rep(1:3,10)
f <- gl(2,15, labels=paste("lev", 1:2, sep=""))
g <- seq(as.Date("2000/1/1"), by="day", length=30)
DF <- data.frame(x=x,y=y, f=f, g=g)
DF$wdays <- weekdays(DF$g)
2007 Aug 16
1
Trim trailng space from data.frame factor variables
Hi folks,
I would like to trim the trailing spaces in my factor variables using lapply
(described in this post by Marc Schwartz:
http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22826.html) but the code is
not functioning (in this example there is only one factor with trailing
spaces):
y1 <- rnorm(20) + 6.8
y2 <- rnorm(20) + (1:20*1.7 + 1)
y3 <- rnorm(20) + (1:20*6.7 + 3.7)
y <-
2007 Aug 08
1
tapply grand mean
Hi R-users,
I have a data.frame like this (modificated from
https://stat.ethz.ch/pipermail/r-help/2007-August/138124.html).
y1 <- rnorm(20) + 6.8
y2 <- rnorm(20) + (1:20*1.7 + 1)
y3 <- rnorm(20) + (1:20*6.7 + 3.7)
y <- c(y1,y2,y3)
x <- rep(1:5,12)
f <- gl(3,20, labels=paste("lev", 1:3, sep=""))
d <- data.frame(x=x,y=y, f=f)
and this is how I can
2004 Jan 05
1
lda() called with data=subset() command
Hi
I have a data.frame with a grouping variable having the levels
C,
mild AD,
mod AD,
O and
S
since I want to compute a lda only for the two groups 'C' and 'mod AD' I
call lda with data=subset(mydata.pca,GROUP == 'mod AD' | GROUP == 'C')
my.lda <- lda(GROUP ~ Comp.1 + Comp.2 + Comp.3 + Comp.4+ Comp.5 +
Comp.6 + Comp.7 + Comp.8 ,
2007 Dec 01
2
How to cbind DF:s with differing number of rows?
#Hi R-users,
#Suppose that I have a data.frame like this:
y1 <- rnorm(10) + 6.8
y2 <- rnorm(10) + (1:10*1.7 + 1)
y3 <- rnorm(10) + (1:10*6.7 + 3.7)
y <- c(y1,y2,y3)
x <- rep(1:3,10)
f <- gl(2,15, labels=paste("lev", 1:2, sep=""))
g <- seq(as.Date("2000/1/1"), by="day", length=30)
DF <- data.frame(x=x,y=y, f=f, g=g)
DF$g[DF$x == 1]
2011 Feb 11
6
linear models with factors
i am trying to fit a linear model with both continuous covariates and
factors. When fitted with the intercept
term the first level of the factor is treated by R as intercept and the
estimate of the effects of remaining levels(say i th level) are given as
true estimate of i th level - estimate of 1st level.can any please help me?
thanks in advance.....
--
View this message in context:
2013 Mar 11
2
how to convert a data.frame to tree structure object such as dendrogram
I have a data.frame object like:
> data.frame(x=c('A','A','B','B'), y=c('Ab','Ac','Ba','Bd'))
x y
1 A Ab
2 A Ac
3 B Ba
4 B Bd
how could I create a tree structure object like this:
|---Ab
A---|
_| |---Ac
|
| |---Ba
B---|
|---Bb
Thanks,
Zech
[[alternative HTML version deleted]]
2008 Nov 03
4
Install Configuring and run.
Hello,.
i installed dovecot with virtual user and domains.
but i dont get thru "dovecot-antispam" config.
is there any HOWTO, for gentoo , how to setup and configure
dovecot-antispam ?
with examples for the config files ?
maybe i have dspam self totally wrong configured.
thanks
marko
2009 Jun 19
2
Cisco 7941G & Auth
Hi, I use Asterisk-1.4.22-3 (on Trixbox) and I have a problem with Cisco
7941G with firmware SIP41.8-0-2SR1S (but also with SIP41.8-3-1S), my problem
is that Cisco phone isn't authenticated on Asterisk.
In tftp directory I have:
apps41.1-1-1-15.sbn
cnu41.3-1-1-15.sbn
copstart.sh
cvm41sip.8-0-1-18.sbn
dialplan.xml
dsp41.1-1-1-15.sbn
jar41sip.8-0-1-18.sbn
load115
load308
load309
load30018
2005 Aug 04
1
[Bug 2947] stdout with [-v] -H --link-dest and slink/sock/fifo/regf
https://bugzilla.samba.org/show_bug.cgi?id=2947
wayned@samba.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
------- Additional Comments From wayned@samba.org 2005-08-03 16:45 -------
Keep in mind that --link-dest only hard-links regular
2006 Apr 04
0
Fisher's discriminant functions
Hi,
I am trying to solve a discriminant analysis in the same way as SPSS does it. I mean, given an amount of data, to train the discriminant analysis I obtain the Fisher's discriminant functions, an array of coefficients per group, so if I have 8 groups I get 8 linear functions, that allow me to operate with them easily and without a great cost of time.
My main problem is that I need to
2008 Nov 03
0
NaN causes "error in fitter" with cph.calibrate from pkg Design
I have been attempting to use cph models to get better calibration
of my models for which I had originally used logistic regression. I
tried running with 40 repetitions and got an error. I then tried 500
repetitions (thinking that the NaNs in the output below might be
caused by that choice) and then let my computer crunch for several
hours and got only the same error message and