search for: coefs

Displaying 20 results from an estimated 2193 matches for "coefs".

Did you mean: coef
2002 Oct 09
5
polynomial
Any better (more efficient, built-in) ideas for computing coef[1]+coef[2]*x+coef[3]*x^2+ ... than polynom <- function(coef,x) { n <- length(coef) sum(coef*apply(matrix(c(rep(x,n),seq(0,n-1)),ncol=2),1,function(z)z[1]^z[2])) } ? Ben -- 318 Carr Hall bolker at zoo.ufl.edu Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker
2009 Jun 05
1
Bug in print.Arima and patch
Dear List, A posting to R-Help exposed this problem with the print method for objects of class Arima: > set.seed(1) > x <- arima.sim(n = 100, list(ar = 0.8897, ma = -0.2279)) > mod <- arima(x, order = c(1,0,1)) > coefs <- coef(mod) > mod2 <- arima(x, order = c(1,0,1), fixed = coefs) > mod2 Call: arima(x = x, order = c(1, 0, 1), fixed = coefs) Coefficients: Error in se && nrow(x$var.coef) : invalid 'y' type in 'x && y' > print(mod2, se = FALSE) Call: arima(x = x, o...
2003 Oct 12
6
Rd problems
Hola! I have the following in a .Rd file: \eqn{\mbox{coef} = c(\mbox{coef}[1],\ldots, \mbox{coef}[n]) } {coef = c(coef[1], coef[2], \dots, coef[n])} However, both arguments come out in the latex file! Whats happening? Kjetil Halvorsen
2010 Apr 19
3
nls for piecewise linear regression not converging to least square
Hi R experts, I'm trying to use nls() for a piecewise linear regression with the first slope constrained to 0. There are 10 data points and when it does converge the second slope is almost always over estimated for some reason. I have many sets of these 10-point datasets that I need to do. The following segment of code is an example, and sorry for the overly precise numbers, they are just
2005 Feb 24
2
a question about function eval()
Hi, I have a question about the usage of eval(). Wonder if any experienced user can help me out of it. I use eval() in the following function: semireg.pwl <- function(coef.s=rnorm(1),coef.a=rnorm(1),knots.pos=knots.x,knots.ini.val=knots.val){ knotn <- length(knots.pos) def.par.env <- sys.frame(1) print(def.par.env) print(environment(coef.s)) tg <- eval( (parse(text=
2006 May 03
2
Outreg-like command?
It would be nice to have something like stata's outreg that lets regression output go into a form like Specification (1) Specification (2) Var 1 coef(1,1) coef(1,2) se(1,1) se(1,2) Var 2 coef(2,1) coef(2,2) se(2,1) se(2,2) I don't think this can be done in xtable? Thomas Davidoff Assistant Professor Haas School of Business UC Berkeley Berkeley, CA 94618 Phone: (510)
2010 Apr 19
2
nls minimum factor error
Hi, I have a small dataset that I'm fitting a segmented regression using nls on. I get a step below minimum factor error, which I presume is because residual sum of square is still "not small enough" when steps in the parameter space is already below specified/default value. However, when I look at the trace, the convergence seems to have been reached. I initially thought I might
2010 Sep 29
1
Trying to avoid loop structure
Dear R-helpers, I'm trying to associate linear coefficients (intercept and slope) to tens of thousands of observations based on a table with benchmark values. #####Example - Value table and their corresponding coefficients (intercept and slope) coef = data.frame(cbind(st=c(1:5),b = runif(5,0.3,5),a = seq(0.5,5,1)))print(coef) #Example of observations to be computedobs = runif(20,1,5)print(obs)
2008 Mar 20
1
Use of Factors
Relatively new to R, I'm trying to do a relatively simple task. I have data set that has several variables arranged by SubjID and visit, with multiple observations for that combination. I do linear regression on those multiple observations, then generated a set of interpolated values from the regression at fixed intervals along "x". I now want to average each of those across all the
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"
2001 Aug 10
1
bug in dummy.coef.lm? (PR#1048)
Hi - I'm running R 1.3.0 on i686-pc-linux-gnu > rm(x, y, z) > df <- data.frame(x=1:20,y=1:20,z=factor(1:20 <= 10)) dummy.coef falls over: > dummy.coef.lm(lm(y ~ z * poly(x,1), data=df)) Error in poly(x, 1): Object "x" not found > dummy.coef.lm(lm(y ~ z * I(x), data=df)) Error in unique(c("AsIs", class(x))): Object "x" not found but
2016 Mar 31
2
Ask if an object will respond to a function or method
In the rockchalk package, I want to provide functions for regression objects that are "well behaved." If an object responds to the methods that lm or glm objects can handle, like coef(), nobs(), and summary(), I want to be able to handle the same thing. It is more difficult than expected to ask a given fitted model object "do you respond to these functions: coef(), nobs(),
2007 Dec 17
2
Capture warning messages from coxph()
Hi, I want to fit multiple cox models using the coxph() function. To do this, I use a for-loop and save the relevant results in a separate matrix. In the example below, only two models are fitted (my actual matrix has many more columns), one gives a warning message, while the other does not. Right now, I see all the warning message(s) after the for-loop is completed but have no idea which model
2010 Dec 31
2
Class "coef.mer" into a data.frame?
Hello, Could somebody please tell me what am I doing wrong in following? I try extract coefficients (using arm-package) from the lmer frunction, but I get the following warning: a<-data.frame(coef(res)) Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) : cannot coerce class "coef.mer" into a data.fram I think I have done it before
2010 Apr 27
2
when setting environment: target of assignment expands to non-language object
Hi, I am trying to place my own functions in the nlme environment: The following statement works: environment(coef.corSPT) <- environment(getS3method("coef","corSpatial")) but this one returns an error: environment(get("coef<-.corSPT")) <- environment(getS3method("coef<-","corSpatial")) Error in
2007 Apr 17
3
Extracting approximate Wald test (Chisq) from coxph(..frailty)
Dear List, How do I extract the approximate Wald test for the frailty (in the following example 17.89 value)? What about the P-values, other Chisq, DF, se(coef) and se2? How can they be extracted? ######################################################> kfitm1 Call: coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id, dist = "gauss"), data = kidney)
2015 Aug 05
0
[PATCH 7/8] Add Neon intrinsics for Silk noise shape feedback loop.
--- silk/NSQ.c | 18 ++------------- silk/NSQ.h | 27 ++++++++++++++++++++++ silk/arm/NSQ_neon.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ silk/arm/NSQ_neon.h | 10 ++++++++ 4 files changed, 105 insertions(+), 16 deletions(-) diff --git a/silk/NSQ.c b/silk/NSQ.c index d8513dc..ec81f3b 100644 --- a/silk/NSQ.c +++ b/silk/NSQ.c @@ -205,7 +205,7 @@ void
2015 Nov 21
0
[Aarch64 v2 06/18] Add Neon intrinsics for Silk noise shape feedback loop.
--- silk/NSQ.c | 18 ++------------- silk/NSQ.h | 27 ++++++++++++++++++++++ silk/arm/NSQ_neon.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ silk/arm/NSQ_neon.h | 10 ++++++++ 4 files changed, 105 insertions(+), 16 deletions(-) diff --git a/silk/NSQ.c b/silk/NSQ.c index d8513dc..ec81f3b 100644 --- a/silk/NSQ.c +++ b/silk/NSQ.c @@ -205,7 +205,7 @@ void
2017 Nov 07
0
New vcov(*, complete=TRUE) etc -- coef(<lm>) vs coef(<aov>)
Dear Martin, I think that your plan makes sense. It's too bad that aov() behaved differently in this respect from lm(), and thus created more work, but it's not be a bad thing that the difference is now explicit and documented. I expect that that other problems like this will surface, particularly with contributed packages (and I know that you're aware that this has already happened
2013 Feb 08
3
On p-values presented in the summary of Linear Models
Dear list members I have a doubt on how p-values for t-statistics are calculated in the summary of Linear Models. Here goes an example: x <- rnorm(100,50,10) y <- rnorm(100,0,5) fit1<-lm(y~x) summary(fit1) summary(fit1)$coef[2] # b summary(fit1)$coef[4] # Std. Error summary(fit1)$coef[6] # t-statistic summary(fit1)$coef[8] # Pr(>|t| summary(fit1)$df [2] # degrees of freedom #