[R] Forcing a negative slope in linear regression?
Dear forum members, How can I force a negative slope in a linear regression even though the slope might be positive? I will need it for the purpose of determining the trend due reasons other than biological because the biological (genetic) trend is not positive for these data. Thanks. Julia Example of the data: [1] 1.254 1.235 1.261 0.952 1.202 1.152 0.801 0.424 0.330 0.251 0.229 0.246 [13] 0.414 0.494 0.578 0.628 0.514 0.594 0.827 0.812 0.629 0.928 0.707 0.976 [25] 1.099 1.039 1.272 1.398 1.926 1.987 2.132 1.644 2.174 2.453 2.392 3.002 [37] 3.352 2.410 2.206 2.692 2.653 1.604 2.536 3.070 3.137 4.187 4.803 4.575 [49] 4.580 3.779 4.201 5.685 4.915 5.929 5.474 6.140 5.182 5.524 5.848 5.830 [61] 5.800 7.517 6.422 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] curve3d in emdbook package: scaling z axis?
Dear R community, Is there an option to assign minimum and maximum values for z axis in 3D graph using the function curve3d from the package emdbook? I know there are such options for x and y axes. Thanks. Julia _ Hotmail: Free, trusted and rich email service. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] formula for degrees of freedom for nonlinear mixed model in nlme
Dear forum members, What is the formula to calculate denominator degrees of freedom (den df) for nonlinear mixed-effect models with covariates? My model is similar to a CO2 uptake example from Pinheiro and Bates (2000, page 376). In this CO2 dataset, there are two treatments and two types (84 observations in total), but den df for each parameter of the model is 64. Isnt it too high? Your help is greatly appreciated, Julia Summary of the CO2 example: summary(fm4CO2.nlme) Nonlinear mixed-effects model fit by maximum likelihood Model: uptake ~ SSasympOff(conc, Asym, lrc, c0) Data: CO2 AIC BIClogLik 388.4185 420.0191 -181.2092 Random effects: Formula: list(Asym ~ 1, lrc ~ 1) Level: Plant Structure: General positive-definite, Log-Cholesky parametrization StdDev Corr Asym.(Intercept) 2.349640 As.(I) lrc.(Intercept) 0.079597 -0.92 Residual 1.791962 Fixed effects: list(Asym + lrc ~ Type * Treatment, c0 ~ 1) Value Std.Error DF t-value p-value Asym.(Intercept) 41.81756 1.562426 64 26.76451 0. Asym.TypeMississippi -10.53045 2.208318 64 -4.76854 0. Asym.Treatmentchilled -2.96943 2.213172 64 -1.34171 0.1844 Asym.TypeMississippi:Treatmentchilled -10.90037 3.112220 64 -3.50244 0.0008 lrc.(Intercept)-4.55724 0.096291 64 -47.32785 0. lrc.TypeMississippi-0.10412 0.121683 64 -0.85570 0.3954 lrc.Treatmentchilled -0.17124 0.111959 64 -1.52953 0.1311 lrc.TypeMississippi:Treatmentchilled0.74188 0.221742 64 3.34570 0.0014 c0 50.51075 4.364727 64 11.57249 0. Correlation: As.(I) Asy.TM Asym.T A.TM:T lr.(I) lrc.TM Asym.TypeMississippi -0.703 Asym.Treatmentchilled -0.701 0.496 Asym.TypeMississippi:Treatmentchilled 0.497 -0.709 -0.711 lrc.(Intercept) -0.627 0.415 0.407 -0.278 lrc.TypeMississippi0.458 -0.680 -0.322 0.482 -0.535 lrc.Treatmentchilled 0.500 -0.351 -0.717 0.509 -0.594 0.445 lrc.TypeMississippi:Treatmentchilled -0.262 0.375 0.362 -0.547 0.365 -0.553 c0-0.086 0.014 0.001 0.019 0.590 -0.033 lrc.Tr l.TM:T Asym.TypeMississippi Asym.Treatmentchilled Asym.TypeMississippi:Treatmentchilled lrc.(Intercept) lrc.TypeMississippi lrc.Treatmentchilled lrc.TypeMississippi:Treatmentchilled -0.511 c0-0.057 0.140 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -2.86206487 -0.49445730 -0.04217037 0.56599012 3.04061332 Number of Observations: 84 Number of Groups: 12 Link to the book: http://books.google.com/books?id=N3WeyHFbHLQCpg=PA139lpg=PA139dq=mixed-effect+model+building+first+stepsource=blots=pR7PWIuKu8sig=TLhq-k5O4ZNwkBWcyQI8VZk9Umkhl=enei=1HguSrKaPJi0Nb3DnfUJsa=Xoi=book_resultct=resultresnum=1#PPA376,M1 _ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] what is this experimental design (mixed-effects model)?
Dear R community, I am wondering what experimental design I am dealing with? I study the effect of daily air temperature on daily body temperature of the overwintering turtles (i.e. sleeping in soil). The model is a cosine wave with the air temperature as a covariate. Objects are 19 overwintering turtles. Data were combined over the three years. Each turtle was studied only once during these years, while 2 turtles were studied during two years (see table below). The study area was the same for these three studied years. Turtles were overwintering in different sites within this area. Is that correct to treat the study years as a random effect? I understand that I should incorporate autocorrelation model to account for daily variations in turtles body temperature. Is there a spatial correlation between the three study years, since the study was done within the same area? Study year turtle# 2005 year 1 2 3 4 5 6 7 2006 year 8 9 0 11 12 2006 year 13 14 15 4 16 17 18 12 19 Thanks for your help, Julia Internet Explorer 8 Now Available. Faster, safer, easier. Download FREE now! _ Rediscover Hotmail®: Now available on your iPhone or BlackBerry Mobile2_042009 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Do we have to control for block in block designs if it is insignificant?
I am wondering if in a block experimental design (ex. triple square lattice), the block effect was not significant, is it all right not to include the block effect in an empirical model (even though the sampling was done from different blocks)? Or we are forced to control for the block effect in block designs anyway? Thanks, Julia _ Internet Explorer 8 Now Available. Faster, safer, easier. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Is this sample size big enough to test for statistical significance?
Dear R community, Is this sample size large enough to study differences between two groups of the populations? Q1: do the body temperatures differ between the two groups of the overwintering turtles juveniles and adults? One group (adults) has 6 turtles Second group (juveniles) has 1 turtle. There are 3 replications, i.e. the experiment was repeated over the three years, but using different turtles. We had about 130 observations (daily body temperature) per each turtle per year. I would like to test for monthly or daily differences in body temperature between the two groups controlling for month and year effects. I understand that one number of observations in the second group is not enough, but there are three replications and many observations per one subject. Thanks. _ [[elided Hotmail spam]] [[elided Hotmail spam]] [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] simple for loop program for merging datasets?
Dear R community, I would like to merge two datasets based on the categorical predictor country. Dataset A: Country Measure1 Afganistan1 Afganistan1 Russia 5 Poland 3 Poland 2 Dataset B: Country Measure 2 Russia 2 Afganistan10 Poland 15 My program does not work: Country_A-A$Country Country_B-B$Country Measure2-B$Measure2 for(i in 1:nrow(B)){ for(j in 1:nrow(A){ w[j]-ifelse(Country_A[j]= =(Country_B[i]),Measure2[i], NA) }} A2-cbind(B,w) Thanks, Julia _ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Tukey, planned contrasts or t-test without ANOVA? What is correct?
Dear R community, I compare mean monthly body temperature between two age classes of turtles overwintering underground. lm(body_tem ~ Month*Year*Age_Class) TukeyHSD(aov(body_tem ~ Month*Year*Age_Class, a)) The Tukey HSD as well as the planned contrasts method showed significant differences between the two age classes, but insignificant differences between the two age classes at the same levels of months. In the opposite, using a t-test for comparison of independent means (i.e. without using the ANOVA) it demonstrated insignificant differences between the two age classes. What result is correct? Thanks, Julia _ cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Advice requested: Best method of coding time since repeating event
Hello, I have a dataset containing approx 1000 events spanning four years (2004.03 to 2008.07). For each event, I'd like to determine the time (in minutes) since the most recent final Wednesday of the month. I've found no obvious solution on the list or online; I think I'll try to use functions in the chron package. Anyone have any other advice? Thanks. M-J School of Population and Public Health, University of British Columbia Vancouver, Canada Centre for Excellence in HIV/AIDS, St. Paul's Hospital Vancouver, Canada __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Test for multiple comparisons: Nonlinear model, autocorrelation?
Thanks for your help and suggestions. Thats exactly what I did, i.e. a sin () and cos () code using daily observations of soil temperature, and putting a variable vegetation types as a covariate. Therefore, I can build contrasts to compare parameters of the model such as an intercept, amplitude and phase between different vegetation types. If I understand correctly, you mean to do the similar model but using average monthly data of soil temperature instead of daily soil temperature? Still, I think that the model will allow us comparison of the parameters of the model such as an intercept, amplitude and phase between the vegetation types, but not the monthly soil temperature between different vegetation types Thanks for your help and I am sorry if I did not understand it correctly or did not describe the experiment clearly. Julia Date: Sun, 6 Jul 2008 08:38:51 -0700 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@r-project.org Subject: Re: [R] Test for multiple comparisons: Nonlinear model, autocorrelation? If I had only a very limited time to do this, I might include 'month' as another effect, probably coded as 'sin' and 'cos' on an annual cycle rather than as 12 individual Indicators. This would allow you to explore not only main effects but interactions with plots. Before I did that, however, I'd want to generate more plots of data, residuals, and coefficients. For example, qqnorm(resid(fm1Soy.nlme), datax=TRUE) displayed an S shape that indicated inhomogeniety of variance. This suggests that there is something else to be modeled in these data. I would next try plotting residuals by 'month'. I'd also plot the averages and standard deviations by 'month'. This might tell me if I only need to add a fixed annual cycle, and how much of a Fourier series approximation to add. If the standard deviations show a pattern, it suggests I need to model heteroscedasticity. For that see '?varClasses' and the corresponding information in a book by Pinheiro and Bates (2000), mentioned on that help page. You can do 'anova' for any of these effects. [To test changes in fixed effects, you will need to use method='ML', as discussed in a book by Pinheiro and Bates (2000).] Hope this helps. Spencer J S wrote: Thanks. Here is a similar example from a book by Pinheiro and Bates (2000, chapter 6): library(nlme) data(Soybean) fm1Soy.lis - nlsList( weight ~ SSlogis(Time, Asym, xmid, scal), data = Soybean ) fm1Soy.nlme - nlme( fm1Soy.lis ) *If we would like to make comparisons among the years we could just simply involve years as a covariate, and later we could use L argument to ANOVA to could compute contrasts. * soyFix - fixef( fm1Soy.nlme ) fm2Soy.nlme - update( fm1Soy.nlme, fixed = Asym + xmid + scal ~ Year, start = c(soyFix[1], 0, 0, soyFix[2], 0, 0, soyFix[3], 0, 0) ) * * *My question is: How can I compare variety of soybeans in a separate month, i.e. if there was a difference in weight of soybeans F and P in first month, in twelve month?* The dataset Soybean: Plot Variety Year Time weight 1 1988F1 F 1988 14 0.106000 2 1988F1 F 1988 21 0.261000 3 1988F1 F 1988 28 0.666000 4 1988F1 F 1988 35 2.11 5 1988F1 F 1988 42 3.56 . 407 1990P8 P 1990 30 1.478330 408 1990P8 P 1990 37 2.601667 409 1990P8 P 1990 43 6.343330 410 1990P8 P 1990 51 6.131670 411 1990P8 P 1990 64 16.411700 412 1990P8 P 1990 79 16.946700 1) Involving months and variety as a covariates will probably create too many parameters for the model? 2) Is it possible to use some test for comparisons, lets say t test? Perhaps not in case the data are dependent (i.e. previous measurement is dependent on the next measurement, i.e. there is temporal correlation (as in my study of Soil temperature)? What is an alternative suggestion? Thanks, Julia Date: Fri, 4 Jul 2008 17:36:29 -0700 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@r-project.org Subject: Re: [R] Test for multiple comparisons: Nonlinear model, autocorrelation? The question seems too general for me to offer specific suggestions. What problem are you trying to solve that you think 'multiple comparisons' will answer? Can you produce a similar problem that is completely self-contained example that eliminates complexity that may not be needed to understand your question (similar to the 'Auxiliary Problem' technique in How to Solve It, http://en.wikipedia.org/wiki/How_to_Solve_It)? If you can, it may lead you to a solution. If you get such an example but still can't see a solution, send that example to this list (following the advice in the posting guide http://www.R-project.org/posting-guide.html). The simpler the example, the more likely someone on this list will reply quickly with a useful suggestion. I know this doesn't solve your problem, but I
Re: [R] Test for multiple comparisons: Nonlinear model, autocorrelation?
Thanks. Here is a similar example from a book by Pinheiro and Bates (2000, chapter 6): library(nlme) data(Soybean) fm1Soy.lis - nlsList( weight ~ SSlogis(Time, Asym, xmid, scal),data = Soybean ) fm1Soy.nlme - nlme( fm1Soy.lis ) If we would like to make comparisons among the years we could just simply involve years as a covariate, and later we could use L argument to ANOVA to could compute contrasts. soyFix - fixef( fm1Soy.nlme ) fm2Soy.nlme - update( fm1Soy.nlme,fixed = Asym + xmid + scal ~ Year,start = c(soyFix[1], 0, 0, soyFix[2], 0, 0, soyFix[3], 0, 0) ) My question is: How can I compare variety of soybeans in a separate month, i.e. if there was a difference in weight of soybeans F and P in first month, in twelve month? The dataset Soybean: Plot Variety Year Timeweight 1 1988F1 F 1988 14 0.106000 2 1988F1 F 1988 21 0.261000 3 1988F1 F 1988 28 0.666000 4 1988F1 F 1988 35 2.11 5 1988F1 F 1988 42 3.56 . 407 1990P8 P 1990 30 1.478330 408 1990P8 P 1990 37 2.601667 409 1990P8 P 1990 43 6.343330 410 1990P8 P 1990 51 6.131670 411 1990P8 P 1990 64 16.411700 412 1990P8 P 1990 79 16.946700 1) Involving months and variety as a covariates will probably create too many parameters for the model? 2) Is it possible to use some test for comparisons, lets say t test? Perhaps not in case the data are dependent (i.e. previous measurement is dependent on the next measurement, i.e. there is temporal correlation (as in my study of Soil temperature)? What is an alternative suggestion? Thanks, Julia Date: Fri, 4 Jul 2008 17:36:29 -0700 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@r-project.org Subject: Re: [R] Test for multiple comparisons: Nonlinear model, autocorrelation? The question seems too general for me to offer specific suggestions. What problem are you trying to solve that you think 'multiple comparisons' will answer? Can you produce a similar problem that is completely self-contained example that eliminates complexity that may not be needed to understand your question (similar to the 'Auxiliary Problem' technique in How to Solve It, http://en.wikipedia.org/wiki/How_to_Solve_It)? If you can, it may lead you to a solution. If you get such an example but still can't see a solution, send that example to this list (following the advice in the posting guide http://www.R-project.org/posting-guide.html). The simpler the example, the more likely someone on this list will reply quickly with a useful suggestion. I know this doesn't solve your problem, but I hope it helps. Spencer J S wrote: Dear R community, I have a nonlinear model describing average daily soil temperature. What test should I use to compare differences in soil temperature of the two studied vegetation types depending upon month?Building linear contrasts for the developed nonlinear model does not help since this model does not include variable Months (only Days). 1) Just a Students test is not probably an option because I would violate an assumption of independency, since the daily soil temperature observations have high autocorrelation. Or maybe I could average the observations for each month and then use this test since I have observations for a few years, and it might overcome the problem of independency?2) Should I develop a second nonlinear model with months instead of days, but it would considerably increase a number of parameters in the model...Or: 3) ?Thanks for your help, Julia _ Its a talkathon but its not just talk. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. _ The im Talkaton. Can 30-days of conversation change the world? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Test for multiple comparisons: Nonlinear model, autocorrelation?
Dear R community, I have a nonlinear model describing average daily soil temperature. What test should I use to compare differences in soil temperature of the two studied vegetation types depending upon month? Building linear contrasts for the developed nonlinear model does not help since this model does not include variable Months (only Days). 1) Just a Students test is not probably an option because I would violate an assumption of independency, since the daily soil temperature observations have high autocorrelation. Or maybe I could average the observations for each month and then use this test since I have observations for a few years, and it might overcome the problem of independency? 2) Should I develop a second nonlinear model with months instead of days, but it would considerably increase a number of parameters in the model... Or: 3) ? Thanks for your help, Julia _ Its a talkathon but its not just talk. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] mathematical expression of probability function?
Dear R forum, I have a concern regarding a mathematical expression of the probability function (see below). I know how to write it for only one index i, but we have two : i (country) and j (year). We have a set of N observations of country year ij (or ith country in jth year). Basically, I could replace ij as a one index t and call it as a country year observation. Anyway, how to write this expression correctly for two indices i and j? Or shall we put two product signs instead? The expression is similar to this: Large Mathematical Sign of Product as a function of (Xij), where the low subscript of the Product is ij=1 and an upper subscript is ij=N. Thanks, Julia _ Search that pays you back! Introducing Live Search cashback. rchpaysyouback [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Alternative options: nonlinear model autocorrelation?
Dear R community, Using nlme library I have developed a nonlinear mixed model. Incorporating an autoregressive model gives me an error that I can't allocate vector of size X. The problem is that my computer does not have enough physical memory most probably due to a large number of observations (17,000). I was wondering what alternative options I might use: 1) To use ARIMA and calculate residuals, and then to apply my nonlinear model to the residuals. I have a feeling it does not sound reasonable. 2) If I could reduce the number of observations, my original plan would work well and I would not have a problem with physical memory. How to reduce the number of observations? My data consist of six sites with two plots per site. A) To average data from two plots? It seems to me we can loose some information; B) To model the effect of plots and remove it from the observations, then to average the residuals for two plots within each of the sites and apply the nonlinear model? Your suggestions are appreciated. Thanks, Julia PS: My data are daily data of soil temperature for six years, six sites and two plots per site. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Alternative options: nonlinear model autocorrelation?
Dear R community, Using nlme library I have developed a nonlinear mixed model. Incorporating an autoregressive model gives me an error that I cant allocate vector of size X. The problem is that my computer does not have enough physical memory most probably due to a large number of observations (17,000). I was wondering what alternative options I might use: 1) To use ARIMA and calculate residuals, and then to apply my nonlinear model to the residuals. I have a feeling it does not sound reasonable. 2) If I could reduce the number of observations, my original plan would work well and I would not have a problem with physical memory. How to reduce the number of observations? My data consist of six sites with two plots per site. A) To average data from two plots? It seems to me we can loose some information; B) To model the effect of plots and remove it from the observations, then to average the residuals for two plots within each of the sites and apply the nonlinear model? Your suggestions are appreciated. Thanks, Julia PS: My data are daily data of soil temperature for six years, six sites, two plots per site. _ Refresh_family_safety_052008 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] autocorrelation error: cannot allocate vector of size 220979 Kb
Thanks. Here are some information about my computer and file: Operating system: Windows 2000 RAM: 1.99 GB After I run the program: gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 468065 12.5 818163 21.9 818163 21.9 Vcells 1160828 8.9 46162021 352.2 54869490 418.7 object.size(a) [1] 2144392 str(a) 'data.frame': 16925 obs. of 14 variables: $ Site : Factor w/ 6 levels HD,LEA,MCD,..: 6 6 6 6 6 6 6 6 6 6 ... $ Plot : num 1 1 1 1 1 1 1 1 1 1 ... $ Veg : Factor w/ 2 levels Forest,Grass: 2 2 2 2 2 2 2 2 2 2 ... $ Landuse : Factor w/ 2 levels Rural,Urban: 2 2 2 2 2 2 2 2 2 2 ... $ Date : Factor w/ 2484 levels 01-Apr-01,01-Apr-03,..: 1078 1162 1244 1326 1407 1488 1569 1650 1731 1812 ... $ Soil.temp : num 26.1 25.9 26.0 25.7 25.5 ... $ combin: Factor w/ 6 levels HDForestUrban,..: 6 6 6 6 6 6 6 6 6 6 ... $ year_scale: num -1.4 -1.4 -1.4 -1.4 -1.4 ... $ day : num 14 15 16 17 18 19 20 21 22 23 ... $ M : num 8 8 8 8 8 8 8 8 8 8 ... $ year : Factor w/ 8 levels 2000,2001,..: 4 4 4 4 4 4 4 4 4 4 ... $ combin2 : Factor w/ 11 levels HDForestUrban1,..: 10 10 10 10 10 10 10 10 10 10 ... $ time : num 225 226 227 228 229 230 231 232 233 234 ... $ time_scale: num 32.8 33.8 34.8 35.8 36.8 ... On Sat, May 17, 2008 at 5:04 PM, jim holtman [EMAIL PROTECTED] wrote: More information is needed. What is your operating system? How much RAM do you have? Are there other objects in memory that you could delete to recover some space? What does 'str' and 'object.size' say for the data you are analyzing? What does 'gc()' report - you may want to do this before/after sections of code to see how memory might be growing. On Fri, May 16, 2008 at 1:56 PM, J S [EMAIL PROTECTED] wrote: Dear R community, I used a linear mixed model (named lm11) to model daily soil temperature depending upon vegetation cover and air temperature. I have almost 17,000 observations for six years. I can not account for autocorrelation in my model, since I receive the error message after applying the function: update(lm11, corr=corAR1()) Error: cannot allocate vector of size 220979 Kb Do you have any suggestions? Thanks, Julia [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.htmlhttp://www.r-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] autocorrelation in nlme: Error: cannot allocate vector of size 220979 Kb
Dear R community, Below you may find the details of my model (lm11). I receive the error message Error: cannot allocate vector of size 220979 Kb after applying the autocorrelation function update(lm11, corr=corAR1()). lm11-lme(Soil.temp ~ Veg*M+Veg*year, data=a, random = list(Site=pdDiag(~Veg), Plot=pdDiag(~Veg)) Dataset: a-data frame of daily measurements of soil temperature (Soil.temp) over six years Site (6 sites), Plot(2 plots per site), Veg(2 vegetation types: 2 sites as grassland, 4 sites as forest) M-month (categorical predictor) year (continues) Thanks, Julia P.S. I a sorry if this message showed up a few times, since I had trouble posting it. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] autocorrelation error: cannot allocate vector of size 220979 Kb
Dear R community, I used a linear mixed model (named lm11) to model daily soil temperature depending upon vegetation cover and air temperature. I have almost 17,000 observations for six years. I can not account for autocorrelation in my model, since I receive the error message after applying the function: update(lm11, corr=corAR1()) Error: cannot allocate vector of size 220979 Kb Do you have any suggestions? Thanks, Julia [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] autocorrelation in nlme; Error: cannot allocate vector of size
Dear R community, I used a linear mixed model (named lm11) to model daily soil temperature depending upon vegetation cover and air temperature. I have almost 17,000 observations for six years. I can not account for autocorrelation in my model, since I receive the error message after applying the function: update(lm11, corr=corAR1()) Error: cannot allocate vector of size 220979 Kb Do you have any suggestions? Thanks, Julia [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] autocorrelation in nlme; Error: cannot allocate vector of size
Dear R community, Here are details of my model, which gives me trouble modeling autocorrelation. lm11-lme(Soil.temp ~ Veg*M+Veg*year, data=a, random = list(Site=pdDiag(~Veg), Plot=pdDiag(~Veg)) dataset: a-data frame of daily measurements of soil temperature (Soil.temp) over six years Site (6 sites), Plot(2 plots per site), Veg(2 vegetation types: 2 sites as grassland, 4 sites as forest) M-month (categorical predictor) year (continues) Thanks, Julia Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens J S Verzonden: vrijdag 16 mei 2008 23:06 Aan: r-help@r-project.org Onderwerp: [R] autocorrelation in nlme; Error: cannot allocate vector of size Dear R community, I used a linear mixed model (named lm11) to model daily soil temperature depending upon vegetation cover and air temperature. I have almost 17,000 observations for six years. I can not account for autocorrelation in my model, since I receive the error message after applying the function: update(lm11, corr=corAR1()) Error: cannot allocate vector of size 220979 Kb Do you have any suggestions? Thanks, Julia [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.htmlhttp://www.r-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] for loop, my program does not make a cycle
Dear R community, I wrote a small program using for loop but it does not make cycles. My data: Dataframes: a2, a1, b0 and b1. Vector: d I would like to get b1 for each of i., i.e. totally 11. However, the program gives me b1 only for the last i =11. d-as.vector(levels(a2$combin2)) for (i in 1:11){ a1-a2[a2$combin2%in%d[i],] b1-b0[b0$Date%in%(a1$Date),] } Your help is appreciated. Maybe someone could also recommend me good literature on for loops in R? Thanks, Julia _ Get Free (PRODUCT) RED Emoticons, Winks and Display Pics. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.