Displaying 20 results from an estimated 40 matches for "var6".
Did you mean:
var
2012 May 09
0
serie de tiempo incompleta: rellenar sólo fechas (claudiomet)
...er donde hay discontinuidades. No me interesa llenar los vacÃos
> en las variables, sólo las fechas y dejar las variables en blanco ¿es
> posible hacerlo en R?. Mi serie de tiempo es del tipo (con fecha en formato
> dd-mm-yyyy hh:mm):
>
> 01-01-2011 00:00 var1 var2 var3 var4 var5 var6 var7 var8
> 01-01-2011 00:01 var1 var2 var3 var4 var5 var6 var7 var8
> 01-01-2011 00:02 var1 var2 var3 var4 var5 var6 var7 var8
> 01-01-2011 00:03 var1 var2 var3 var4 var5 var6 var7 var8
> 01-01-2011 00:04 var1 var2 var3 var4 var5 var6 var7 var8
> 01-01-2011 00:07 var1 var2 var3 var4...
2010 Nov 08
2
Several lattice plots on one page
Dear all,
I am trying (!!!) to generate pdfs that have 8 plots on one page:
df = data.frame(
day = c(1,2,3,4),
var1 = c(1,2,3,4),
var2 = c(100,200,300,4000),
var3 = c(10,20,300,40000),
var4 = c(100000,20000,30000,4000),
var5 = c(10,20,30,40),
var6 = c(0.001,0.002,0.003,0.004),
var7 = c(123,223,123,412),
var8 = c(213,123,234,435),
all = as.factor(c(1,1,1,1)))
pdf("test1.pdf", width=20, heigh=27, paper="a4")
print(plot(groupedData(var1 ~ day | all, data = df), main = "var1", xlab="", ylab="...
2006 Feb 21
6
How to sum values across multiple variables using a wildcard?
...a dataframe called "data" with 5 records (in rows) each of
which has been scored on each of many variables (in columns).
Five of the variables are named var1, var2, var3, var4, var5 using
headers. The other variables are named using other conventions.
I can create a new variable called var6 with the value 15 for each
record with this code:
> var6=var1+var2+var3+var4+var5
but this is tedious for my real dataset with dozens of variables. I
would rather use a wildcard to add up all the variables that begin
with "Var" like this pseudocode:
> Var6=sum(var*)
Any suggesti...
2011 Jun 23
2
Merging multiple data sets
Hi,
I am trying to merge data similar to the example data below
> dat0
id var1 var2 var3
2 1 0 1
3 1 0 1
4 0 1 1
5 0 1 1
> dat1
id var4 var5 var6
2 1 0 1
3 1 0 1
6 0 1 1
7 0 1 1
> dat2
id var7 var8 var9
2 1 0 1
5 1 0 1
6 0 1 1
8 0 1 1
Basically what I...
2007 Oct 15
2
Variable which has the maximum value of DF
Hi,
Suppose I have a data.frame like this
Lines <- "var1 var2 var3 var4 var5 var6
0 2 1 2 0 0
2 3 7 6 0 1
1.5 4 9 9 6 0
1.0 6 10 22 3 3
"
DF <- read.table(textConnection(Lines), skip=1)
names(DF) <- scan(textConnection(Lines), what = "", nlines = 1)
How do I f...
2010 Dec 03
2
Add columns of dataset
Dear all,
I have a dataset that looks like
id var1 var2 var4 var7 var8
1 0.0 0.1 0.3 0.9 0.0
2 0.4 0.6 0.0 0.0 0.2
3 0.0 0.0 0.0 0.8 0.7
Some columns are missed, for example, here the fourth (var3), sixth(var5)
and seventh (var6) columns. I want to first determine which columns are
missed in a huge dataset and then add the missed columns with the values of
zeros that looks like
id var1 var2 var3 var4 var5 var6 var7 var8
1 0.0 0.1 0.0 0.3 0.0 0.0 0.9 0.0
2 0.4 0.6 0.0 0.0 0...
2010 Jan 25
5
Data transformation
Dear all,
I have a dataset that looks like this:
x <- read.table(textConnection("col1 col2
3 1
2 2
4 7
8 6
5 10"), header=TRUE)
I want to rewrite it as below:
var1 var2 var3 var4 var5 var6 var7 var8 var9 var10
1 0 1 0 0 0 0 0 0 0
0 2 0 0 0 0 0 0 0 0
0 0 0 1 0 0 1 0 0 0
0 0 0 0 0 1 0 1 0 0
0 0 0 0...
2010 Dec 22
3
A question to get all possible combinations
Let say, I have a matrix with 8 rows and 6 columns:
> df1 <- matrix(NA, 8, 4)
> df1
[,1] [,2] [,3] [,4]
[1,] NA NA NA NA
[2,] NA NA NA NA
[3,] NA NA NA NA
[4,] NA NA NA NA
[5,] NA NA NA NA
[6,] NA NA NA NA
[7,] NA NA NA NA
[8,] NA NA NA NA
Now I want to get **all possible** ways to fetch 6 cells at a
2008 Apr 28
1
error in summary.Design
...ear list,
after fitting an lrm with the Design package (stored as "mymodel") I
try running a summary, but I get the following error:
dim(mydata)
[1] 235 9
names(mydata)
[1] "id" "VAR1" "VAR2" "VAR3" "VAR4" "VAR5" "VAR6" "VAR7" "VAR8"
summary(mymodel)
Error in `contrasts<-`(`*tmp*`, value = "contr.treatment") :
contrasts can be applied only to factors with 2 or more levels
but,
VAR1 is my dependent
> nlevels(factor(VAR1))
[1] 2
VAR2 is continuous
> summary(psa)...
2010 Jul 29
1
(no subject)
Dear R Users!
I have a dataframe with duplicate cases. Var1 duplicated by var2.
var1 var2 var3 var4 var5 var6 1 4 500 1 2 a 1 3 200 2 5 b 1 8 125 1 9 b 2 2 120 2 52 b...
2009 Dec 15
1
Changing Column names in (Output) csv file
...ange_prob[[7]] <- c(0.44,0.07,0.49)
range_prob[[8]] <- c(0.54,0.06,0.40)
range_prob[[9]] <- c(0.26,0.62,0.12)
range_prob[[10]] <- c(0.65,0.19,0.16)
pdf <- expand.grid(range_prob)
data_lab$probs <- apply(pdf, 1, prod)
joint_probs = xtabs(probs ~ Var1 + Var2+Var3+Var4+Var5+Var6+Var7+Var8+Var9+Var10, data = data_lab)
write.csv(data.frame(joint_probs), 'joint_probs.csv', row.names = FALSE)
ONS = read.csv('joint_probs.csv')
Names = NULL
for (i in 1:length(joint_probs))
{
Names[i] = paste(ONS$Var1[i], ONS$Var2[i], ONS$Var3[i], ONS$Var4[i], ONS$...
2007 Apr 24
1
exclude the unfit data from the iteration
...coxph; in my example below- sim.fr is the
generated data). However, sometimes i get warning
messages like
"Ran out of iterations and did not converge" or
"Error in var(x, na.rm = na.rm) : missing observations
in cov/cor"
because in some cases one of my covariate (say, var5
or var6 or both who are binary variables) becomes all
0's!
How do I exclude the unfit data (that does not
fit/converge: that produces warning messages) that may
be generated in any iteration, and still continue by
replacing it by the next iteration data (untill it
generates acceptable data that does n...
2012 Jul 05
4
Exclude missing values on only 1 variable
Hello,
I have many hundred variables in my longitudinal dataset and lots of
missings. In order to plot data I need to remove missings.
If I do
> data <- na.omit(data)
that will reduce my dataset to 2% of its original size ;)
So I only need to listwise delete missings on 3 variables (the ones I am
plotting).
data$variable1 <-na.omit(data$variable1)
does not work.
Thank you
2010 Jul 12
0
How do I convert a XML file to a data.frame?
...ks like this:
<Transaction>
<ID value="0044"/>
<Var1 value="XYZ159"/>
<Var2 value="_"/>
<Var3 value="AMR1.0-INT-1005"/>
<Var4 value="2010-05-25 10:44:16:673"/>
<Var5 value="1"/>
<Var6 value="0"/>
</Transaction>
<Transaction>
<ID value="0046"/>
<Var1 value="XBC254"/>
<Var2 value="GLOBAL"/>
<Var3 value="AMR2.0-INT-9997"/>
<Var4 value="2010-05-25 11:22:50:803"/>
<...
2012 Sep 21
1
translating SAS proc mixed into R lme()
...inal data with repeated measures (measurements are equally spaced
in time, subjects are measured several times a year). I need to allow slope
and intercept vary.
SAS codes are:
proc mixed data = survey method=reml;
class subject var1 var3 var2 time;
model score = var2 score_base var4 var5 var3 var6 var7 var1 time/ noint
solution;
random intercept timecontinious / subject=subject type=un g gcorr v vcorr;
run;
Thank you a lot!
[[alternative HTML version deleted]]
2007 Nov 07
2
creating a dynamic output vector
Let's say I have a program that returns variables whose names may be any
string within the vector
NAMES=c("varA","varB","varC","varD","varE","varF"..."varZ"), but I do
not ever know which ones have actually been created. So in one example
output, "varA", "varC", and "varD" could exist, but
2007 Jul 03
2
vertically concatenating data frames
Hi,
what is the recommended way to vertically concatenate 2 data frames with
the same column names but different number of rows?
My problem is something along these lines:
df1 <- data.frame(var1=var1,var2=var2,var3=var3) # nrow(df1)=1000
df2 <- data.frame(var1=var4,var2=var5,var3=var6) # nrow(df2)=2000
I tried df <- c(df1,df2), no success. stack does not seem to be
appropriate either for my problem.
Thanks
Zava
--------------------------------------------------------
This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}
2007 Apr 20
1
Hiding "Warning messages" in coxme output
...ent(NULL)' is
deprecated"
Why does it occur?
How can I hide such warning message,
especially when coxme is under a loop?
Mohammad Ehsanul Karim (Institute of Statistical
Research and Training, University of Dhaka)
> fit.me1<-coxme(Surv(times,censored) ~
var1+var2+var3+var4+var5+var6, data=sim.fr1, random=
~1|id)
Warning messages:
1: using 'as.environment(NULL)' is deprecated
2: using 'as.environment(NULL)' is deprecated
3: using 'as.environment(NULL)' is deprecated
> sim.fr1
id var1 var2 var3
1 4 50.04399 239.8418 56.00348
2 2...
2012 Sep 27
1
List of Variables in Original Order
...I wanted to print a table where the
odd-numbered rows contain the variable names and the even-numbered rows
contain the correlations. So if VarA is correlated with all the variables in
mydata.df, then it would look like
var1 var2 var3
corr1 corr2 corr3
var4 var5 var6
corr4 corr5 corr6
.
.
etc.
I tried using a matrix for the correlations and another one for the variable
names. I built the correlation matrix using
x = matrix(format(cor(mydata.df[,1],mydata.df[,c(2:79)]),digits=4),nc=3)
and the variable names matrix using
y = matrix(ls(mydata.df[c(2:79)...
2011 Oct 24
4
Problem with svyvar in survey package
...function svyvar
gives the estimated population variance from a given sampling scheme. I am
working with a data having more than four continuous variables. In order to
have have population total for all those cont. variables I have written in
the following format
svyvar(~var1+var2+var3+var4+var5+var6,data) ; var1,var2,...,var6 are 6 cont.
variables
Now the problem is that,this function works properly when the number of
cont. variables are less than or equal to three. But when the number of
variables goes beyond three it gives a wrong answer,where we have two
estimates for the 1st variable (her...