similar to: variables in object names

Displaying 20 results from an estimated 1000 matches similar to: "variables in object names"

2006 Oct 18
2
Nested source() errors
Does anyone know of any issues with nesting source() calls within multiple scripts? I have at least one script which always finds errors when I source it but runs fine when run on its own. It containd source() calls to other scripts and it seems to fail during the first nested source() command. Ken Kenneth B. Pierce Jr. Research Ecologist Landscape Ecology, Modeling, Mapping and Analysis
2007 Sep 07
2
Running a PERL script from R
Is there a way to run a simple perl script from R? Kenneth B. Pierce Jr. Research Ecologist Landscape Ecology, Modeling, Mapping and Analysis Team PNW Research Station - USDA-FS 3200 SW Jefferson Way, Corvallis, OR 97331 ken.pierce@oregonstate.edu 541 750-7393 http://www.fsl.orst.edu/lemma/gnnfire http://www.fsl.orst.edu/R_users/index.php [[alternative HTML version deleted]]
2006 Sep 20
1
problem coercing truncated character vector to levels
Dear R wizes, I have a data.frame of species abundances with column names consisting of 4 letter codes then an underscore and a number like this: abco_1, abco_2, abco_3, psm_1, psme_2, psme_3, etc. I would like to get an identifier for all the abco, and psme and other species etc. I used spec.fact<-substring(names(spec.count),1,4) To make a vector of the first 4 letters of
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
2010 Sep 29
1
Understanding linear contrasts in Anova using R
#I am trying to understand how R fits models for contrasts in a #simple one-way anova. This is an example, I am not stupid enough to want #to simultaneously apply all of these contrasts to real data. With a few #exceptions, the tests that I would compute by hand (or by other software) #will give the same t or F statistics. It is the contrast estimates that R produces #that I can't seem to
2005 Mar 01
3
packages masking other objects
hello all, I am trying to use the function getCovariateFormula(nlme) in conjunction with the library lme4. When I load both packages I get the following message and the getCovariateFormula function no longer works: library(nlme) library(lme4) Attaching package 'lme4': The following object(s) are masked from package:nlme : contr.SAS getCovariateFormula
2009 Mar 09
1
lme anova() and model simplification
I am running an lme model with the main effects of four fixed variables (3 continuous and one categorical – see below) and one random variable. The data describe the densities of a mite species – awsm – in relation to four variables: adh31 (temperature related), apsm (another plant feeding mite) awpm (a predatory mite), and orien (sampling location within plant – north or south). I have read
2005 Jul 15
1
nlme and spatially correlated errors
Dear R users, I am using lme and nlme to account for spatially correlated errors as random effects. My basic question is about being able to correct F, p, R2 and parameters of models that do not take into account the nature of such errors using gls, glm or nlm and replace them for new F, p, R2 and parameters using lme and nlme as random effects. I am studying distribution patterns of 50 tree
2010 Oct 03
5
How to iterate through different arguments?
If I have a model line = lm(y~x1) and I want to use a for loop to change the number of explanatory variables, how would I do this? So for example I want to store the model objects in a list. model1 = lm(y~x1) model2 = lm(y~x1+x2) model3 = lm(y~x1+x2+x3) model4 = lm(y~x1+x2+x3+x4) model5 = lm(y~x1+x2+x3+x4+x5)... model10. model_function = function(x){ for(i in 1:x) { } If x =1, then the list
2009 Mar 31
1
using "substitute" inside a legend
Hello list, I have a linear regression: mylm = lm(y~x-1) I've been reading old mail postings as well as the plotmath demo and I came up with a way to print an equation resulting from a linear regression: model = substitute(list("y"==slope%*%"x", R^2==rsq), list(slope=round(mylm$coefficients[[1]],2),rsq=round(summary(mylm)$adj.r.squared, 2))) I have four models and I
2010 Mar 28
1
keeping track of who did what
hello everybody. i need to log "who did what" on some models. i was reading recipe 59 of rails recipes and i created something like that: class LogSweeper < ActionController::Caching::Sweeper observe :model1, :model2, :model3, :model4, :model5, ... after_save(model) save_log(model, "save") end after_destroy(model) save_log(model, "destroy) end
2011 Sep 28
2
GAMs in R : How to put the new data into the model?
I have 5 GAMs ( model1, model2, model3, model4 and model5) Before I use some data X(predictor -January to June data) to form a equation and calculate the expected value of Y (predictand -January to June). After variable selection, GAMs (Model 1)were bulit up! R-square :0.40 NOW, I want to use new X'( predictor -July - December data) and put into Model 1, then get the expected value of Y'
2009 Feb 09
1
gee with auto-regressive correlation structure (AR-M)
Dear all, I need to fit a gee model with an auto-regressive correlation structure and I faced some problems. I attach a simple example: ####################################################### library(gee) library(geepack) # I SIMULATE DATA FROM POISSON DISTRIBUTION, 10 OBS FOR EACH OF 50 GROUPS set.seed(1) y <- rpois(500,50) x <- rnorm(500) id <- rep(1:50,each=10) # EXAMPLES FOR
2007 Oct 17
1
problem with anova() and syntax in lmer
Dear R user I have 2 problems with lmer. The statistical consultance service of my university has recomended to me to expose those problems here. Sorry for this quite long message. Your help will be greatly appreciated... Gilles San Martin 1) anova() I fit a first model : model1 <- lmer(eclw~1 + density + landsc + temp + landsc:temp + (1|region) + (1|region:pop) + (1|region:pop:family),
2012 Nov 08
2
Comparing nonlinear, non-nested models
Dear R users, Could somebody please help me to find a way of comparing nonlinear, non-nested models in R, where the number of parameters is not necessarily different? Here is a sample (growth rates, y, as a function of internal substrate concentration, x): x <- c(0.52, 1.21, 1.45, 1.64, 1.89, 2.14, 2.47, 3.20, 4.47, 5.31, 6.48) y <- c(0.00, 0.35, 0.41, 0.49, 0.58, 0.61, 0.71, 0.83, 0.98,
2011 Apr 14
1
mixed model random interaction term log likelihood ratio test
Hello, I am using the following model model1=lmer(PairFrequency~MatingPair+(1|DrugPair)+(1|DrugPair:MatingPair), data=MateChoice, REML=F) 1. After reading around through the R help, I have learned that the above code is the right way to analyze a mixed model with the MatingPair as the fixed effect, DrugPair as the random effect and the interaction between these two as the random effect as well.
2010 Feb 09
1
Missing interaction effect in binomial GLMM with lmer
Dear all, I was wondering if anyone could help solve a problem of a missing interaction effect!! I carried out a 2 x 2 factorial experiment to see if eggs from 2 different locations (Origin = 1 or 2) had different hatching success under 2 different incubation schedules (Treat = 1 or 2). Six eggs were taken from 10 females (random = Female) at each location and split between the treatments,
2002 Jun 20
2
scatterplot3d
Hello, I am trying to replicate example 4 in the package 'scatterplot3d': s3d.dat_data.frame(cols=as.vector(col(my.model4)), rows=as.vector(row(my.model4)), value=as.vector(my.model4)) scatterplot3d(s3d.dat, type="h", lwd=5, pch=" ", x.ticklabs=colnames(my.model4), y.ticklabs=rownames(my.model4), main="Conditional probabilities, Model 3") Nice! but,
2009 Dec 10
1
updating arguments of formulae
Dear R-Community, I am relatively new with R, so sorry for things which for you might be obvious... I am trying to automatically update lmer formulae. the variables of the model are: depM= my dependent measure Sb2= a random factor OS = a predictor VR= another predictor So, I am building the first model with random intercept only: model = lmer(depM ~ (1 |Sb2)) then I update the formula
2012 Mar 14
1
lme code help
Hi guys, Got a few days left and I need to model a random effect of species on the body mass (logM) and temperature (K) slopes. This is what i've done so far that works: model1<-lme(logSSP~logM + K,random=~1|species,data=data1) model2<-lme(logSSP~logM + K,random=~K|species,data=data1) model3<-lme(logSSP~logM + K,random=~logM|species,data=data1) The one I now want is: