Displaying 3 results from an estimated 3 matches for "gtemp".
Did you mean:
temp
2011 May 12
3
Help with "apply"
Hello R gurus,
I have a simple routine using for loops that i was just trying to make it
faster
y <- rnorm(10)
Nindiv <- 10
x <-matrix(sample(c(0:2),50,re = T),10)
gtemp <- rnorm(10)
ycorr <- array(0,c(Nindiv,1))
for (i in 1:Nindiv) {
for (k in 1:ncol(x)) {
ycorr[i] <- y[i] - x[i,k]*gtemp[k]
}
}
It works fine but I wanted to make it faster and I think an apply function
could probably solve this problem.
Any suggestions? Thanks
--
View this message in...
2009 Sep 01
1
understanding the output from gls
..."? At first, I thought that this was
describing possible correlations among the predictor variables, but then I
saw that it also included the model intercept. What do these correlation
value mean?
##More detailed information
##function calls:
sppl.i.xx = gls(all.all.rch~l10area+newx, data = gtemp, method="ML")
sppl.i.ex = gls(all.all.rch~l10area+newx, data = gtemp, method="ML",
correlation = corExp(c(20,.8), form=~x+y|area, nugget=TRUE))
##model summaries
> summary(sppl.i.xx)
Generalized least squares fit by maximum likelihood
Model: all.all.rch ~...
2009 Sep 22
1
odd (erroneous?) results from gls
...of 559.2, it seems that gls believes it has estimated 6
parameters in the fitting process. Again, is this an error in gls, or an
error on my part?
Copied from R terminal:
>
> summary(sppl.i.ex)
Generalized least squares fit by maximum likelihood
Model: all.all.rch ~ l10area + newx
Data: gtemp
AIC BIC logLik
559.167 575.7911 -273.5835
Correlation Structure: Exponential spatial correlation
Formula: ~x + y | area
Parameter estimate(s):
range nugget
15.4448835 0.3741476
Coefficients:
Value Std.Error t-value p-value
(Intercept) 7.621306 0.764813...