similar to: GLM and normality of predictors

Displaying 20 results from an estimated 2000 matches similar to: "GLM and normality of predictors"

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
2009 Feb 27
1
testing two-factor anova effects using model comparison approach with lm() and anova()
I wonder if someone could explain the behavior of the anova() and lm() functions in the following situation: I have a standard 3x2 factorial design, factorA has 3 levels, factorB has 2 levels, they are fully crossed. I have a dependent variable DV. Of course I can do the following to get the usual anova table: > anova(lm(DV~factorA+factorB+factorA:factorB)) Analysis of Variance Table
2003 Apr 25
1
validate function in Design library does not work with small samples
Hi, I am using the validate function in the design library to get corrected Somer's Dxy for cox ph models. When my sample size is reduced from 300 to 150, the function complains (length of dimnames[1] not equal to array) and does not produce any results. There are no missing values in the data. Any suggestions for a work-around? Thank you in Advance. >
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 >
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
2012 Nov 05
1
Post hoc tests in gam (mgcv)
Hi. I'm analysing some fish biological traits with a gam in mgcv. After several tries, I got this model log(tle) = sexcolor + s(doy, bs = "cc", by = sexcolor) +log(tl) sexcolor is a factor with 4 levels doy is "day of year", which is modeled as a smoother tl is "total length of the fish" The summary of this models is (only parametric coefficientes): Parametric
2018 Jan 09
3
barplot_add=TRUE
Dear R users aim Barplot of insect trap catches (y variable trapcatch) at one specific station (variable FiBL_Hecke) from week 1-52 ( x variable week). It works well using the function tapply (sum trapcatch per week, males and females not separated), however, I intend to separate the y variable trapcatch in males and females (variable m_w: m and w) problem I used the function "add" to
2011 Feb 15
1
quick question about binary data
Dear all,This is both an R and a statistics question. I want to test whether males and females of a given species tend to co-occur in a given sampling unit more frequently than expected by chance. I'm thinking about using a binomial distribution with p as the sex ratio of the entire population. So, even though the population sex ratio is close to 50:50, each sampling unit would have
2008 Feb 06
1
Nested ANOVA models in R
Hi, I'm trying to work through a Nested ANOVA for the following scenario: 20 males were used to fertilize eggs of 4 females per male, so that female is nested within male (80 females used total). Spine length was measured on 11 offspring per family, resulting in 880 measurements on 80 families. I used the following two commands: summary(aov(Spinelength ~ Male*Female)) and
2005 Mar 22
1
List of tables rather than an extra dimension in the table or (l)apply(xtabs)
I'm not sure how to best explain what I am after but here goes. I have a data frame with 2 geographical factors. One is the major region the other is the component regions. I am trying to process all the regions at the same time without using "for". So I need (think, I do) a list of matrices each structured according to the number of subregions within each region. So is there a
2012 Oct 05
1
Error in lmer: asMethod(object) : matrix is not symmetric [1, 2]
Dear R Users, I am having trouble with lmer. I am looking at recombinant versus non recombinant individuals. In the response variable recombinant individuals are coded as 1's and non-recombinant as 0's. I built a model with 2 fixed factors and 1 random effect. Sex (males/females) is the first fixed effect and sexual genotype (XY, YY, WX and WY) the second one. Sexual Genotype is
2006 Jul 18
1
Classification error rate increased by bagging - any ideas?
Hi, I'm analysing some anthropometric data on fifty odd skull bases. We know the gender of each skull, and we are trying to develop a predictor to identify the sex of unknown skulls. Rpart with cross-validation produces two models - one of which predicts gender for Males well, and Females poorly, and the other does the opposite (Females well, and Males poorly). In both cases the error
2018 Jan 09
0
barplot_add=TRUE
Hi, Sibylle, since you write '"mathematically" add', does barplot(rbind(m$trapcatch, w$trapcatch)) do what you want (modulo layout details)? Hth -- Gerrit --------------------------------------------------------------------- Dr. Gerrit Eichner Mathematical Institute, Room 212 gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen Tel:
2004 Aug 05
1
cross random effects (more information abuot the data)
Dear friends, I have asked last few days about cross-random effects using PQL, but I have not receive any answer because might my question was not clear. My question was about analysing the salamander mating data using PQL. This data contain cross-random effects for (male) and for (female). By opining MASS and lme library. I wrote this code sala.glmm <- glmmPQL(fixed=y~WSf*WSM,
2004 May 16
1
Newbie Poisson regression question
Greetings. I'm getting started learning R, and I'm trying to reproduce some models I've done previously in SAS. I'm trying to fit simple Poisson regressions, and I keep getting impossible results: the models predict negative numbers of cases for many observations. The code for the models are: Female.model <- glm(Observed ~ Black + Other, family = poisson(link=log),
2010 Mar 11
2
as.integer and indexes error
Hello All, I would like to report the following bug or maybe you can explain if I am wrong. I am sampling from two different populations with weights. The two populations have the same age groups and I want to distinguish where I am sampling from. That is why I am using a matrix such as: matrix age.group Male Females Weight.Males Weight.Females 1 1.1