Displaying 5 results from an estimated 5 matches for "vcdf".
Did you mean:
ecdf
2009 Jul 15
2
Differing Variable Length Inconsistencies in Random Effects/Regression Models
...ead.table("P:\\R\\Testvcomp10.txt",header=T)
>> attach(vc)
>
> family<-factor(family)
> colms<-(vc)[,4:13] ## this to assign the 10 columns containing marker
> data to a new variable, as column names are themselves not in any
> recognisable sequence
>
> vcdf<-data.frame(family,peg.no,ec.length,syll.length,colms)
> library(lme4)
>> for (c in levels(family))
> + { for (i in 1:length(colms))
> + { fit<-lmer(peg.no~1 + (1|c/i), vcdf)
> + }
> + summ<-summary(fit)
> + av<-anova(fit)
> + print(...
2009 Sep 18
3
Error: length(f1) == length(f2) is not TRUE
...trying to extract variance components for a phenotype 'peg.no', using
the variable 'family' and a marker column 'P1L55' (which is categorical and
has 2 levels- 0 and 1), as random effects. There are no fixed effects.
The code I used is as follows:
vc<-read.table(...)
vcdf<-data.frame(vc)
colms<-(vc)[4:13] ##these are the markers
lapply(colms,factor)
try(fit<-lmer(peg.no~1 + (1|family/P1L55), na.action=na.include, data=vcdf))
I thought that putting the data into a dataframe would help, along with the
na.exclude command, because there is a lot of missing...
2009 Dec 08
1
Printing 'k' levels of factors 'n' times each, but 'n' is unequal for all levels ?
...be done using the gl() command,
but in my case, each level 'k' has an unequal number of elements.
Example with code is as below:
vc<-read.table("P:\\Transit\\CORRECT
files\\Everything-newest.csv",header=T, sep=",", dec=".", na.strings=NA,
strip.white=T)
vcdf<-data.frame(vc)
tempdf<-data.frame(cbind(vcdf[,1:3], vcdf[,429]))
newtemp<-na.exclude(tempdf)
newtemp[,2]<-factor(newtemp[,2])
groupmean<-tapply(newtemp[,4], newtemp[,2], mean)
newmark<-factor(groupmean, exclude=(groupmean==0 | groupmean==1))
newmark
This is what the output i...
2009 Sep 18
0
Error: length(f1) == length(f2) is not TRUE (fwd)
...y the first used
2: In P1L55:family :
numerical expression has 390 elements: only the first used
My design is a very unbalanced one. Do you think that can be the problem?
--On 18 September 2009 09:11 -0700 William Dunlap <wdunlap at tibco.com> wrote:
> Look at the output of summary(vcdf) and make sure
> that 'family' and 'P1L55' columns are factors. Perhaps
> columns 4:13 did not include them.
>
> Bill Dunlap
> TIBCO Software Inc - Spotfire Division
> wdunlap tibco.com
>
>> -----Original Message-----
>> From: A Singh [mailto:Aditi....
2009 Jul 28
1
Multiple lmer runs using 2 'for' loops
...t;.", na.strings=NA, strip.white=T)
> attach(vc)
> colms<-(vc)[4:13]
> family<-factor(family)
> for (c in 1:levels(family))
+ {
+ print("Family")
+ print(c)
+ {
+ for (i in 1:length(colms))
+ {
+ print(anova(fit<-lmer(peg.no~1 + (1|c/i), na.action=na.exclude, vcdf)))
+
+ }}}
..and its giving me the following copious errors:
[1] "Family"
[1] 1
Error in model.frame.default(data = vcdf, na.action = na.exclude, formula =
peg.no ~ :
variable lengths differ (found for 'c')
In addition: Warning message:
In 1:levels(family) :
numerical exp...