similar to: interaction terms in formula of lm or glm

Displaying 20 results from an estimated 7000 matches similar to: "interaction terms in formula of lm or glm"

2011 Jan 21
0
Marginality rule between powers and interaction terms in lm()
Dear all, I have a model with simple terms, quadratic effects, and interactions. I am wondering what to do when a variable is involved in a significant interaction and in a non-significant quadratic effect. Here is an example d = data.frame(a=runif(20), b=runif(20)) d$y = d$a + d$b^2 So I create both an simple effect of a and a quadratic effect of b. m = lm(y ~ a + b + I(a^2) + I(b^2) +
2012 Apr 21
1
[LLVMdev] Little Problem about Variable memory allocating way in function
As I want to generate code for the varaible declaration, at first, I thought AllocInstruction()could implement this. However, the name "alloc" seems to allocate memory from heap memory.and the local variable in function should stay at stack memory. In which way did llvm allocate memeory to AllocInstruction() ? Would the memory allocated by AllocInstruction() be recycled back? If not
2017 Mar 03
1
Trouble installing packages when history mechanism is modified by user profile
I tried installing the 'ks' package from my interactive R session, it failed with the following Erreur dans .External2(C_loadhistory, file) : aucun m?canisme d'historique des commandes disponible Calls: <Anonymous> Ex?cution arr?t?e second line is french for "no command history mechanism available", fouth is "execution stopped". This does not happen when I
2012 Nov 21
5
Creating a frequency table for binomial varaible
Hello, I have simulated 30 observations from a binomial(5,0.1) distribution. Now I need to make frequency table( that means I need to tally how many 0's , 1's 2's....... 5's) I know that the simple R function table() will do this, but I am afraid that some times I may get zero frequency for some particular values (for example in the above there are 5-0's 10-1's ,
2006 Apr 25
2
how can I access a class variable outside of the class???
Hi we wanted to access a class varaible from outside of the same class, like class klass @@var1 end we found out we can not use the class variable like this: klass.var1 we have to create a class function like class klass @@var1 def var1 return @@var1 end end If anyone know how to access a class variable directly without passing by a function??? Thanks you very much
2006 Jan 24
3
what this line means exactly? (@@active_connections ||= {})
Hi, I have problem to understand this line does exactly? this is from the class ConnectionSpecficication, methode "active_connections" def self.active_connections #:nodoc: if allow_concurrency Thread.current[''active_connections''] ||= {} else @@active_connections ||= {} end end what the line "@@active_connections ||= {}" means exactly? as I
2011 Mar 14
2
[LLVMdev] How to load a data from the address of unsiged long type
Now I have an address that present in a unsigned long address like the following format: Value* addr = CONST(0xc0008000) But I do not know how to read the data from the above addr varaible. I tried the following three kind of code: 1. Code: Value* addr = CONST(0xc0008000); Value* data = new LoadInst(addr, "", false, bb); Error: Segmentation fault 2. Code(
2006 Mar 01
4
link_to_remote, doesn''t receives params?????
Hi, I''m using link_to_remote to trigger an ajax zone, but depends on a varaible, the new zone has different features. before I has a button inside a form. so when I click on the button, I get the value of the variable inside "params". but since I use link_to_remote now, I don''t get any value from params anymore.... Is there some way I can get the data inside a form
2009 Jun 25
1
interaction terms formula error
Hi, I'm trying to fit a binary logistic regression model, and would like to consider certain characteristics B and C only for people with variable A=1 and not for those with variable A=0, so I'm trying to do the following: model<- lrm(formula= y ~ A: (B+C) + D + E +...) I've had no problem with adding interaction terms using " * ", but every time I try to use
2009 Oct 13
2
update.formula drop interaction terms
Dear R users, How do I drop multiplication terms from a formula using update? e.g. forml=as.formula("Surv(time, status) ~ x1+x2+A*x3+A*x4+B*x5+strata(sex)") #I would like to drop all instances of variable A (the main effect and its interactions). The following: updated.forml=update(forml, ~ . -A) #gives me this: #Surv(time, status) ~ x1 + x2 + x3 + x4 + B + x5 + strata(sex) + A:x3 +
2009 Nov 09
0
Formula for calculating interaction terms in R
Hello - I am trying to figure out R's transformation for interaction terms in a linear regression. My simple background understanding is that interaction terms are generally calculated by multiplying the centred (0-mean) variables with each other and then doing the regression. However, in this regard I would have expected to see the same p-value when I calculate summary(lm(Y~A:B)) for A:B
2012 Sep 13
1
remove all terms with interaction factor in formula
Hi Folks, I'm trying to find a way to remove all terms in a formula that contain a particular interaction. For example, in the formula below, I'd like to remove all terms that contain the b:c interaction. > attributes(terms( ~ a*b*c*d))$term.labels [1] "a" "b" "c" "d" "a:b" "a:c" [7]
2017 Jul 12
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
Dear all, I am using the pls package of R to perform partial least square on a set of multivariate data. Instead of fitting a linear model, I want to fit my data with a quadratic function with interaction terms. But I am not sure how. I will use an example to illustrate my problem: Following the example in the PLS manual: ## Read data data(gasoline) gasTrain <- gasoline[1:50,] ## Perform
2010 Apr 28
1
Interaction terms in logistic regression using glm
I recently became aware of the article by Ai and Norton (2003) about how interaction terms are problematic in nonlinear regression (such as logistic regression). They offer a correct way of estimating interaction effects and their standard errors. My question is: Does the glm() function take these corrections into account when estimating interaction terms for a logistic regression
2017 Jul 13
0
Quadratic function with interaction terms for the PLS fitting model?
> On Jul 12, 2017, at 6:58 PM, Ng, Kelvin Sai-cheong <kscng at connect.hku.hk> wrote: > > Dear all, > > I am using the pls package of R to perform partial least square on a set of > multivariate data. Instead of fitting a linear model, I want to fit my > data with a quadratic function with interaction terms. But I am not sure > how. I will use an example to
2006 Jun 21
1
Adding routes via plugins
Hi, I''m attempting to add a route via a plugin. I attempted to add the following to my init.rb: myroute = ActionController::Routing::Routes.connect "boo2", :controller=>''plugin'', :action=>''index'' puts "path=#{myroute.path}" myroute.options.keys.each do |k| puts "#{k}=#{myroute.options[k]}" end The newly
2006 Jul 04
1
Column Selection
Hi All, I have 500 variables time series data for 10 years data. I have sorted 10 out of them according to them. Now my group is giving character string. But i want to fetch those varaible data from theoriginal data. How can i do this? Suppose, total is the data of 500*1500 data. Now i sort 10 variables. >grp >"A41" "A48","A489" Now how can i fetch only
2006 Nov 03
2
one row matrix
Hi, when I assign a one row matrix to another variable, then somehow R automatically convert that varaible into a list. For example: > a = matrix (12, 3, 4) > b = a[1,] > b [1] 12 12 12 12 Is there a way to enable R automatically make b as a one row matrix , rather than explicitly assign like matrix (b, ncol=1). I have come across a couple of time, that when I try to check how many
2017 Jul 13
2
Quadratic function with interaction terms for the PLS fitting model?
Dear all, I am using the pls package of R to perform partial least square on a set of multivariate data. Instead of fitting a linear model, I want to fit my data with a quadratic function with interaction terms. But I am not sure how. I will use an example to illustrate my problem: Following the example in the PLS manual: ## Read data data(gasoline) gasTrain <- gasoline[1:50,] ## Perform
2011 Dec 21
4
MS-DOS Batch File Commands
I'm trying to get the AndroidSDK going under Wine. There are problems with the MS-DOS commands (for example, the /D option with the 'For' command and the use of options to apply to the Path environment varaible (to prevent space being used as a delimiter between path folders) it uses in the supplied batch files it calls from a supplied .exe file. I presume that the cmd.exe (in