similar to: Add1 w/ coef estimates?

Displaying 20 results from an estimated 40000 matches similar to: "Add1 w/ coef estimates?"

2006 Jan 10
1
another question about lmer, this time involving coef()
I'm having another problem with lmer(), this time something simpler (I think) involving the coef() function for a model with varying coefficients. Here's the R code. It's a simple model with 2 observations per group and 10 groups: # set up the predictors n.groups <- 10 n.reps <- 2 n <- n.groups*n.reps group.id <- rep (1:n.groups, each=n.reps) # simulate the varying
2009 May 20
1
SEM:Standard error of std.coef estimates?
Hi, I am currently working with the sem package in R, to create pathway diagrams. Id like to use the standardized path coeffcients. To get these, I use std.coef. However, using this yields only the standardized coefficients, but does not give me the standard error. Does someone know how to get std.coef to show the standard error of the standardized path coefficients as well? Thanks, Bastiaan
2010 Jul 14
1
Add Significance Codes to Data Frame
I was hoping that there might be some way to attach significance code like the ones from summary.lm to a dataframe. Anyone know how to do something like that. Here is the function i'd like to add that functionality to: add1.coef <- function(model,scope,test="F",p.value=1,order.by.p=FALSE) { num <- length(model$coefficients) add <- add1(model,scope,test=test) sub <-
2010 Aug 05
3
How to extract se(coef) from cph?
Hello, I am modeling some survival data wih cph (Design). I have modeled a predictor which showed non linear effect with restricted cubic splines. I would like to retrieve the se(coef) for other, linear, predictors. This is just to make nice LateX tables automatically. I have the coefficients with coef(). How do I do that? Thanks, David Biau. [[alternative HTML version deleted]]
2007 May 01
1
(PR#9623) qr.coef: permutes dimnames; inserts NA; promises
On Thu, 19 Apr 2007, brech at delphioutpost.com wrote: > Full_Name: Christian Brechbuehler > Version: 2.4.1 Patched (2007-03-25 r40917) > OS: Linux 2.6.15-27-adm64-xeon; Ubuntu 6.06.1 LTS > Submission from: (NULL) (24.61.47.236) > > > Splus and R have different ideas about what qr.coef(qr()) should return, > which is fine... but I believe that R has a bug in that it is not
2007 May 02
3
ED50 from logistic model with interactions
Hi, I was wondering if someone could please help me. I am doing a logistic regression to compare size at maturity between 3 seasons. My model is: fit <- glm(Mature ~ Season * Size - 1, family = binomial, data=dat) where Mature is a binary response, 0 for immature, 1 for mature. There are 3 Seasons. The Season * Size interaction is significant. I would like to compare the size at 50%
2019 Aug 31
0
inconsistent handling of factor, character, and logical predictors in lm()
Dear Bill, Thanks for pointing this difference out -- I was unaware of it. I think that the difference occurs in model.matrix.default(), which coerces character variables but not logical variables to factors. Later it treats both factors and logical variables as "factors" in that it applies contrasts to both, but unused factor levels are dropped while an unused logical level is not. I
2010 Nov 16
1
Re : interpretation of coefficients in survreg AND obtaining the hazard function for an individual given a set of predictors
Thanks for sharing the questions and responses! Is it possible to appreciate how much the coefficients matter in one or the other model? Say, using Biau's example, using coxph, as.factor(grade2 == "high")TRUE gives hazard ratio 1.27 (rounded). As clinician I can grasp this HR as 27% relative increase. I can relate with other published results. With survreg the Weibull model gives a
2009 Apr 07
1
Simulate binary data for a logistic regression Monte Carlo
Hello, I am trying to simulate binary outcome data for a logistic regression Monte Carlo study. I need to eventually be able to manipulate the structure of the error term to give groups of observations a random effect. Right now I am just doing a very basic set up to make sure I can recover the parameters properly. I am running into trouble with the code below. It works if you take out the object
2010 Nov 13
2
interpretation of coefficients in survreg AND obtaining the hazard function for an individual given a set of predictors
Dear R help list, I am modeling some survival data with coxph and survreg (dist='weibull') using package survival. I have 2 problems: 1) I do not understand how to interpret the regression coefficients in the survreg output and it is not clear, for me, from ?survreg.objects how to. Here is an example of the codes that points out my problem: - data is stc1 - the factor is dichotomous
2010 Nov 15
1
interpretation of coefficients in survreg AND obtaining the hazard function
1. The weibull is the only distribution that can be written in both a proportional hazazrds for and an accelerated failure time form. Survreg uses the latter. In an ACF model, we model the time to failure. Positive coefficients are good (longer time to death). In a PH model, we model the death rate. Positive coefficients are bad (higher death rate). You are not the first to be confused
2009 Sep 26
1
renaming intercept column when retrieving coeficients from lme using coef function
I am still fairly new to R and have a fairly rudimentary question. I am trying to name a vector of coefficients retrieved from a multilevel model using the coef function. I guess the default name is "Intercept" and I cannot figure out how to rename it. I have tried the using the code below to name the column of coefficients ind.y derived from an lme model. Unfortunately, the
2006 Jun 28
0
Fwd: add1() and anova() with glm with dispersion
> Hello, > > I have a question about a discrepancy between the > reported F statistics using anova() and add1() from > adding an additional term to form nested models. > > I found and old posting related to anova() and > drop1() regarding a glm with a dispersion parameter. > > The posting is very old (May 2000, R 1.1.0). > The old posting is located here. >
2011 Nov 25
1
Unable to reproduce Stata Heckman sample selection estimates
Hello, I am working on reproducing someone's analysis which was done in Stata. The analysis is estimation of a standard Heckman sample selection model (Tobit-2), for which I am using the sampleSelection package and the selection() function. I have a few problems with the estimation: 1) The reported standard error for all estimates is Inf ... vcov(selectionObject) yields Inf in every
2009 Nov 02
2
using exists with coef from an arima fit
Dear R People: I have the output from an arima model fit in an object xxx. I want to verify that the ma1 coefficient is there, so I did the following: > xxx$coef ar1 ar2 ma1 intercept 1.3841297 -0.4985667 -0.9999996 -0.1091657 > str(xxx$coef) Named num [1:4] 1.384 -0.499 -1 -0.109 - attr(*, "names")= chr [1:4] "ar1" "ar2"
2005 Aug 05
0
(PR#8049) add1.lm and add1.glm not handling weights and
David, Thanks. The reason add1.lm (and drop1.lm) do not support offsets is that lm did not when they were written, and the person who added offsets to lm did not change them. (I do wish they had not added an offset arg and just used the formula as in S's glm.) That is easy to add. For the other point, some care is needed if 'x' is supplied and the upper scope reduces the number
2005 Aug 04
0
add1.lm and add1.glm not handling weights and offsets properly (PR#8049)
I am using R 2.1.1 under Mac OS 10.3.9. Two related problems (see notes 1. and 2. below) are illustrated by results of the following: y <- rnorm(10) x <- z <- 1:10 is.na(x[9]) <- TRUE lm0 <- lm(y ~ 1) lm1 <- lm(y ~ 1, weights = rep(1, 10)) add1(lm0, scope = ~ x) ## works ok add1(lm1, scope = ~ x) ## error lm2 <- lm(y ~ 1, offset = 1:10) add1(lm0, scope = ~ z) ##
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
2013 Jun 25
1
F statistic in add1.lm vs add1.glm
Should the F statistic be the same when using add1() on models created by lm and glm(family=gaussian)? They are in the single-degree-of-freedom case but not in the multiple-degree-of-freedom case. MASS:addterm shows the same discrepancy. It looks like the deviance (==residual sum of squares) gets divided by the number of degrees of freedom for the term twice in add1.glm. Using anova() on the
2007 Apr 05
1
Logistic/Cox regression: Parameter estimates directly from model matrix
Hi out there Is there a way to get the estimated coefficients in a logistic / Cox regression without having to specify a 'formula' but by only giving the model matrix? Example for Cox regression: ## predictors n <- 50 q1 <- rnorm(n) q2 <- rgamma(n, 2, 2) Z <- cbind(q1, q2) ## response ttf <- rexp(n) tf <- round(runif(n)) ## compute estimates res <- coxph(Surv(ttf,