similar to: filtering out data

Displaying 20 results from an estimated 1000 matches similar to: "filtering out data"

2010 Apr 01
2
Adding regression lines to each factor on a plot when using ANCOVA
Dear R users, i'm using a custom function to fit ancova models to a dataset. The data are divided into 12 groups, with one dependent variable and one covariate. When plotting the data, i'd like to add separate regression lines for each group (so, 12 lines, each with their respective individual slopes). My 'model1' uses the group*covariate interaction term, and so the coefficients
2012 Mar 01
2
identifying a column name correctly to use in a formula
Hi, I have a large matrix (SNPs) that I want to cycle over with logistic regression with interaction terms. I have made a loop but I am struggling to identify to the formula the name of the column in a way which is meaningful to the formula. It errors becasue it is not evaluated proporly. (below is a pilot with only 7 to 33 columns, my actual has 200,000 columns) My attempts: for (i in 7:33)
2010 Aug 10
1
extracting information from an object
I was working on a project involving a linear model, and wanted to extract the standard error of a predictor. I am able to do so, but not in the way I would expect. I would have expected that if a created a model such as Model1 <- lm(y~x,z,d), the object Model1 would contain that information even though it does not print it out when I simply type Model1. I would also have (wrongly)
2009 Aug 28
4
Objects in Views
Hi everyone, I have recently experienced a strange behavior (strange from my knowledge) in rails. In my controllers ''new'' action, I am creating a few instance variables in the following manner : @controllerModel = ControllerModel.new @model1 = Model1.all @model2 = Model2.all in my ''new'' view, I am using the @controllerModel to create the form for new and I
2009 Mar 05
2
Overriding contributed package functions
The "tsdiag" function in the TSA package overrides the "tsdiag" function in the "stats" package. There are a few annoying bugs in the TSA's version of the function so I would like to use the "stats" function but still have access to other TSA functions. I have tried using stats::tsdiag( ) but as long as the TSA package is attached the function from
2006 Oct 08
1
Simulate p-value in lme4
Dear r-helpers, Spencer Graves and Manual Morales proposed the following methods to simulate p-values in lme4: ************preliminary************ require(lme4) require(MASS) summary(glm(y ~ lbase*trt + lage + V4, family = poisson, data = epil), cor = FALSE) epil2 <- epil[epil$period == 1, ] epil2["period"] <- rep(0, 59); epil2["y"] <- epil2["base"]
2001 Sep 08
1
t.test (PR#1086)
Full_Name: Menelaos Stavrinides Version: 1.3. 1 OS: Windows 98 Submission from: (NULL) (193.129.76.90) When model simplification is used in glm (binomial errors) and anova is used two compare two competitive models one can use either an "F" or a "Chi" test. R always performs an F test (Although when test="Chi" the test is labeled as Chi, there isn't any
2006 Nov 17
1
Problems in "plot.lm" with option "which=5"
Hi: I think I found an error in plot.lm with the option which=5, of course I can be wrong , as usually happen, but I had work on it for a while and show it to some other people that work with R, and so far I don't see what I can be interpreting wrong. I also worked over the plot.lm's code and change some lines to get what I call "the right plot", if any body is
2007 Jun 29
1
extracting df and MS values from aov
Dear R users, I would like to extract df and Mean Sq values. I tried several things (e.g., str(model1), names(model1)) but I can't find a way to extract these values. I also tried to search using RSiteSearch. Any help will be appreciated. Thanks Taka, model1<-aov(dv~iv.1*iv.2*iv.3) summary(model1) Df Sum Sq Mean Sq iv.1 1 3.200 3.200
2012 Jun 19
1
Possible bug when using encomptest
Hello R-Help, ----------------------------------------------------------------------------------------------------------------------------------------- Issues (there are 2): 1) Possible bug when using lmtest::encomptest() with a linear model created using nlme::lmList() 2) Possible modification to lmtest::encomptest() to fix confusing fail when models provided are, in fact, nested. I have
2008 Feb 20
1
p-value for fixed effect in generalized linear mixed model
Dear R-users, I am currently trying to switch from SAS to R, and am not very familiar with R yet, so forgive me if this question is irrelevant. If I try to find the significance of the fixed factor "spikes" in a generalized linear mixed model, with "site" nested within "zone" as a random factor, I compare following two models with the anova function:
2012 Aug 22
2
AIC for GAM models
Dear all, I am analysing growth data - response variable - using GAM and GAMM models, and 4 covariates: mean size, mean capture year, growth interval, having tumors vs. not The models work fine, and fit the data well, however when I try to compare models using AIC I cannot get an AIC value. This is the code for the gam model:
2010 Oct 03
5
How to iterate through different arguments?
If I have a model line = lm(y~x1) and I want to use a for loop to change the number of explanatory variables, how would I do this? So for example I want to store the model objects in a list. model1 = lm(y~x1) model2 = lm(y~x1+x2) model3 = lm(y~x1+x2+x3) model4 = lm(y~x1+x2+x3+x4) model5 = lm(y~x1+x2+x3+x4+x5)... model10. model_function = function(x){ for(i in 1:x) { } If x =1, then the list
2011 Nov 18
1
[R-sig-ME] account for temporal correlation
[cc'ing back to r-help] On Fri, Nov 18, 2011 at 4:39 PM, matteo dossena <matteo.dossena at gmail.com> wrote: > Thanks a lot, > > just to make sure i got it right, > > if (using the real dataset) from the LogLikelihood ratio test model1 isn't "better" than model, > means that temporal auto correlation isn't seriously affecting the model? yes. (or
2007 Jan 03
1
problem with logLik and offsets
Hi, I'm trying to compare models, one of which has all parameters fixed using offsets. The log-likelihoods seem reasonble in all cases except the model in which there are no free parameters (model3 in the toy example below). Any help would be appreciated. Cheers, Jarrod x<-rnorm(100) y<-rnorm(100, 1+x) model1<-lm(y~x) logLik(model1) sum(dnorm(y, predict(model1),
2009 Feb 11
2
generalized mixed model + mcmcsamp
Hi, I have fitted a generalized linear mixed effects model using lmer (library lme4), and the family = quasibinomial. I have tried to obtain a MCMC sample, but on calling mcmcsamp(model1, 1000) I get the following error which I don't understand at all: Error in .local(object, n, verbose, ...) : Update not yet written traceback() delivers: 4: .Call(mer_MCMCsamp, ans, object) 3:
2003 Jul 08
2
NLME Fitted Values
Dear List: I am having difficulties with the fitted values at different levels of a multilevel model. My data set is a series of student test scores over time with a total of 7,280 observations, 1,720 students nested witin 60 schools. The data set is not balanced. The model was fit using eg.model.1<-lme(math~year, random=~year|schoolid/childid, data=single). When I call the random
2012 Mar 20
2
anova.lm F test confusion
I am using anova.lm to compare 3 linear models. Model 1 has 1 variable, model 2 has 2 variables and model 3 has 3 variables. All models are fitted to the same data set. anova.lm(model1,model2) gives me: Res.Df RSS Df Sum of Sq F Pr(>F) 1 135 245.38 2 134 184.36 1 61.022 44.354 6.467e-10 *** anova.lm(model1,model2,model3) gives
2009 Dec 18
1
linear contrasts for trends in an anova
Hi everybody, I'm trying to construct contrasts for an ANOVA to determine if there is a significant trend in the means of my groups. In the following example, based on the type of 2x3 ANOVA I'm trying to perform, does the linear polynomial contrast generated by contr.poly allow me to test for a linear trend across groups? doi=data.frame( Group=c( rep(1, 5), rep(2, 5), rep(3, 5),
2011 Sep 15
1
p-value for non linear model
Hello, I want to understand how to tell if a model is significant. For example I have vectX1 and vectY1. I seek first what model is best suited for my vectors and then I want to know if my result is significant. I'am doing like this: model1 <- lm(vectY1 ~ vectX1, data= d), model2 <- nls(vectY1 ~ a*(1-exp(-vectX1/b)) + c, data= d, start = list(a=1, b=3, c=0)) aic1 <- AIC(model1)