similar to: Re: Welcome to r-help

Displaying 20 results from an estimated 60000 matches similar to: "Re: Welcome to r-help"

2005 Nov 03
1
Fitting heteroscedastic linear models/ problems with varIdent of nlme
Hi, I would like to fit a model for a factorial design that allows for unequal variances in all groups. If I am not mistaken, this can be done in lm by specifying weights. A function intended to specify weights for unequal variance structures is provided in the nlme library with the varIdent function. Is it apropriate to use these weights with lm? If not, is there another possibility to do
2008 Nov 06
2
replacing characters in formulae / models
Dear all, How can I replace text in objects that are of class "formula"? y="a * x + b" class(y)="formula" grep("x",y) y[1] Suppose I would like to replace the "x" by "w" in the formula object "y". How can this be done? Somehow, the methods that can be used in character objects do not work 1:1 in formula objects... Many
2007 Nov 08
6
Extract correlations from a matrix
Dear R users, suppose I have a matrix of observations for which I calculate all pair-wise correlations: m=matrix(sample(1:100,replace=T),10,10) w=cor(m,use="pairwise.complete.obs") How do I extract only those correlations that are >0.6? w[w>0.6] #obviously doesn?t work, and I can?t find a way around it. I would very much appreciate any help! Best wishes Christoph (using R
2005 Feb 02
2
Frequency of Data
Hello, just another problem in R, maybe it's simple to solve for you. I didn't find a solution up to now, but I'm convinced that I'm not the only one who has/had a similar problem. Maybe there's a ready-made function in R? The prob: I've imported a CSV-file into R with 1000 dates of an observed event (there's only information of the date. When there happend no
2008 Feb 22
3
Simultaneously summarizing many models
Dear R users, Let?s say I have 10 models, each named m1,m2,m3..., and I would like to summarize them automatically and simultaneously - e.g., to extract parameter estimates later on from all models; how can I do that? I have tried: x=1:10 #this creates some example data y=rnorm(10) m1=lm(x~y) m2=lm(x~1) sum.lms=function(x)summary(paste("m",x,sep="")) sum.lms(1:2) but
2008 Nov 25
4
glm or transformation of the response?
Dear all, For an introductory course on glm?s I would like to create an example to show the difference between glm and transformation of the response. For this, I tried to create a dataset where the variance increases with the mean (as is the case in many ecological datasets): poissondata=data.frame( response=rpois(40,1:40), explanatory=1:40) attach(poissondata) However, I have run into
2005 Jun 29
2
MLE with optim
Hello, I tried to fit a lognormal distribution by using optim. But sadly the output seems to be incorrect. Who can tell me where the "bug" is? test = rlnorm(100,5,3) logL = function(parm, x,...) -sum(log(dlnorm(x,parm,...))) start = list(meanlog=5, sdlog=3) optim(start,logL,x=test)$par Carsten. [[alternative HTML version deleted]]
2005 Jul 12
1
three par. fitting with fitdistr
Hello, I want to fit a tree parameter distribution to given data. I tried it with sample data using the "fitdistr" function. Here my workflow that didn't had any result: I started with the generalized gamma distr, which is: r*dgamma(x^r,shape,rate) The R-function is: ggamma = function (x,r,shape,rate) r*dgamma(x^r,shape,rate=rate) For the first step I assumed r = 1 and I
2005 Apr 05
1
Fitdistr and likelihood
Hi all, I'm using the function "fitdistr" (library MASS) to fit a distribution to given data. What I have to do further, is getting the log-Likelihood-Value from this estimation. Is there any simple possibility to realize it? Regards, Carsten
2005 Jan 31
2
ML-Fit for truncated distributions
Hello, maybe that my Question is a "beginner"-Question, but up to now, my research didn't bring any useful result. I'm trying to fit a distribution (e.g. lognormal) to a given set of data (ML-Estimation). I KNOW about my data that there is a truncation for all data below a well known threshold. Is there an R-solution for an ML-estimation for this kind of data-problem? As
2005 Jul 19
2
Problems with date-format (R 2.1.1 + chron)
Hello, today I've updated on the newest R-Version. But sadly a function I needed didnt want to work: The input is e.g. days(as.Date("21-07-2005","%d-%m-%y")) the error is: Fehler in Math.Date(dts): floor nicht definiert f??r Date Objekte (Error in Math.Date(dts): floor not defined for date objects) Same for year. Only months gives me the correct output. In Version
2005 Sep 07
1
fitting distribution tails
Hello, I want to fit a distribution to a dataset. Important is not the "overall" fitting but the fitting in the tail (e.g. all observations > x or the n highest values). Standard ML-estimation sometimes doesn't work here very well. We see that especially when we have truncated datasets the algorithms won't converge. In the case of lognormal distribution: It seems that the
2008 Nov 03
2
standard errors for predict.nls?
Dear all, Is there a way to retrieve standard errors from nls models? The help page tells me that arguments such as se.fit are ignored... Many thanks and best wishes Christoph -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen Germany phone +49 (0)551 39 8807 fax +49 (0)551 39 8806 Homepage http://www.gwdg.de/~cscherb1
2005 Feb 11
1
function table
Hi, my problem is the following: I have a large database of insurance-damage data and want to model the frequency of these events. So to fit a distribution on my frequency-data I want to count the number of events in each month via the date of occurrence. Therefor I use this command which works very well: count_table <- table(months(date_occ),years(date_occ)) But there is another
2005 Oct 13
2
varimax rotation difference between R and SPSS
Hi, I am puzzeled with a differing result of princomp in R and FACTOR in SPSS. Regarding the amount of explained Variance, the two results are the same. However, the loadings differ substantially, in the unrotated as well as in the rotated form. In both cases correlation matrices are analyzed. The sums of the squared components is one in both programs. Maybe there is an obvious reason, but I
2006 Jun 14
49
[Bug 464] state match sometimes failes RELATED,ESTABLISHED matches
https://bugzilla.netfilter.org/bugzilla/show_bug.cgi?id=464 ------- Additional Comments From holm@theorie.physik.uni-goettingen.de 2006-06-14 15:00 MET ------- I run into the same probs with Mandriva kernel. All kernel >2.6.11 are definitly affected. kernel 2.6.8.1 has no problems. Hope this helps a little bit. -- Configure bugmail:
2009 Aug 20
1
nested, repeated measure lme
Dear all, Suppose I have a nested, repeated measure lme model. Which of the following formulae is correct? (assuming data are sampled from several plots in an agricultural experiment) (1) y~explanatory.variables,random=~time|block/plot/subplot/individual (2) y~explanatory.variables,random=~time|unique.ID.of.every.individual I have read that (2) is the only approach that works. But how could I
2004 Apr 26
1
eventloop
Hello. I'm writting a glx device and I've some performance problem with the eventloop registration system. The device is not refresh when there's no X event. That's problematic for animation and "smoothness" of display. Should I use threads or fork the R process to get and independant way to refresh my device ? Or do you know another way to refresh it ? Thanks
2008 Jun 07
1
Multivariate LM: calculating F-values after calling linear.hypothesis
Dear R users, I am analyzing several response variables (all scaled to [0;1]) using a multivariate linear model. After fitting the model, I set up a hypothesis matrix to test specific contrasts for these response variables; for example: "a always increases significantly more than b when regressed against x". What I am stuck with now is how to calculate the correct F-values (and
2005 Jun 28
1
nonparametric 2way repeated-measures anova
Dear useRs is there any nonparametric test for the analysis of variance in a design with two within-factors (repeated measures on both factors)? Friedman is not appropriate here, therefore I am grateful for any alternative test. thanks for any hint cheers christoph --