similar to: R-beta: ls.print

Displaying 20 results from an estimated 900 matches similar to: "R-beta: ls.print"

2009 Jan 08
1
cosinor analysis
Hallo, I didn´t found any facilities for Halbergs cosinor analysis in R. This analysis is well known in the Chronobiology as the least square approximation of time series using cosine function of known period (in my case of 24hours-period). I tried to write a script but crashed... Can you give me some advices, please!? Thanks Anne Berger Institute of Zoo- and Wildlife Research, Berlin, Germany
2009 Mar 13
1
lsfit w/ rank-deficient x
Dear R-devel, It seems that lsfit incorrectly reports coefficients when the input matrix 'x' is rank-deficient, see the example below: ## here values of 'b' and 'c' are incorrectly swapped > x <- cbind(a=rnorm(100), b=0, c=rnorm(100)); y <- rnorm(100); lsfit(x, y)$coef Intercept a b c -0.0227787 0.1042860 -0.1729261 0.0000000 Warning
2002 May 14
1
princomp
Hello experts, as newcomer in pca, i have a question, concerning the princomp algorithm. With a dataset "r" containing 18 "input" parameters and 1 "output" parameter r[19], i got with the following fit ls <- lsfit(r[1:18],r[19]); lsdiag <- ls.diag(ls); lsdiag$std.dev a prediction error of: [1] 8.879561 what is quite reasonable. If i take only two
2009 Oct 25
1
lsfit residuals
I'm trying to extract the points above and below a particular lsfit. I can only get the residuals from the original fit though. x = runif(100, 0, 10) plot(x) abline(lsfit(1:100, test)) abline(lsfit(1:100, test + sd(test))) #I want the points above THIS line. Is there a way to use the coefficients from the fit to do this? Thanks for any help.
2016 Apr 20
0
Solving sparse, singular systems of equations
This is not a solution but your lsfit attempt #Error in lsfit(A, b) : only 3 cases, but 4 variables lsfit(A,b) gave that error because lsfit adds a column of 1 to its first argument unless you use intercept=FALSE. Then it will give you an answer (but I think it converts your sparse matrix into a dense one before doing any linear algebra). Bill Dunlap TIBCO Software wdunlap tibco.com On
2013 Apr 25
1
lsfit: Error in formatting error message
Hi, in R-3.0 I get the following error when calling lsfit with more observations than variables, which seems to come from an error in the formatting of the error message (note that this was not happening in 2.15.3): > nobs <- 5; nvar <- 6; lsfit(matrix(runif(nobs*nvar), ncol=nvar), runif(nobs), intercept=FALSE) Error in sprintf(ngettext(nry, "%d response", "%d
2003 Jul 21
5
how to test whether two slopes are sign. different?
Not really r-specific: Z = (b1 - b2) / SQRT ( SEb1^2 + SEb2^2) -------Original Message------- From: Gijsbert Stoet <stoet at volition.wustl.edu> Sent: 07/20/03 09:51 PM To: r-help at stat.math.ethz.ch Subject: [R] how to test whether two slopes are sign. different? > > Hi, suppose I do want to test whether the slopes (e.g. determined with lsfit) of two different population are
2011 Jun 16
1
Scatter plot produces "'x' and 'y' lengths differ"
Hello, I am working on a project to create some scatter plots. I have syntax for 26 plots, and 22 of them display as they should. But here, for example, is a sample of the command syntax I am using: good <- complete.cases(affect1,adh1scr) plot (jitter(affect1,2.0),jitter(adh1scr,1.0),xlim=c(1,35),ylim=c(1,35),pch=1 6, main='Adherence Score by Affectiveness Level - Visit 1',
2013 Feb 26
2
Efficient way to perform linear regressions
Hi All, I have millions of regression lines to fit. So I am looking for the most efficient approach in R. Details: I have a large desing matrix X. The dimension is n by p. Each time when fitting the model, select rows from this matrix X and form a new design matrix, called X_current. There is another binary matrix M, with dim m by n, and each row is a 1*n vector. It helps to determin X_current.
2016 Apr 20
6
Solving sparse, singular systems of equations
I have a situation in R where I would like to find any x (if one exists) that solves the linear system of equations Ax = b, where A is square, sparse, and singular, and b is a vector. Here is some code that mimics my issue with a relatively simple A and b, along with three other methods of solving this system that I found online, two of which give me an error and one of which succeeds on the
2013 Apr 23
2
Help: Where can I find the code for 'C_Cdqrls'?
Dear all, I’m not sure if it is O.K. to ask this question here. But where can I find the code for the function ‘C_Cdqrls’ which is called by the R function ‘lsfit‘. Thank you all. Sorry for being naïve if so. -------------------- Ziqiang Zhao 2013-04-23 [[alternative HTML version deleted]]
2010 Jan 02
3
Help needed on applying a function across different data sets and aggregating the results into a single data set
Hi folks, Wish y'all a Happy New Year 2010! I need some help with the following: Say I have lots of data sets, on which I have to apply a certain function on the same set of columns in each of the data set. Let's take, for ex, the typical data set is: df1 <- as.data.frame(cbind(rnorm(10),rnorm(10))) names(df1)[1] <- "A" names(df1)[2] <- "B" There are many
2009 May 09
2
Sweave \Sexpr{} advice please
Dear List, First off, my deepest gratitude to the Sweave developers: this tool has improved my quality greatly. A question in my work I use \Sexpr{} statements scalar values and the xtable package for all manner of tables. What I'd like to do is to use a vector inline, rather than a whole separate table. Something like: %%%%%%%%%%%%%%%% begin code % Latex junk % Sweave block:
2001 Mar 07
1
cross-validation
The function crossval (in library bootstrap) works well for the first degree polynomial model, but in the case of the second degree model I got an error message (see below). I would be very greatfull if somebody could give some advices for the following: > library(bootstrap) > > x<-c(22,23.4,24.9,28.5,29.8,31.6,34.2,36.4,37.7,39) >
2006 Aug 04
1
Integration and Loop in R
Dear All, I have seldom needed to use loops in R, but now I need to code a loop with a stride different from one. In the R manual I downloaded I have the example: > xc <- split(x, ind) > yc <- split(y, ind) > for (i in 1:length(yc)) { plot(xc[[i]], yc[[i]]); abline(lsfit(xc[[i]], yc[[i]])) } but in my case I'd like to add a condition so that i varies by 4 from one go
2007 Feb 06
3
How-To construct a cov list to use a covariance matrix in factanal?
Hi, I have a set of covariance matrices but not the original data. I want to carry out some exploratory factor analysis. So, I am trying to construct a covariance matrix list as the input for factanal. I can construct a list which includes the cov, the centers, and the n.obs. But it doesn't work. I get an error that says "Error in sqrt(diag(cv)) : Non-numeric argument to mathematical
2008 Oct 09
2
vectorization instead of using loop
Dear all, I've sent this question 2 days ago and got response from Sarah. Thanks for that. But unfortunately, it did not really solve our problem. The main issue is that we want to use our own (manipulated) covariance matrix in the calculation of the mahalanobis distance. Does anyone know how to vectorize the below code instead of using a loop (which slows it down)? I'd really appreciate
2011 Oct 18
1
Repeat a loop until...
Dear all, I know there have been various questions posted over the years about loops but I'm afraid that I'm still stuck. I am using Windows XP and R 2.9.2. I am generating some data using the multivariate normal distribution (within the 'mnormt' package). [The numerical values of sanad and covmat are not important.] > datamat <-
2012 May 07
1
Value of Hurst exponent (R/S) method > 1
Hello, I'm using fArma package to estimate the value of Hurst exponent using R/S method. However, for a certain set of data I get H ~ 1.8. How do I interpret this? Following are the output that I get for this set: > mean(data[,2]) [1] 400.5433 > sd(data[,2]) [1] 1139.786 > > rsFit(data[,2], levels = 64) Title: Hurst Exponent from R/S Method Call: rsFit(x = data[, 2], levels
2010 Oct 04
2
i have aproblem --thank you
dear professor: thank you for your help,witn your help i develop the nomogram successfully. after that i want to do the internal validation to the model.i ues the bootpred to do it,and then i encounter problem again,just like that.(´íÎóÓÚerror to :complete.cases(x, y, wt) : ²»ÊÇËùÓеIJÎÊý¶¼Ò»Ñù³¤(the length of the augment was different)) i hope you tell me where is the mistake,and maybe i have