search for: coeffs

Displaying 20 results from an estimated 299 matches for "coeffs".

Did you mean: coeff
2010 Jan 02
1
Help with tryCatch
...to experiment with code, but I can't understand how to accomplish my desired task. Perhaps I need to use withCallingHandlers(), but the explanation of these functions is beyond my ken. My latest code follows. Any suggestions for corrections would be appreciated. # Define matrix to hold results coeffs <- matrix(nrow=10, ncol=3) dimnames(coeffs) < -list(NULL,c("BMI","BMIsq","min")) # set row counter n<-0 # Function to run testone<-function() { SampleData<-sample(1:SS,size=SS,replace=TRUE) result<-summary(glm(AAMTCARE~BMIEpiRevAdjc+BMIEpiRevAdjcSq+...
2010 Nov 09
0
convergence message & SE calculation when using optim( )
Hi R-users, I am trying to estimate function parameters using optim(). My count observations follows a Poisson like distribution. The problem is that I wanna express the lambda coefficient, in the passion likelihood function, as a linear function of other covariates (and thus of other coefficients). The codes that I am using (except data frame) are the following (FYI the parameters need to be
2008 Aug 11
3
Peoblem with nls and try
Hello, I can`t figure out how can increase the velocity of the fitting data by nls. I have a long data .csv I want to read evry time the first colunm to the other colunm and analisy with thata tools setwd("C:/dati") a<-read.table("Normalizzazione.csv", sep=",", dec=".", header=F) for (i in 1:dim(a[[2]]]) { #preparazione dati da analizzare
2008 Aug 18
1
"nested" getInitial calls; variable scoping problems
Hi All, Another nls related problem (for background, I'm migrating a complicated modelling package from S-plus to R). Below I've reduced this to the minimum necessary to demonstrate my problem (I think); the real situation is more complicated. Two similar selfStart functions, ssA and ssB. The 'initial' function for ssB modifies its arguments a little and then calls getInital
2010 Oct 17
4
Variable name as string
Hello, from Verzani, simpleR (pdf), p. 80, I created the following function to test the coefficient of lm() against an arbitrary value. coeff.test <- function(lm.result, var, coeffname, value) { # null hypothesis: coeff = value # alternative hypothesis: coeff != value es <- resid(lm.result) coeff <- (coefficients(lm.result))[[coeffname]] # degrees of freedom = length(var) -
2010 Nov 16
2
Integrating functions / vector arithmetic
Hello, I was trying to build some functions which I would like to integrate over an interval using the function 'integrate' from the 'stats' package. As an example, please consider the function h(u)=sin(pi*u) + sqrt(2)*sin(pi*2*u) + sqrt(3)*sin(pi*3*u) + 2*sin(pi*4*u) Two alternative ways to 'build' this function are as in f and g below: coeff<-sqrt(1:4)
2010 Sep 24
3
Odds ratio from Logistic model in R
......,family=binomial....). I've written my own, but >certainly someone did a better job. I show a simple function to do this in my introductory notes available from: http://www.myatt.demon.co.uk basically it is: lreg.or <- function(model) { lreg.coeffs <- coef(summary(salex.lreg)) lci <- exp(lreg.coeffs[ ,1] - 1.96 * lreg.coeffs[ ,2]) or <- exp(lreg.coeffs[ ,1]) uci <- exp(lreg.coeffs[ ,1] + 1.96 * lreg.coeffs[ ,2]) lreg.or <- cbind(lci, or, uci) lreg.or }...
2011 Feb 08
4
Interactions in a nls model
I am interested in testing two similar nls models to determine if the lines are statistically different when fitted with two different data sets; one corn, another soybean. I know I can do this in linear models by testing for interactions. See Introductory Statistics with R by Dallgaard p212-218 for an example. I have two different data sets I am comparing to lai. ci.re should have very
2007 Dec 02
3
Help with a Loop
...172 0 3 10 1.55323 216 0 3 9 1.24088 65 0 4 8 2.49412 69 0 4 5 1.79840 This is my thought process of what the loop needs to do but I cant get the correct loop. X1=Day[Participant=="1"] Y1=DrugLevel[Participant=="1"] Coeffs=function(X1,Y1) { lmfirst=lm(Y1~X1) lmfirst$coefficients } Coeffs(X1,Y1) # output slope and intercept here # do same for the next participant X2=Day[Participant=="2"] Y2=DrugLevel[Participant=="2"] Coeffs=function(X2,Y2) { lmfirst=lm(Y2~X2) lmfirst$coefficients } Coeffs(X2,...
2008 Oct 15
1
Parameter estimates from an ANCOVA
Hi all, This is probably going to come off as unnecessary (and show my ignorance) but I am trying to understand the parameter estimates I am getting from R when doing an ANCOVA. Basically, I am accustomed to the estimate for the categorical variable being equivalent to the respective cell means minus the grand mean. I know is the case in JMP - all other estimates from these data match the
2010 Nov 03
2
memory allocation problem
Hi R users I am trying to run a non linear parameter optimization using the function optim() and I have problems regarding memory allocation. My data are in a dataframe with 9 columns. There are 656100 rows. >head(org_results) comb.id p H1 H2 Range Rep no.steps dist aver.hab.amount 1 1 0.1 0 0 1 100 0 0.2528321
2006 Oct 04
1
strip function
Hi, I would like to asign titles into strip of a panel of curves designed thanks to a xyplot function (lattice package) I ve tried the "strip" function, ... here is my code I would like to write in the strip of each panel conditionning varialbe (here, it is data[,1]) xyplot (data[,3] ~ data[,2] | data[,1] , strip.default (which.given=1, which.panel = c(1:15), var.name= c
2008 Sep 19
0
panel data analysis possible with mle2 (bbmle)?
...-1.137, -1.085, -1.028, -0.965, -0.919, -0.942, -0.902, -0.828, -0.79) ################this is the function that is called by mle2 exfunc <- function(c1,c2,c3,cs1,cs2,cs3,ic1,ic2,ic3,cc1,cc2,cc3,alstar,beta1){ x<-matrix(0,years*cross,3) x[,1] <- 1 x[,2] <- ra x[,3] <- sa coeffs <- vector(length=3) coeffs[1] <- c1 coeffs[2] <- c2 coeffs[3] <- c3 csp <- rep(c(cs1,cs2,cs3),each=years) e1 <- (x %*% coeffs);frfact <- csp*plogis(e1);cfrontr <- frfact*frontr; cfrontr1 <- cfrontr;dim(cfrontr1) <- c(years,cross) cfgwth[2:years,] <- (cfron...
2006 Aug 21
4
question about 'coef' method and fitted_value calculation
Dear all, I am trying to calculate the fitted values using a ridge model (lm.ridge(), MASS library). Since the predict() does not work for lm.ridge object, I want to get the fitted_value from the coefficients information. The following are the codes I use: fit = lm.ridge(myY~myX,lambda=lamb,scales=F,coef=T) coeff = fit$coef However, it seems that "coeff" (or "fit$coef") is
2004 Oct 22
3
Convert a list in a dataframe
Hi, I've a list containing parameters (intercepts & coefficients) of 12 regressions fitted > coeff [[1]] (Intercept) anno -427017.1740 217.0588 [[2]] (Intercept) anno -39625.82146 21.78025 ..... [[12]] (Intercept) anno 257605.0343 -129.7646 I want create a data frame with two columns (intercept and anno)using data in these list. Any help
2001 Aug 31
2
contrasts in lm
I've been playing around with contrasts in lm by specifying the contrasts argument. So, I want to specify a specific contrast to be tested Say: > y _ rnorm(100) > x _ cut(rnorm(100, mean=y, sd=0.25),c(-3,-1.5,0,1.5,3)) > reg _ lm(y ~ x, contrasts=list(x=c(1,0,0,-1))) > coef(reg)[2] x1 -1.814101 I was surprised to see that I get a different estimate for the
2018 Jul 10
9
[PATCH 0/7] PowerPC64 performance improvements
The following series adds initial vector support for PowerPC64. On POWER9, flac --best is about 3.3x faster. Amitay Isaacs (2): Add m4 macro to check for C __attribute__ features Check if compiler supports target attribute on ppc64 Anton Blanchard (5): configure.ac: Remove SPE detection code configure.ac: Add VSX enable/disable configure.ac: Fix FLAC__CPU_PPC on little endian, and add
2010 May 24
1
retrieve path analysis coefficients (package agricolae)
Dear list, I'd like to use path.analysis in the package agricolae in batch format on many files, retrieving the path coefficients for each run and appending them to a table. I don't see any posts in the help files about this package or the path.analysis package. I've tried creating an object out of the call to path.analysis, but no matter what I try, the function automatically prints
2011 Mar 01
1
theora encoder reordering, order of puting data from DCT 8x8 blocks to huffman compressor, and puting result of huffman compressor to buffer bitstream memory
Good day! I'm creating HDL IP CORE (for using in FPGA) for theora encoder (now only I-frames). I don't undestand one moment. Now i develop such stages: 1. From RBG(byer) to YCbCr converter 2. DCT processing (8x8 pixels blocks) 3. Quantizator of DCT coeff. 4. Zig-Zag of quantized DCT coeff. and now i have uresolved last stage of compression - how i must send 8x8 blocks to huffman
2007 Feb 19
3
summary polr
Hi all, I have a problem to estimate Std. Error and t-value by ?polr? in library Mass. They result from the summary of a polr object. I can obtain them working in the R environment with the following statements: temp <- polr(formula = formula1, data = data1) coeff <- summary(temp), but when the above statements are enclosed in a function, summary reports the following error: