similar to: Generating model formulas for all k-way terms

Displaying 20 results from an estimated 300 matches similar to: "Generating model formulas for all k-way terms"

2010 Apr 15
0
[R-pkgs] vcdExtra 0.5-0 is released to CRAN
I'm pleased to announce the release of the vcdExtra package, v. 0.5-0 from R-Forge to CRAN, on its way to a CRAN server near you. vcdExtra was originally designed to serve as a sandbox for introducing extensions of mosaic plots and other visualizations for categorical data, particularly those that apply to (poisson surrogate) loglinear models fitted using glm() and related, generalized
2013 Sep 12
6
declaring package dependencies
I received the following email note re: the vcdExtra package > A vcd update has shown that packages TIMP and vcdExtra are not > declaring their dependence on colorspace/MASS: see > > http://cran.r-project.org/web/checks/check_results_vcdExtra.html But, I can't see what to do to avoid this, nor understand what has changed in R devel. Sure enough, CRAN now reports errors in
2006 Apr 01
1
Nested error structure in nonlinear model
I am trying to fit a nonlinear regression model to data. There are several predictor variables and 8 parameters. I will write the model as Y ~ Yhat(theta1,...,theta8) OK, I can do this using nls() - but "only just" as there are not as many observations as might be desired. Now the problem is that we have a factor "Site" and I want to include a corresponding error
2007 Jan 17
1
Coefficient of determination when intercept is zero
I am curious as to the "lm" calculation of R2 (multiple coefficient of determination, I assume) when intercept is zero. I have 18 data points, two independent variables: First, a model with an intercept: > mod0=lm(Div~Rain+Evap,data=test) > summary(mod0)$r.squared [1] 0.6257541 > cor(predict(mod0),test$Div)^2 [1] 0.6257541 The $r.squared and the result from "cor"
2012 Jan 10
1
importing S3 methods with importFrom
In my own package, I want to use the default S3 method of the generic function lrtest() from the lmtest package. Since I need only one function from lmtest, I tried to use importFrom in my NAMESPACE: importFrom(lmtest, lrtest) However, this fails R CMD check in the examples: Error in UseMethod("lrtest") : no applicable method for 'lrtest' applied to an object of class
2013 Nov 25
4
lmer specification for random effects: contradictory reults
Hi All, I was wondering if someone could help me to solve this issue with lmer. In order to understand the best mixed effects model to fit my data, I compared the following options according to the procedures specified in many papers (i.e. Baayen <http://www.google.it/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDsQFjAA
2011 Jan 06
4
Different LLRs on multinomial logit models in R and SPSS
Hello, after calculating a multinomial logit regression on my data, I compared the output to an output retrieved with SPSS 18 (Mac). The coefficients appear to be the same, but the logLik (and therefore fit) values differ widely. Why? The regression in R: set.seed(1234) df <- data.frame( "y"=factor(sample(LETTERS[1:3], 143, repl=T, prob=c(4, 1, 10))), "a"=sample(1:5,
2009 Jul 28
2
A hiccup when using anova on gam() fits.
I stumbled across a mild glitch when trying to compare the result of gam() fitting with the result of lm() fitting. The following code demonstrates the problem: library(gam) x <- rep(1:10,10) set.seed(42) y <- rnorm(100) fit1 <- lm(y~x) fit2 <- gam(y~lo(x)) fit3 <- lm(y~factor(x)) print(anova(fit1,fit2)) # No worries. print(anova(fit1,fit3)) # Likewise. print(anova(fit2,fit3)) #
2011 Mar 23
2
system.file() to read a text file from a vignette
[Env: R 2.12.2, WinXp] In a vignette for the vcdExtra package, I had a text file, tv.dat under data/, that I used in the vignette as <<tv1,results=verbatim>>= tv.data<-read.table(system.file("data","tv.dat",package="vcdExtra")) head(tv.data,5) @ I was told that this now generates a warning for non-Rdata files in R CMD check. But I'm now
2007 Dec 24
1
curve fitting problem
I'm trying to fit a function y=k*l^(m*x) to some data points, with reasonable starting value estimates (I think). I keep getting "singular matrix 'a' in solve". This is the code: ox <- c(-600,-300,-200,1,100,200) ir <- c(1,2.5,4,9,14,20) model <- nls(ir ~ k*l^(m*ox),start=list(k=10,l=3,m=0.004),algorithm="plinear") summary(model) plot(ox,ir) testox <-
2000 Aug 01
0
anova() on three or more objects behaves inconsistently (PR#621)
anova() on three or more objects behaves inconsistently in R. In R anovalist.lm does a sequential ANOVA using pairwise F tests, ignoring all the other objects, so the larger of the two models provides the denominator. In S anova.lmlist uses the denominator from the largest model (smallest residual df) in the set, as does anova.glmlist in both. I suggest that R's anovalist.lm is wrong (that
2013 Nov 25
0
R: lmer specification for random effects: contradictory reults
Dear Thierry, thank you for the quick reply. I have only one question about the approach you proposed. As you suggested, imagine that the model we end up after the model selection procedure is: mod2.1 <- lmer(dT_purs ~ T + Z + (1 +T+Z| subject), data =x, REML= FALSE) According to the common procedures specified in many manuals and recent papers, if I want to compute the p_values relative to
2013 Mar 02
3
print method like print.anova()
I have a print method for a set of statistical tests, vcdExtra::CMHtest, for which I'd like to have more sensible printing of pvalues, as in print.anova(). [Testing this requires the latest version of vcdExtra, from R-Forge **|install.packages("vcdExtra", repos="http://R-Forge.R-project.org")|** ] With my current print method, I get results like this, but all Prob values
1998 Oct 21
0
anovalist.lm or anova.lmlist?
In R, we currently have the functions anovalist.lm and anova.glmlist S / S-plus has anova.lmlist anova.glmlist On the other hand, the [n]lme package (library) of Doug Bates and Jose Pinheiro has an "lmList" class and an anova.lmList(.) method for that. We are considering to use anovalist.lm and anovalist.glm instead of the S/S-plus names mentioned above. These functions
2010 Dec 16
1
defining a formula method for a weighted lm()
In the vcdExtra package on R-Forge, I have functions and generic methods for calculating log odds ratios for R x C x strata tables. I'd like to define methods for fitting weighted lm()s to the resulting loddsratio objects, but I'm having problems figuring out how to do this generally. # install.packages("vcdExtra", repos="http://R-Forge.R-Project.org")
2010 Feb 28
1
trend test for frequencies
Hi, which test do I have to use if I want to test if the following data follow a monotone trend; 0min 5min 10min 20min 30min 5 20 55 70 90 ... where the dependent variable contains frequencies. And how is that implemented in R? thanks for any help (on this more statistical-question ...).
2010 Nov 30
1
warning creating an as.array method in a package
[Env: R 2.11.1, Win Xp, using Eclipse/StatET] In a package I'm working on, I want to create as.matrix() and as.array() methods for a particular kind of object (log odds ratios). These are returned in a loddsratio object as the $coefficients component, a vector, but really reflect an underlying (R-1)x(C-1)xstrata array, whose attributes are contained in other components. I define coef,
2010 Mar 01
0
MASS::loglm - exploring a collection of models with add1, drop1
I'd like to fit and explore a collection of hierarchical loglinear models that might range from the independence model, ~ 1 + 2 + 3 + 4 to the saturated model, ~ 1 * 2 * 3 * 4 I can use add1 starting with a baseline model or drop1 starting with the saturated model, but I can't see how to get the model formulas or terms in each model as a *list* that I can work with further. Consider
2007 Sep 19
1
lmer using quasibinomial family
Dear all, I try to consider overdispersion in a lmer model. But using family=quasibinomial rather than family=binomial seems to change the fit but not the result of an anova test. In addition if we specify test="F" as it is recomanded for glm using quasibinomial, the test remains a Chisq test. Are all tests scaled for dispersion, or none? Why is there a difference between glm and lmer
2006 Jan 10
2
Obtaining the adjusted r-square given the regression coefficients
Hi people, I want to obtain the adjusted r-square given a set of coefficients (without the intercept), and I don't know if there is a function that does it. Exist???????????????? I know that if you make a linear regression, you enter the dataset and have in "summary" the adjusted r-square. But this is calculated using the coefficients that R obtained,and I want other coefficients