similar to: residuals in logistic regression model

Displaying 20 results from an estimated 5000 matches similar to: "residuals in logistic regression model"

2005 Dec 01
2
Minimizing a Function with three Parameters
Hi, I'm trying to get maximum likelihood estimates of \alpha, \beta_0 and \beta_1, this can be achieved by solving the following three equations: n / \alpha + \sum\limits_{i=1}^{n} ln(\psihat(i)) - \sum\limits_{i=1}^{n} ( ln(x_i + \psihat(i)) ) = 0 \alpha \sum\limits_{i=1}^{n} 1/(psihat(i)) - (\alpha+1) \sum\limits_{i=1}^{n} ( 1 / (x_i + \psihat(i)) ) = 0 \alpha \sum\limits_{i=1}^{n} (
2007 Sep 13
1
Problem using xtable on an array
Hi all I know about producing a minimal example to show my problem. But I'm having trouble producing a minimal example that displays this behaviour, so please bear with me to begin with. Observe: I create an array called model.mat. Some details on this: > str(model.mat) num [1:18, 1:4] -0.170 -0.304 -2.617 2.025 -1.610 ... - attr(*, "dimnames")=List of 2 ..$ : chr
2015 Jun 10
2
Duda glmer
Hola, Tengo una base de datos con estructura jerárquica en la que quiero clasificar observaciones en distintas categorías. En el caso más simple, tengo una variable con dos categorías (variable Y1) y dentro de cada una de ellas hay otras dos categorías (variable Y2). Además tengo una variable explicativa cuantitativa discreta X. El banco de datos sería de este tipo: X Y1 Y2 5 0 1 9 0 0 2
2002 Dec 04
1
use of offset - clarification
Hi Listers, seems I have forgotten some basics re offset in glm: data: counts (y) from locations off different size (area), explanatory variable: x Model: y ~ x+offset(area) Predictions (pred) using Poisson errors plot(x,y) and points(x,pred) gives neat "line" of estimated values. However, for ease of understanding graphs are better using plot(x,y/area). Question: How to display
2010 Jan 25
3
binary
Hi all Assume I have a data set xx; Group: 1=group1 ?, 2=group2 IQ: ?1= High, 0 =low fit <- glm(IQ ~group, data = xx, family = binomial()) summary(fit) Results ?????? ????????????Estimate Std. Error z value Pr(>|z|) (Intercept) -2.55456??? 0.210 -12.273? < 5e-16 *** group????????? 0.36180 ?????0.076?? 3.952 ????5.24e-05 *** the odd ratio = exp(0.36180 )= 1.435912 My question
2008 May 16
1
SE of difference in fitted probabilities from logistic model.
I am fitting a logistic binomial model of the form glm(y ~ a*x,family=binomial) where a is a factor (with 5 levels) and x is a continuous predictor. To assess how much ``impact'' x has, I want to compare the fitted success probability when x = its maximum value with the fitted probability when x = its mean value. (The mean and the max are to be taken by level of the factor
2007 Feb 02
1
multinomial logistic regression with equality constraints?
I'm interested in doing multinomial logistic regression with equality constraints on some of the parameter values. For example, with categorical outcomes Y_1 (baseline), Y_2, and Y_3, and covariates X_1 and X_2, I might want to impose the equality constraint that \beta_{2,1} = \beta_{3,2} that is, that the effect of X_1 on the logit of Y_2 is the same as the effect of X_2 on the
2012 Nov 29
0
constrOptim
Dear R users, I am using the function "constrOptim" to minimize the -1*log-likelihood where \beta_i>=0 i=1,...,p and \beta_0 is unconstrained. I construct u_i as 0 0 0 ... 0 0 1 0 ... 0 0 0 1 ... 0 . . . ... 0 . . . ... 0 .
2006 Sep 18
1
non linear modelling with nls: starting values
Hi, I'm trying to fit the following model to data using 'nls': y = alpha_1 * beta_1 * exp(-beta_1 * x) + alpha_2 * beta_2 * exp(-beta_2 * x) and the call I've been using is: nls(y ~ alpha_1 * beta_1 * exp(-beta_1 * x) + alpha_2 * beta_2 * exp(-beta_2 * x), start=list(alpha_1=4, alpha_2=2, beta_1=3.5, beta_2=2.5), trace=TRUE, control=nls.control(maxiter =
2008 Jun 15
2
R vs SAS and HLM on multilevel analysis- basic question
Hi R users! I am trying to learn some multilevel analysis, but unfortunately i am now very confused. The reason: http://www.ats.ucla.edu/stat/hlm/seminars/hlm_mlm/mlm_hlm_seminar.htm http://www.ats.ucla.edu/stat/sas/seminars/sas_mlm/mlm_sas_seminar.htm and MlmSoftRev. pdf from mlmRev package. >From what i see, the first two links seem to declare the level one variable as a random part (i
2004 May 21
2
Help with Plotting Function
Dear List: I cannot seem to find a way to plot my data correctly. I have a small data frame with 6 total variables (x_1 ... x_6). I am trying to plot x_1 against x_2 and x_3. I have tried plot(x_2, x_1) #obviously works fine plot(x_3, x_1, add=TRUE) # Does not work. I keep getting error messages. I would also like to add ablines to this plot. I have experimented with a number of other
2012 Jan 07
2
glm or transformation of the response?
Hi Dr. Snow, I am a graduate student working on analyzing data for my thesis and came across your post on an R forum: The default link function for the glm poisson family is a log link, which means that it is fitting the model: log(mu) ~ b0 + b1 * x But the data that you generate is based on a linear link. Therefore your glm analysis does not match with how the data was generated
2011 Aug 19
3
Calculating p-value for 1-tailed test in a linear model
Hello, I'm having trouble figuring out how to calculate a p-value for a 1-tailed test of beta_1 in a linear model fit using command lm. My model has only 1 continuous, predictor variable. I want to test the null hypothesis beta_1 is >= 0. I can calculate the p-value for a 2-tailed test using the code "2*pt(-abs(t-value), df=degrees.freedom)", where t-value and degrees.freedom
2006 Oct 31
2
Put a normal curve on plot
I would like to be able to place a normal distribution surrounding the predicted values at various places on a plot. Below is some toy code that creates a scatterplot and plots a regression line through the data. library(MASS) mu <- c(0,1) Sigma <- matrix(c(1,.8,.8,1), ncol=2) set.seed(123) x <- mvrnorm(50,mu,Sigma) plot(x) abline(lm(x[,2] ~ x[,1])) Say I want to add a normal
2004 Oct 08
1
nlme vs gls
Dear List: My question is more statistical than R oriented (although it originates from my work with nlme). I know statistical questions are occasionally posted, so I hope my question is relevant to the list as I cannot turn up a solution anywhere else. I will frame it in the context of an R related issue. To illustrate the problem, consider student achievement test score data with multiple
2009 Jun 16
1
turning off escape sequences for a string
Hello, I would like to create a matrix with one of the columns named $\delta$. I have also created columns $\beta_1$ , $\beta_2$, etc. However, it seems like \d is an escape sequence which gets automatically removed. (Using these names such that they work right in xtable -> latex) colnames(simpleReg.mat) <- c("$\beta_1$","$SE(\beta_1)$", "$\beta_2$",
2006 Jun 08
1
panel.abline and xyplot
Dear All, I am wondering on how to use the abline.xyplot with xyplot such that I will have different vertical lines for each panel. More sepcifically, suppose that the xyplot generates 4 panels defined by the combination of two binary variables: X_1 and X_2. i.e. xyplot(Y ~ Z | X_1*X_2, data = df) I want something like: abline(v = 5) if X_1=0 and X_2 = 0 abline(v =
2008 Aug 04
2
Multivariate Regression with Weights
Hi all, I'd like to fit a multivariate regression with the variance of the error term porportional to the predictors, like the WLS in the univariate case. y_1~x_1+x_2 y_2~x_1+x_2 var(y_1)=x_1*sigma_1^2 var(y_2)=x_2*sigma_2^2 cov(y_1,y_2)=sqrt(x_1*x_2)*sigma_12^2 How can I specify this in R? Is there a corresponding function to the univariate specification lm(y~x,weights=x)??
2009 Jun 11
2
Optimization Question
Hi All Apologies if this is not the correct list for this question. The Rglpk package offers the following example in its documentation library(Rglpk) ## Simple mixed integer linear program. ## maximize: 3 x_1 + 1 x_2 + 3 x_3 ## subject to: -1 x_1 + 2 x_2 + x_3 <= 4 ## 4 x_2 - 3 x_3 <= 2 ## x_1 - 3 x_2 + 2 x_3 <= 3 ## x_1, x_3 are non-negative integers ## x_2 is a non-negative real
2009 Oct 01
1
Help for 3D Plotting Data on 'Irregular' Grid
Dear All, Here is what I am trying to achieve: I would like to plot some data in 3D. Usually, one has a matrix of the kind y_1(x_1) , y_1(x_2).....y_1(x_i) y_2(x_1) , y_2(x_2).....y_2(x_i) ........................................... y_n(x_1) , y_n(x_2)......y_n(x_i) where e.g. y_2(x_1) is the value of y at time 2 at point x_1 (see that the grid in x is the same for the y values at all times).