search for: generalised

Displaying 20 results from an estimated 403 matches for "generalised".

2009 Oct 15
2
plotting/examining residuals of a mixed generalised linear model
Dear R users, I'm hoping that more experienced users will be able to assist me in examining the model fit of a mixed generalised linear model. The example using the data 'bacteria' within the MASS package will hopefully illustrate what I would like to acheive; library(MASS) library(nlme) attach(bacteria) # y being output and the trt - treatment group being an explanatory variable. There is pseudoreplication as each...
2005 Oct 21
1
Generalised rbind/cbind
Dear list, Is there a generalised form of rbind/cbind for combining matrices/arrays into higher-D structures? ie. if I have: a <- matrix(2,2,2) b <- matrix(3,2,2) how can I get array(rep(c(3,2), each=4), c(2,2,2)) ? It seems like this would be the job of a generalised abind function: abind(a,b, along=1) == rbind(a,b) ab...
2008 Sep 23
1
Generalising to n-dimensions
Hi R-helpers, I have two queries relating to generalising to n dimensions: What I want to do in the first one is generalise the following statement: expand<-expand.grid(1:x[1],1:x[2],...1:x[n]) where x is a vector of integers and expand.grid gives every combination of the set of numbers, so for example, expand.grid(1:2, 1:3) takes 1,2 and 1,2,3 and gives 1,1 2,1 1,2 2,2 1,3 2,3 My x
2011 Apr 11
3
multiple comparisons with generalised least squares
...searched this forum for an answer to this question, but I could only found someone with the same question which remained unanswered. I hope someone can provide an answer now! Many thanks in advance! Sandy -- View this message in context: http://r.789695.n4.nabble.com/multiple-comparisons-with-generalised-least-squares-tp3441513p3441513.html Sent from the R help mailing list archive at Nabble.com.
2013 Jun 26
0
Generalised Linear models in R-Studio
Hello, I would like some help with my Generalised Linear Model in R-Studio I am a little confused about what family to use and for my data My outcome variable (response) is categories 0,1,2,3 but my data i dont have any individuals that have fallen into the top group "3" What i have read about Generalised Models is that Biomial data...
2010 Dec 14
2
Use generalised additive model to plot curve
Readers, I have been reading 'the r book' by Crawley and think that the generalised additive model is appropriate for this problem. The package 'gam' was installed using the command (as root) install.package("gam") ... library(gam) > library(gam) Loading required package: splines Loading required package: akima > library(mgcv) This is mgcv 1.3-25 Attachi...
2010 Jun 22
1
Generalised Estimating Equations on approx normal outcome with limited range
...ures are all calculated from survey answers and by definition have limited ranges (e.g. -5 to +5), though within the range they are approximately normally distributed (with ~50 levels). One aim of the analysis is to assess whether the measures are related to certain covariates, and I have tried the generalised estimating equation function geeglm (library geepack) with the 'gaussian' family details like so: geeout <- geeglm(outcome ~ covariate1 + covariate2, id=familyID, family=gaussian, data=dat, corstr="unstructured") But I'm thinking that the limited range of the outcome violat...
2009 Apr 12
0
Generalised Rejection Sampling
Hi, I am trying to figure out the observed acceptance rate and M, using generalised rejection sampling to generate a sample from the posterior distribution for p. I have been told my code doesn't work because I need to "take the log of the expression for M, evaluate it and then exponentiate the result." This is because R is unable to calculate high powers such a...
2008 Feb 12
1
Finding LD50 from an interaction Generalised Linear model
Hi, I have recently been attempting to find the LD50 from two predicted fits (For male and females) in a Generalised linear model which models the effect of both sex + logdose (and sex*logdose interaction) on proportion survival (formula = y ~ ldose * sex, family = "binomial", data = dat (y is the survival data)). I can obtain the LD50 for females using the dose.p() command in the MASS library with dose...
2023 Apr 21
1
Generalised piping into operators
Thanks, this makes sense. Is there a similar precedence reasoning behind why operator functions (`+` etc) can't be piped into? On Fri, Apr 21, 2023 at 11:52?PM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 21/04/2023 4:35 a.m., Michael Milton wrote: > > I just checked out R-devel and noticed that the new "pipe extractor" > > capability coming in 4.3
2023 Apr 21
1
Generalised piping into operators
On 21/04/2023 11:33 a.m., Michael Milton wrote: > Thanks, this makes sense. Is there a similar precedence reasoning behind > why operator functions (`+` etc) can't be piped into? Yes: > identical(quote(1 + 1), quote(`+`(1, 1))) [1] TRUE Duncan Murdoch
2023 Apr 21
1
Generalised piping into operators
I'm afraid I don't understand. I know that parsing `+`(1, 1) returns a result equivalent to `1 + 1`, but why does that impose a restriction on parsing the pipe operator? What is the downside of allowing arbitrary RHS functions? [[alternative HTML version deleted]]
2005 Mar 07
1
generalised linear models
To whom this may concern, I would be very grateful if someone could give me some advice on where I am going wrong with a logistic regression I am trying to run. I am trying to run a logistic regression on an aggregated data set and have input the command: logistic.mod<-glm(x~Frequency+Location+Sex+Age.Group,family=binomial(link="logit"),data=earsag1.dat) where x is the count of my
2023 Apr 21
1
Generalised piping into operators
I just checked out R-devel and noticed that the new "pipe extractor" capability coming in 4.3 only works for the 4 extractor operators, but no other standard operators like +, *, %*% etc, meaning that e.g. mtcars |> as.matrix() |> _ + 1 |> colMeans() is a syntax error. In addition, we are still subject to the restriction that the functions on the RHS of a pipe can't have
2006 Jan 23
2
Master's project to coerce linux nvidia drivers to run generalised linear models
Hi, I am working with a friend on a master's project. Our laboratory does a lot of statistical analysis using the R stats package and we also have a lot of under-utilised nvidia cards sitting in the back of our networked linux machines. Our idea is to coerce the linux nvidia driver to run some of our statistical analysis for us. Our first thought was to specifically code up a version of
2023 Apr 21
2
Generalised piping into operators
On 21/04/2023 12:16 p.m., Michael Milton wrote: > I'm afraid I don't understand. I know that parsing `+`(1, 1) returns a > result equivalent to `1?+ 1`, but why does that impose a restriction on > parsing the pipe operator? What is the downside of allowing arbitrary > RHS functions? I thought the decision to exclude "_ + 1" happens after enough parsing has
2023 Apr 21
1
Generalised piping into operators
On 21/04/2023 4:35 a.m., Michael Milton wrote: > I just checked out R-devel and noticed that the new "pipe extractor" > capability coming in 4.3 only works for the 4 extractor operators, but no > other standard operators like +, *, %*% etc, meaning that e.g. mtcars |> > as.matrix() |> _ + 1 |> colMeans() is a syntax error. In addition, we are > still subject to
2010 May 12
6
A primitive OO in R -- where next?
Greetings All, Out of curiosity, I've just done a very primitive experiment: Obj <- list(Fun=sum, Dat=c(1,2,3,4)) Obj$Fun(Obj$Dat) # [1] 10 That sort of thing (much more sophisticated) must be documented mind-blowingly somewhere. Where? Where I stand right now: The above (and its immediately obvious generalisations, like Obj$Fun<-cos) is all I know about it so far. Ted.
2012 Mar 29
1
Data handling/optimum glm method.
Hi there, I am trying to fit a generalised linear model to some loan application and default data. The purpose of this is to eventually work out the probability an applicant will default. However, R seems to crash or die when I run "glm" on anything greater than a 5-way saturated model for my data. My first question: is the best...
2019 Oct 11
7
New matrix function
Hi All, I was looking for a function to find a small matrix inside a larger matrix in R similar to the one described in the following link: https://www.mathworks.com/matlabcentral/answers/194708-index-a-small-matrix-in-a-larger-matrix I couldn't find anything. The above function can be seen as a "generalisation" of the "which" function as well as the function described