I have columns which sum to one. They are membership dummies, fractions are
allowed - I made an example:
x - c( 9.899898,6.9555431,-1.251,0.5200,0.480,0.000,-2.2384737,
16.791361,6.8924369,-3.286,0.78846154,0.2115385,0.000,-0.4720061,
Hi,
I am doing double for loops to calculate SDs with some weights and wondering
if I can get rid of the outer for loop as well. I made a simple examples
which is essentially what I am doing.
Thanks for your help!
-Young
#--
# wtd.var is
When I try to plot two lines ( or scatterplots) with different scales, this
is what I have been doing:
Suppose: I have y1 and y2 in a very different scale
y1 = 1:100
y2 = c(100:1)*10
To plot them on top of each other and denote by different colors: I have to
figure out the correct scale '10'
I have data.frame's with IDs and multiple columns. B/c some of IDs showed up
more than once, I need sum up colum values to creat a new dataframe with
unique ids.
I hope there are some cheaper ways of doing it... Because the dataframe is
huge, it takes almost an hour to do the task. Thanks so
I am trying to connect sybase sql databast from R using RODBC pkg and
getting the following error ( i chnaged names to my*** but when I actually
execute it, I put down names explicitly not calling some character strings)
channel = odbcConnect(dsn='mydsn',uid='myid',pwd='mypasswd')
Warning
Hi,
Thanks so much in advance for your help!
I just started using 'timeDate' object to manipulate daily time
series data. After reading some documents, I created an object
'bizday' to do some business-day computation. E.g.
bizday = timeSequence
I have a daily time series and have two questions to get some help with.
Firs,t I have dates in simple numeric values. e.g.
ymd
[1] 20050104 20050105 20050106 20050107 20050110 20050111 20050113 20050114
[9] 20050118 20050120 20050121 20050124 20050125 20050126 20050127 20050128
[17] 20050201
Thanks so Michael! If you know of a tutorial or introductory document
about timeDate manipulation or time series manipulation in R, can you
share it? It is hard to find by googling... I'd very appreciate any
advice.
Young.
On Mar 12, 2007, at 9:00 PM, Michael Toews wrote:
[1] 20050104
HI,
I am trying to figure out an efficient way to calculate group means and
associate each entry with it. I made up an example:
A = rep(rep(0:1,each=2),3)
B = rep(rep(0:1,4),3)
C = rep(rep(c(0,0,1,1),2),3)
X =cbind(rnorm(24,0,1),runif(24,0,1),A,B,C)
Hi,
I was wondering if there is a way, or function in R to
find confounders. For istance,
a = sample( c(1:3), size=10,replace=T)
X1 = factor( c('A','B','C')[a] )
X2 = factor( c('Aa','Bb','Cc')[a] )
Xmat = data.frame(X1,X2,rnorm(10),rnorm(10))
dimnames(Xmat)[[2]] = c('z1','z2','z3','y')
Hi,
I have a dataframe ds1.2 - 503 categorial variables
and 1 continuous response variables. I ran aregImpute
to deal with NA's and got the followig error:
fmla = terms( Response ~ . ,data=ds1.2)
ds.i = aregImpute(fmla,data=ds1.2)
Error in matrix(as.double(1), nrow = n, ncol = p,
dimnames =
Hi,
I have a column of a dataframe which has time stamps
like:
eh$t[1]
[1] 06/05/2005 01:15:25
and was wondering how to convert it to chron variable.
Thanks a lot.
Young.
__
R-help@stat.math.ethz.ch mailing list
Thanks a lot for help in advance. I am switching from matlab to R and I guess I
need some time to get rolling. I was wondering why this code :
fit.0 - lm( Response ~ 1, data = ds3)
step(fit.0,scope=list(upper=~.,lower=~1),data=ds3)
Start: AIC= -32.66
Response ~ 1
Call:
lm(formula =
Hi, I am trying to find out a collinearity in
explanatory variables with alias().
I creat a dataframe:
dat - ds[,sapply(ds,nlevels)=2]
dat$Y - Response
Explanatory variables are factor and response is
continuous random variable. When I run a regression, I
have the following error:
fit - aov(
[EMAIL PROTECTED] wrote:
On Fri, 24 Jun 2005, Young Cho wrote:
Hi,
I have a problem in getting step function work.
This is not coming from step(), but (AFAIK) from model.matrix() called by
lm(). One way to debug it is to try fitting the models directly.
I am getting the following error
Hi,
I have a problem in getting step function work. I am getting the following
error:
fit1 - lm(Response~1)
fmla - as.formula(paste( ~ ,paste(colnames,collapse=+)))
sfit - step(fit1,scope=list(upper= fmla,lower= ~1),k=log(nrow(dat)))
Start: AIC= -1646.66
Response ~ 1
Error in
16 matches
Mail list logo