Displaying 3 results from an estimated 3 matches for "yrep".
Did you mean:
grep
2008 Nov 22
1
Need some help in R programming code
...s[-1]
r3<- (r[-n]^3*s2[-n]*s[-n])/s[-1]
U <- cbind(r[-n],r2,r3)
U <- cbind(1,U)
U <- U/matrix(s[-1],nr=nrow(U),nc=ncol(U))
Fstat<-summary(lm(u~U-1))$fstatistic[1]
Fstat
}
sim.gjr <- function(par,y,X=0,Z=0)
{
n <- length(y)
e<-numeric(n)
yrep<-numeric(n)
yrep[1] <- y[1]
n.dummies.mean <- dim(X)[2]
if(is.matrix(X)) e[1] <- e[1]-sum(X[1,]*par[9:(8+n.dummies.mean)])
delta <- par[-(1:(8+n.dummies.mean))]
s2 <- var(y)
for(i in 2:n){
s2 <-
par[5]+par[6]*e[i-1]^2+par[7]*ifelse(e[i-1]<0,1,0)...
2008 Nov 23
0
why this function give error message
...t;- (r[-n]^3*s2[-n]*s[-n])/s[-1]
U <- cbind(r[-n],r2,r3)
U <- cbind(1,U)
U <- U/matrix(s[-1],nr=nrow(U),nc=ncol(U))
Fstat<-summary(lm(u~U-1))$fstatistic[1]
Fstat
}
sim.gjr <- function(par,y,X=0,Z=0)
{
n <- length(y)
e<-numeric(n)
yrep<-numeric(n)
yrep[1] <- y[1]
n.dummies.mean <- dim(X)[2]
if(is.matrix(X)) e[1] <- e[1]-sum(X[1,]*par[9:(8+n.dummies.mean)])
delta <- par[-(1:(8+n.dummies.mean))]
s2 <- var(y)
for(i in 2:n){
s2 <-
par[5]+par[6]*e[i-1]^2+par[7]*ifelse(e[i-1]<0,1,0...
2008 Jul 06
2
lattice question
I'm creating a lattice barchart based off a pretty complicated data
structure. The barchart comes out quite nice ( thanks
to lattice ) but the problem is that the horizontal axis comes out all
scrunched because the barchart doesn't know that the intervals
of Var.1 are really "associated" with the conditioning variable Var.2.
Therefore, all the intervals of Var.1 are put on