search for: modelb

Displaying 14 results from an estimated 14 matches for "modelb".

Did you mean: model
2012 Nov 01
2
Name assignment in for loop
...rget of assignment expands to non-language object". The linear model runs without error; only the name is problematic. Here is the current loop syntax. The use of dat and dat2 is not an error. I'm pulling data from 2 sources for the model. for (i in 1:dim(dat2)[[1]]) { assign("modelb",i) <- lm(log(dat$flux) ~ dat$Tsoil_flux, subset = dat$chamber == dat2$chamber[i] & dat$year == dat2$year[i] & dat$doy >= dat2$day1[i] & dat$doy <= dat2$day2[i]) dat2$coef[i] <- coef(assign("modelb",i, sep = ""))[[2]] dat2$Rsq[i] <- summary(assig...
2009 Oct 28
2
regression on large file
...************************ Georg Ehret, Johns Hopkins U, Baltimore MD, USA for (i in 16:nmax){ line<-scan(file=paste(file),nlines=1,skip=(i-1),what="integer",sep=",") d<-as.numeric(line[-1]) name<-line[1] modela <- lm(s1~a+a2+b+s+M+W) modelb <- lm(s2~a+a2+b+s+M+W+d) modelc <- lm(s3~a+2+b+s+M+W+d+d*s) p_main <- anova(modela,modelb)$P[2] p_main_i <- anova(modela,modelc)$P[2] p_i <- anova(modelb,modelc)$P[2] cat(c(name,p_main,p_main_i,p_i),file=paste("out",".txt",sep=&quo...
2006 Mar 10
1
Validate fields and display errors from two models?
...'ve been working at for a little while but I can''t seem to get the error messages to appear correctly. My form looks something like this for "ModelA": [errors_for "modelA"] [form for "modelA"] [text "modelA" "fieldname1"] [text "modelB" "fieldname2"] [submit] [/form] The reason for this is I can create many modelB''s for each modelA but when I create modelA I want it to create the first modelB with it. So... In my Model: class ModelA validates_presence_of :fieldname1 has_many :modelBs validates_associa...
2005 Oct 31
2
Cascading Comboboxen and GO button ?
Hello all, I have two comboboxen, comboA is popultaed when :controller/list is retrieved first time. When comboA is selected, I want to auto-populate comboB (modelB belongs_to modelA). The population of tableC (modelC belongs_to modelB and belongs_to modelA) should not populate until a "GO" button is clicked (link_to with submit). Help? I need an example of how to filter the post @params and also how to preserve teh selections when "GO" is...
2006 Apr 06
5
Using helper method of another model
I have a template that belongs to a certain model (model A). I need to call a helper method of a different model (model B). Then I need the helper method of B to call a helper method of model C. I tried using "include" and "require" and using namespaces, but I got "undefined method". What is the way to do it? -- Posted via http://www.ruby-forum.com/.
2009 Oct 12
1
Speed up and limit memory usage of lm()
...I have therefore been trying to speed the process and limit the memory usage. Here follows part of the code do give better understanding of what I am doing: modela <- lm(RSSYS10 ~ RS_AGE + RS_AGESQ + SEX + RS_BMI) frssys <- function(SNP_A1,data=sys_pheno, model=modela){ modelb <- lm(RSSYS10 ~ RS_AGE + RS_AGESQ + SEX + RS_BMI + SNP_A1,data=data) modelc <- lm(RSSYS10 ~ RS_AGESQ + SEX + RS_BMI + SNP_A1 * RS_AGE,data=data) p1 <- anova(model,modelb)$P[2] p2 <- anova(model,modelc)$P[2] p3 <- anova(modelb,modelc)$P[2] } result_matrix <- appl...
2006 Jul 07
2
Diverging results with SPSS
...lly. I tried to replicate an analysis I did previously in SPSS using R, and was surprised to find different results. So my question is: shouldn't the following SPSS syntax REGRESSION DEPENDENT INC89 /METHOD=ENTER hiedyrs experien SE93rec. Yeld the same results of the following R command modelB<-lm(INC89~HIEDYRS+EXPERIEN+SE93REC) I assume the is some difference in some default options.Or maybe it was a problem when the data was imported. After using the read.spss in the foreign package, I got the following warning message: Unrecognized record type 7, subtype 16 encountered in system...
2006 Mar 31
1
model comparison with mixed effects glm
I use model comparison with glms without mixed effects with anova(modelA,modelB), with mixed effects glm (glmmPQL), this doesn't work. Is there a way to compare model fits with glmmPQL's? Paula M. den Hartog Behavioural Biology Institute of Biology Leiden Leiden University [[alternative HTML version deleted]]
2007 Dec 13
4
please explain find_with_ferret, retrieve_records, :include and :conditions
Hello, I''m using find_with_ferret to search multiple models and it works great. The trouble is I need to filter the results using :include and :conditions. I get two errors depending on the syntax I use in the search. Reading the source, I see the retrieve_records method seems to filter the :include and :conditions so that they only apply to the relevant model when searching
2010 Dec 13
1
Testing an interaction with a random effect in lmer
...ns. Is there a way to do this in the lmer package? When i put it in directly: model<-lmer(binom~season*group+(1|group/individual),binomial,data=data1) I get an error messgae: Warning message: In mer_finalize(ans) : gr cannot be computed at initial par (65) The model runs with the following: modelb<-lmer(binom~season*(1|group)+(1|group/badger),binomial,data=data1) or modelb<-lmer(binom~season+(1|group/badger)+(1|group:season),binomial,data=data1) but here I guess I am modelling it as part of the random effect so can't plug out coefficients for the different groups in different seas...
2007 Dec 19
3
multi-model search best practices
Hi folks. If I am indexing ModelA and ModelB and I want to search both of them, I usually just pick one arbitrarily and use it for #multi_search. Is there a slicker pattern, regarding from which model to invoke #multi_search? Can it be invoked directly from the Ferret library? Has anyone put together some sort of "dummy" sear...
2008 Jun 30
0
Making a copy of a model and all its associated records.
Hi all, I have a question regarding the duplication of a model and it''s associations. For example, if I have ModelA and it has_many SubModelAs and has_many SubModelBs associated with it. Each of the SubModels a belongs to ModelA. Is there a quick way of copying ModelA and the structure that lays below it? In the end I''ll then end up with ModelB which is a copy of A, and it has copies of SubModelA and SubModelB records. Cheers, Diego --~--~---------~--...
2008 Sep 26
0
self-referential tags, has_many_polymorphs
...oks like acts_as_taggable is not the best piece of code, and I''m hoping to use the has_many_polymorphs plugin from http://github.com/fauna/has_many_polymorphs/tree/master. After installing this plugin, and generating a tagging framework using the builtin script/generator tagging ModelA ModelB Tag --self-referential command, I am unable to use the tags, and instead receive the following error ActiveRecord::Associations::PolymorphicError: You can''t have a self-referential polymorphic has_many :through without renaming the non-polymorphic foreign key in the join model. Do...
2003 Jul 23
6
Condition indexes and variance inflation factors
Has anyone programmed condition indexes in R? I know that there is a function for variance inflation factors available in the car package; however, Belsley (1991) Conditioning Diagnostics (Wiley) notes that there are several weaknesses of VIFs: e.g. 1) High VIFs are sufficient but not necessary conditions for collinearity 2) VIFs don't diagnose the number of collinearities and 3) No one has