Prediction intervals in GAM models can be problematic. For logistic regression, for example, the y values are 0 or 1, and the interval would be one of: [0, 1] [0] [1] One approach is to generate rand
I would do it inductively: start with the answer for 1, create answer for k+1 from answers for 1, 2, ... k. You could also do it recursively, but if you're not careful in programming it could get ex
In addition to showing multiple R^2, the plot of residuals vs fitted can show lack of fit that doesn't show up in plots of y or residuals against individual x's. Here's an example: n = 200 set.seed(0
Sorry, I misread the question. The "Response vs fitted" plot also shows the lack of fit, (though not as well as does the residuals vs fitted plot). Tim
One approach: groupMeans(data[1:60], paste(data$a, data$b, data$c, data$d)) assuming the continuous variables are in columns 1 to 60 and categorical variables named a, b, c, d. This would not give av
The problem turned out to be forgetting to use first=T when loading the resample library. Hence the ordinary version of mean was used, instead of the version from the resample library (that supports
Try the function groupMeans() from the S+Resample library. Download info below. That computes all group means; you could then subscript to get only the rows that had repeated values of ID; e.g. group
First, the limits.bca function should not be used when bootstrapping residuals. The calculations done by limits.bca assume that the order of the data being resampled does not matter; that is expressl
You could use a combination of paste() (to create a text string to evaluate) eval(parse(text="the command")) (to evaluate the string) e.g. if your vector is c("a", "b") you want: eval(parse(text="dat
Either `grep' or `regexpr'. In some versions of S+ `grep' is platform-dependent. From help(grep): grep calls the regexpr function, which uses a pattern matching language (resembling the SunOS grep co
I recommend either * doing the theoretical computations; not difficult using cumulants (below). * use saddlepoint approximations, if the cumulant generating function is tractable. This is much more a
The bootstrap function in S+Resample lets you bootstrap arrays with arbitrarily many dimensions. That code could be adapted for your purpose. Here are pieces of the code (from resampMakeFunc) that gi
The new version of the resample library requires S+7.0 or later, because anyMissing() and other functions which were formerly in the library are now part of S+7.0. Tim Hesterberg == == Download the S