Displaying 4 results from an estimated 4 matches for "probt".
Did you mean:
probe
2010 Mar 17
3
Are loops handled differently in newer versions of R?
..., 0.44, 0.35)
lab8.dat<-data.frame(locn, n, corr.r)
lab8.dat
attach(lab8.dat)
#write the function
calc.prob.t<-function(n, r)
#given a sample size (n) and correlation coefficient (r), returns the
probability for that test
{
df<-n-2
t<-(r-0)/(sqrt((1-r2)/df))
probt<-2*(pt(t, df, lower.tail=FALSE))
probt
}
#try out the function...
calc.prob.t(lab8.dat$n[1], lab8.dat$corr.r[1])
#it works.
#write a loop to implement that function for every correlation in your
dataset...
p_unadj<-numeric(length(lab8.dat[,1]))
p_unadj<-NULL
p_unadj
#all th...
2007 May 23
0
Replicated LR goodness-of-fit tests, heterogeneity G, with loglm?
...ghts)
#Now the pooled G
obs =
tapply(obscounts,cov,sum)
exp =
expproppooled*sum(obs)
Gp =
2*sum(obs*log(obs/exp))
dfp = max(as.integer(levels(cov)))-1
probp = pchisq(Gp,
dfp, lower.tail=F)
#total G
Gt = sum(G)
dft = sum(dfs)
probt = pchisq(Gt,
dft, lower.tail=F)
#heterogeneity G
Gh = Gt-Gp
dfh = dft - dfp
probh = pchisq(Gh,
dfh, lower.tail=F)
#F ratio
Fratio =
(Gp/dfp)/(Gh/dfh)
probf = pf(Fratio,
dfp, dfh, lower.tail=F)
res = list(TotG=c(Gt, dft, probt), PooledG=c...
2007 Feb 24
0
Multiple comparisons when interacction]
...eat year block;
model yield=block year treat treat*year;
lsmeans year treat /pdiff;
lsmeans treat*year /slice=year pdiff;
ods output diffs=dos;
run;
data tres;
set dos;
if year=_year;
proc print data=tres;
var year _year treat _treat estimate stderr df tvalue probt;
run;
Data are attached as a file: data.csv.
In fact, I do not know if this is the best approach to analyze the data:
- Should block be considered as random? We use the same file and
randomization every year. We are interested in the long term effect of the
treatment.
- Data should be considered...
2007 Jan 29
3
Multiple comparisons when interacction
In the model:
lm.1 <- lm(variable ~ BLOC + TIL * YEAR , data=selvanera)
I found TIL*YEAR interaction significant. Then I am trying to compare
means of the different levels of TIL inside every YEAR using:
mc.2 <- glht(lm.1, linfct = mcp(TIL*YEAR="Tukey"))
summary(mc.2, test = univariate())
but it does not work.
There is any way of doing this, like the SLICE option in