Displaying 20 results from an estimated 10000 matches similar to: "Defining factors in GLM"
2008 Jan 02
2
Multivariate response methods question
Hi Everyone,
I have some data that predicts both a nominal and ordinal response
variable. I was wondering what packages in R would help me analyze the
data?
I was also curious if anyone could recomend me some textbooks that
would help with the analysis of such data? I have the 5th edition of
"Applied Multivariate Statistical Analysis" by Richard A. Johnson and
Dean W. Wichern
2006 May 12
3
Maximum likelihood estimate of bivariate vonmises-weibulldistribution
Thanks Dimitris!!! That's much clearer now. Still have a lot of work to
do this weekend to understand every bit but your code will prove very
useful.
Cheers,
Aziz
-----Original Message-----
From: Dimitrios Rizopoulos [mailto:Dimitris.Rizopoulos at med.kuleuven.be]
Sent: May 12, 2006 4:35 PM
To: Chaouch, Aziz
Subject: RE: [R] Maximum likelihood estimate of bivariate
2008 Apr 09
4
apply lm() for all the columns of a matrix
Hi all,
My question is not really urgent. I can write a loop and solve the
problem. But I know that I'll be in a similar situation many more times so
it would be useful to find out the answer
Is there a fast way to perform linear fit to all the columns of a matrix?
(or in the one dimension of a multi-dimensional array.) I'm talking about
many single linear fits, not about a multiple fit.
2007 Feb 23
1
Bootstrapping stepAIC() with glm.nb()
Dear all,
I would like to Boostrap the stepAIC() procedure from package MASS for
variety of model objects, i.e.,
fn <- function(object, data, B = 2){
n <- nrow(data)
res <- vector(mode = "list", length = B)
index <- sample(n, n * B, replace = TRUE)
dim(index) <- c(n, B)
for (i in 1:B) {
up.obj <- update(object, data = data[index[, i], ])
2005 Sep 25
2
getting variable length numerical gradient
Hi all.
I have a numerical function f(x), with x being a vector of generic
size (say k=4), and I wanna take the numerically computed gradient,
using deriv or numericDeriv (or something else).
My difficulties here are that in deriv and numericDeric the function
is passed as an expression, and one have to pass the list of variables
involved as a char vector... So, it's a pure R programming
2007 May 20
2
Number of NA's in every second column
Hi R-users,
How do I calculate a number of NA's in a row of every second column in my
data frame?
As a starting point:
dfr <- data.frame(sapply(x, function(x) sample(0:x, 6, replace = TRUE)))
dfr[dfr==0] <- NA
So, I would like to count the number of NA in row one, two, three etc. of
columns X1, X3, X5 etc.
Thanks in advance
Lauri
[[alternative HTML version deleted]]
2006 Mar 02
2
'...' passed to both plot() and legend()
Dear R-devels,
I'd like to create a plot method for a class of objects that passes
the '...' argument to both plot() and legend(), e.g.,
x <- list(data = rnorm(1000))
class(x) <- "foo"
plot.foo <- function(x, legend = FALSE, cx = "topright", cy = NULL,
...){
dx <- sort(x$data)
plot(dx, dnorm(dx), type = "l", ...)
if (legend)
2006 Nov 09
4
Plotting symbols with two positions?
Thanks a lot to Demitris for a prompt answer some minutes ago on another
tread (see below). To avoid excess mails on the list, I move onto next
question:
I have another small plotting problem that confuses me. I want to plot
results from a field trial series, using the numbers of the trials as
symbols in the plot.
pch = as.character(trial_no)
works fine, but truncates the trial number to the
2005 Nov 14
1
Little's Chi Square test for MCAR?
Hi.
Can anyone point me to any module in R which implements "Little's Chi
Square test" for MCAR.
The problem is that i have around 60 behavioural variables on a 6 point
categorical scale which i need to test for MCAR and MAR. What i can make
out from preliminary analysis is that moderate (0.30 to 0.60)
correlations may be present in several variable pairs leading me to
suspect
2006 Jun 16
3
Vector Manipulation
I have a vector that has 1,974 elements and each element is one of the
following (B, F, N, Y). How do I recreate that vector accept in the
place of N put 0 and in the place of B, F or Y put a 1?
Thanks,
Jacob
[[alternative HTML version deleted]]
2006 Aug 10
1
help with structuring random factors using lmer()
Hi,
I am an R beginner and having problems structuring my REML models. I have
a model with
y=weight
x1=time
x2=timesquared
id=individual identity
I need to structure the model such that in the random effects there is a
constant intercept for all individuals but a separate individual slope for
both x1 and x2 (a coefficient score for every individual).
2005 Sep 12
1
poisson mean hypothesis
Dear R-users,
Is there a way to get p-values for a one-sided hypothesis test about a
poisson mean?
Thanks,
Jan Wijffels
University Center for Statistics
W. de Croylaan 54
3001 Heverlee
Belgium
tel: +32 (0)16 322784
fax: +32 (0)16 322831
<http://www.kuleuven.be/ucs> http://www.kuleuven.be/ucs
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
[[alternative HTML version
2005 Nov 28
6
How define global Variable?
Hello,
I try to define a global variable.
My example:
R> a <- "old"
R> test <- function () { a <- "new" }
R> test()
R> a # shoud be "new"
This doesn't work. I would like to modify the variable "a" in a
procedure. How can I do that.
Thank you for helping.
Sven Kn侟ppel (Germany-Berlin)
2007 Jan 21
5
Integration + Normal Distribution + Directory Browsing Processing Questions
Hi everyone,
I am new to R, but it's really great and helped me a lot!
But now I have 2 questions. It would be great, if someone can help me:
1. I want to integrate a normal distribution, given a median and sd.
The integrate function works great BUT the first argument has to be a
function
so I do integrate(dnorm,0,1) and it works with standard m. and sd.
But I have the m and sd given.
2006 Apr 18
2
get the parameter estimates from lm model
R-help,
Sorry for posting the same question (almost) once again.
I'm using a lm model for some data.
The code is below:
fitData <- glm(pm ~ age + mw , family = binomial(link = logit), maxit =
30, data = inputModel1)
"age" is a factor and "mw" is a continous variable.
The summary function does not provide the parameter estimates for
the first level of the
2007 May 09
2
pvmnorm, error message
Hello there!
My operating system is Windows XP, my version of R is the latest (R-2.5.0). Recently I have downloaded the package "mvtnorm" and a problem with the command "pmvnorm" occured. Trying to enter the lines ...
A <- diag(3)
A[1,2] <-0.5
A[1,3] <- 0.25
A[2,3] <- 0.5
pvmnorm(lower=c(-Inf,-Inf,-Inf), upper=c(2,2,2),mean = c(0,0,0), corr=A)
I got the following
2007 Feb 22
3
List filtration
Hello R-ologists,
Imagine you have a list "list" like so:
>list
[[1]]
[1] "IPI00776145.1" "IPI00776187.1"
[[2]]
[1] "Something" "IPI00807764.1" "IPI00807887.1"
[[3]]
[1] "IPI00807764.1"
[[4]]
[1] "Somethingelse"
What I need to achieve is a filtered list "list2" like so:
>list2
[[1]]
[1]
2008 Jul 16
4
Likelihood ratio test between glm and glmer fits
Dear list,
I am fitting a logistic multi-level regression model and need to test the difference between the ordinary logistic regression from a glm() fit and the mixed effects fit from glmer(), basically I want to do a likelihood ratio test between the two fits.
The data are like this:
My outcome is a (1,0) for health status, I have several (1,0) dummy variables RURAL, SMOKE, DRINK, EMPLOYED,
2005 Nov 04
2
Simplify iterative programming
Dear,
I am looking for the simplification of a formula to improve the
calculation speed of my program. Therefore I want to simplify the
following formula:
H = sum{i=0..n-1 , [ sum {j=0..m-1 , sqrt ( (Ai - Bj)^2 + (Ci -
Dj)^2) } ] }
where:
A, C = two vectors (with numerical data) of length n
B, D = two vectors (with numerical data) of length m
sqrt = square root
Ai = element of A with index
2008 Jun 17
5
How to control height of abline
I use matplot to get the density curve and then I use
abline(v=g$V2, col = 3 ) to get the vertical line.
Goal : I want very small lines at the bottom on the x axis , if possible in the arrow forms instead of vertical lines on the whole graph.
Thanks a lot.
[[alternative HTML version deleted]]