similar to: validate function in Design library does not work with small samples

Displaying 20 results from an estimated 900 matches similar to: "validate function in Design library does not work with small samples"

2005 Mar 03
3
creating a formula on-the-fly inside a function
I have a function that, among other things, runs a linear model and returns r2. But, the number of predictor variables passed to the function changes from 1 to 3. How can I change the formula inside the function depending on the number of variables passed in? An example: get.model.fit <- function(response.dat, pred1.dat, pred2.dat = NULL, pred3.dat = NULL) { res <- lm(response.dat ~
2010 May 28
1
Comparing and Interpreting GAMMs
Dear R users I have a question related to the interpretation of results based on GAMMs using Simon Woods package gamm4. I have repeated measurements (hours24) of subjects (vpnr) and one factor with three levels (pred). The outcome (dv) is binary. In the first model I'd like to test for differences among factor levels (main effects only): gamm.11<-gamm4(dv ~ pred +s(hours24), random = ~
2006 May 27
1
Recommended package nlme: bug in predict.lme when an independent variable is a polynomial (PR#8905)
Full_Name: Renaud Lancelot Version: Version 2.3.0 (2006-04-24) OS: MS Windows XP Pro SP2 Submission from: (NULL) (82.239.219.108) I think there is a bug in predict.lme, when a polynomial generated by poly() is used as an explanatory variable, and a new data.frame is used for predictions. I guess this is related to * not * using, for predictions, the coefs used in constructing the orthogonal
2009 Apr 01
3
How to prevent inclusion of intercept in lme with interaction
Dear friends of lme, After so many year with lme, I feel ashamed that I cannot get this to work. Maybe it's a syntax problem, but possibly a lack of understanding. We have growth curves of new dental bone that can well be modeled by a linear growth curve, for two different treatments and several subjects as random parameter. By definition, newbone is zero at t=0, so I tried to force the
2011 Apr 15
1
GLM and normality of predictors
Hi, I have found quite a few posts on normality checking of response variables, but I am still in doubt about that. As it is easy to understand I'm not a statistician so be patient please. I want to estimate the possible effects of some predictors on my response variable that is nº of males and nº of females (cbind(males,females)), so, it would be:
2006 May 30
0
(PR#8905) Recommended package nlme: bug in predict.lme when an independent variable is a polynomial
Many thanks for your very useful comments and suggestions. Renaud 2006/5/30, Prof Brian Ripley <ripley at stats.ox.ac.uk>: > On Tue, 30 May 2006, Prof Brian Ripley wrote: > > > This is not really a bug. See > > > > http://developer.r-project.org/model-fitting-functions.txt > > > > for how this is handled in other packages. All model-fitting in R used =
2011 Oct 21
4
plotting average effects.
hi... i am a phd student using r. i am having difficulty plotting average effects. admittedly, i am not really understanding what each of the commands mean so when i get the error i am not sure where the issue is. here is my code... i will include the points at which there are errors.... > dat2 <- dat3 <- dat > dat2$popc100 <- dat2$popc100 + 1000 >
2005 Dec 14
3
glmmADMB: Generalized Linear Mixed Models using AD Model Builder
Dear R-users, Half a year ago we put out the R package "glmmADMB" for fitting overdispersed count data. http://otter-rsch.com/admbre/examples/glmmadmb/glmmADMB.html Several people who used this package have requested additional features. We now have a new version ready. The major new feature is that glmmADMB allows Bernoulli responses with logistic and probit links. In addition there
2008 Dec 13
2
weird pasting of ".value" when list is returned
could someone explain why the name of FPVAL gets " .value" concatenated onto it when the code below is run and temp is returned. I've been trying to figure this out for too long. It doesn't matter when I put the FPVAL in the return statement. It happens regardless of whether it's first or last. Thanks. f.lmmultenhanced <- function(response, pred1, pred2) {
2004 Jun 16
2
gam
hi, i'm working with mgcv packages and specially gam. My exemple is: >test<-gam(B~s(pred1)+s(pred2)) >plot(test,pages=1) when ploting test, you can view pred1 vs s(pred1, edf[1] ) & pred2 vs s(pred2, edf[2] ) I would like to know if there is a way to access to those terms (s(pred1) & s(pred2)). Does someone know how? the purpose is to access to equation of smooths terms
2013 Jan 22
1
Erro message in glmmADMB
Hello everybody, I am using glmmADMB and when I run some models, I recieve the following message: Erro em glmmadmb(eumencells ~ 1 + (1 | owners), data = pred3, family = "nbinom", : The function maximizer failed (couldn't find STD file) Furthermore: Lost warning messages: Command execution 'C:\Windows\system32\cmd.exe /c
2007 Dec 19
1
library(rpart) or library(tree)
Hi, I have a problem with library (rpart) (and/or library(tree)). I use a data.frame with variables "pnV22" (observation: 1, 0 or yes, no) "JTemp" (mean temperature) "SNied" (summer rain) I used function "rpart" to build a model: library(rpart) attach(data.frame) result <- rpart(pnV22 ~ JTemp + SNied) I got the following tree: n=55518 (50
2012 Mar 19
1
glm: getting the confidence interval for an Odds Ratio, when using predict()
Say I fit a logistic model and want to calculate an odds ratio between 2 sets of predictors. It is easy to obtain the difference in the predicted logodds using the predict() function, and thus get a point-estimate OR. But I can't see how to obtain the confidence interval for such an OR. For example: model <- glm(chd ~age.cat + male + lowed, family=binomial(logit)) pred1 <-
2007 Jun 04
3
Extracting lists in the dataframe $ format
I'm new to R and am trying to extract the factors of a dataframe using numeric indices (e.g. df[1]) that are input to a function definition instead of the other types of references (e.g. df$out). df[1] is a list(?) whose class is "dataframe". These indexed lists can be printed successfuly but are not agreeable to the plot() and lm() functions shown below as are their df$out
2011 Sep 03
2
ROCR package question for evaluating two regression models
Hello All,  I have used logistic regression glm in R and I am evaluating two models both learned with glm but with different predictors. model1 <- glm (Y ~ x4+ x5+ x6+ x7, data = dat, family = binomial(link=logit))model2 <- glm (Y~ x1 + x2 +x3 , data = dat, family = binomial(link=logit))  and I would like to compare these two models based on the prediction that I get from each model: pred1 =
2011 Apr 06
3
ROCR - best sensitivity/specificity tradeoff?
Hi, My questions concerns the ROCR package and I hope somebody here on the list can help - or point me to some better place. When evaluating a model's performane, like this: pred1 <- predict(model, ..., type="response") pred2 <- prediction(pred1, binary_classifier_vector) perf <- performance(pred, "sens", "spec") (Where "prediction" and
2009 Jul 15
1
negative Somers D from Design package
Dear R help My problem is very similar to the analysis detailed here. If we use the mayo dataset provided with the survivalROC package the estimate for Somer's Dxy is very negative -0.56. The Nagelkerke R2 is positive though 0.32. I know there is a difference between explained variation and predictive ability but I am surprised there is usch a difference given that even a non predictive model
2016 Nov 01
2
as.formula("x") error on C stack limit
Dear all, I tried to run as.formula("x") and got an error message "Error: C stack usage 7971120 is too close to the limit" whether x exists or not. This is not the case in as.formula("y"), where "object 'y' not found" is the error message if y not exists, or "invalid formula" error or a formula depending on y. Can anyone confirm this is
2009 Jun 12
1
coupled ODE population model
I'm fairly new to R, and I'm trying to write out a population model that satisfies the following; the system consists of s species, i= 1, 2,...,s network of interactions between species is specified by a (s x s) real matrix, C[i,j] x[i] being the relative population of the "ith" species (0 =< x[i] =< 1, sum(x[i]=1) the evolution rule being considered is as follows;
2006 Aug 04
0
training svm's with probability flag
Hi- I'm seeing some weirdness with svm and tune.svm that I can't figure out- was wondering if anyone else has seen this? Perhaps I'm failing to make something the expected class? Below is my repro case, though it *sometimes* doesn't repro. I'm using R2.3.1 on WindowsXP. I was also seeing it happen with R2.1.1 and have seen it on 2 different machines. data(iris) attach(iris)