Displaying 6 results from an estimated 6 matches for "q21".
Did you mean:
21
2011 Nov 20
2
Adding two or more columns of a data frame for each row when NAs are present.
I am fairly new to R and would like help with the problem below. I am
trying to sum and count several rows in the data frame yy below. All works
well as in example 1. When I try to add the columns, with an NA in Q21, I
get as NA as mySum. I would like NA to be treated as O, or igored.
I wrote a function to try to count an NA element as 0, Example 3 function.
It works with a few warnings, Example 4, but still gives NA instead of the
addition when there is an NA in an element.
In Example 6 & 7, I tried u...
2003 Apr 04
3
trellis.graphic in for-loop
...Herry
#XXXXXXXXXXXXXXXXXXXXXX
trellis.device(bg="white")
trellis.par.get("fontsize")->fontsize
fontsize$default<-16
trellis.par.set("fontsize",fontsize)
a<-c(1,2,4,5,4,3,3,3)
b<-c(2,5,1,1,1,3,3,3)
c<-c(3,5,1,2,2,5,5,5)
as.data.frame(cbind(a,b,c))->q21
varnames<-colnames(q21)
i<-9999
for (i in 1:3) {
round(table(q21[,i])/sum(table(q21[,i])),3)*100->z1
as.data.frame.table(table(q21[,i]))->z1
round(z1[,2]/sum(z1[,2]),3)*100->z1[,2]
colnames(z1)<-c(varnames[i],"y")
xnames<-levels(z1[,1])
paste(xnames[1],&q...
2007 Feb 20
0
Standardized residual variances in SEM
...0.0e+00 Q16 <--- G
param17 0.86 0.060 14.3 0.0e+00 Q17 <--- G
param18 0.63 0.059 10.7 0.0e+00 Q18 <--- G
param19 0.75 0.062 12.2 0.0e+00 Q19 <--- G
param20 0.68 0.060 11.4 0.0e+00 Q20 <--- G
param21 0.64 0.068 9.3 0.0e+00 Q21 <--- G
param22 0.63 0.065 9.7 0.0e+00 Q22 <--- G
param23 0.71 0.065 10.9 0.0e+00 Q23 <--- G
param24 0.70 0.052 13.7 0.0e+00 Q24 <--- G
param25 0.41 0.066 6.3 3.4e-10 Q25 <--- G
param26 0.98 0.091 10.8 0.0e+00 Q1 <-->...
2009 Nov 12
1
Transforming a dataframe into a response/predictor matrix
...rfirstname 1213 **@uark.edu ## 10295236 9/3/2008
Xattempts Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18 Q19
1 1 1 1 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 0 1
2 1 1 1 1 1 1 0 1 0 0 1 1 0 0 1 0 0 0 0 1
Q20 Q21 Q22 Q23 Q24 Q25 Q26 Q27 Q28 Q29 Q30 Q31 Q32 Score Form CRSE_GRADE_OFF
1 0 0 0 0 0 0 0 0 0 1 0 0 0 9 E D
2 0 0 0 0 0 0 0 0 0 0 1 1 0 13 G D
Each student took a pre- and post- test indicated by the date under...
2003 Jan 29
1
RODBC sqlSave Error
...cture are after subset
deleted and cause
the error ?
- attr(*, "variable.labels")= Named chr "CUSID" "Welle"
"Arbeitgeberfavorit1" "Aktuelle Bewerbungssituation" ...
..- attr(*, "names")= chr "CUSID" "WELLE" "Q21" "BEWERB" ...
sqlSave(channel,mno.x,verbose=T)
Query: CREATE TABLE mno.x (rownames varchar(255) ,BEWERB double
,MEDIENPR?SENZ double ,GESCHLECHT double )
Error in sqlSave(channel, mno.x, verbose = T) :
[RODBC] ERROR: Could not SQLExecute
>>str(mno.x)
`data.frame...
2012 Apr 13
1
R: Colouring phylogenetic tip labels and/or edges
...<-structure(states$PC, names=states$Species)
names(states)<-tree$tip.label
#MuSSE
diversitree:::argnames.musse(NULL, 3) #number of states
lik<-make.musse(tree, states, 3)
argnames(lik)
#contstrain lambda
lik.base<-constrain(lik, lambda2~lambda1, lambda3~lambda1, mu2~mu1,mu3~mu1,q13~q12,q21~q12,q23~q12,q31~q12,q32~q12)
#find ML point for this model
p<-starting.point.musse(tree, 3)
fit.base<-find.mle(lik.base, p[argnames(lik.base)])
#unconstrained
lik.lambda<-constrain(lik,mu2~mu1,mu3~mu1,q13~q12,q21~q12,q23~q12,q31~q12,q32~q12)
fit.lambda<-find.mle(lik.lambda, p[argnames(...