Questions tagged [interaction]

972 questions
30
votes
1 answer

Asterisk (*) vs. colon (:) in R formulas

I always thought that * and : meant the same thing when adding interaction terms in R formulas. For example: amount_of_gas ~ temperature*gas_type amount_of_gas ~ temperature:gas_type However, now that I've started using Generalized Linear Models…
Leo Ohyama
  • 887
  • 1
  • 9
  • 26
21
votes
2 answers

How to make all interactions before using glmnet

I have an x-matrix of 8 columns. I want to run glmnet to do a lasso regression. I know I need to call: glmnet(x, y, family = "binomial", ...). However, how do I get x to consider all one way interactions as well? Do I have to manually remake the…
user1357015
  • 11,168
  • 22
  • 66
  • 111
18
votes
4 answers

How to customize touch interaction on leaflet maps

How to customize leaflet maps to disable one-finger scroll on mobile devices and add two finger scroll like google maps (see https://developers.google.com/maps/documentation/javascript/interaction) I think something like a listener on finger down…
Patrick
  • 183
  • 1
  • 1
  • 6
17
votes
4 answers

Best way to plot interaction effects from a linear model

In an effort to help populate the R tag here, I am posting a few questions I have often received from students. I have developed my own answers to these over the years, but perhaps there are better ways floating around that I don't know about. The…
Jake
  • 743
  • 1
  • 5
  • 10
16
votes
1 answer

gbm::interact.gbm vs. dismo::gbm.interactions

Background The reference manual for the gbm package states the interact.gbm function computes Friedman's H-statistic to assess the strength of variable interactions. the H-statistic is on the scale of [0-1]. The reference manual for the dismo…
GNG
  • 239
  • 2
  • 11
14
votes
3 answers

Use EventTrigger on a specific key

I would like to invoke a command using EventTrigger when a particular key is touched (for example, the spacebar key) Currently I have:
lost_bits1110
  • 2,380
  • 6
  • 33
  • 44
14
votes
4 answers

How to create a COM object in a UWP application? (C#)

Question: How to create COM object in a Universal Windows Platform (UWP) application? Motivation: I want to switch from WPF to UWP. Since my workload requires making calls to third-party libraries accessible only through COM (so far as I know), I…
Nat
  • 1,085
  • 2
  • 18
  • 35
13
votes
3 answers

Send data from Activity to Fragment already created

I only have found information about how to create a Fragment sending some data to it, but only in its instantiation with the constructor. But I want to know if it is possible to send some data (for instance, two Double objects) to a Fragment from an…
sergio
  • 183
  • 1
  • 2
  • 11
12
votes
2 answers

Angular2: output/input versus event/ViewChild - Component interactions

Dears, The Golden Rules about web component interaction are: Parent references direct children Children doesn't reference parent Parent -> Child: via method calls Child -> Parent: via events This pattern worked for us in many projects (YUI,…
Gabriel
  • 121
  • 1
  • 4
12
votes
1 answer

Is it possible to make user input invisible as a 'sudo' password input?

I'm using raw_input() to receive password from user in interactive mode, but I want to make input symbols invisible for security reasons, as it is when you're typing your password using sudo or connecting to a database. How I should do it?
Enchantner
  • 1,534
  • 3
  • 20
  • 40
11
votes
1 answer

Table of Interactions - Case with pets and houses

I have a list of houses and a list of animal species. houses = c(1,1,2,3,4,4,4,4,5,6,5) animals = c('cat','dog','cat','dog','rat', 'cat', 'spider', 'snake', 'cat', 'cat', 'rat') I am trying to create a function that returns an upper triangular…
Remi.b
  • 17,389
  • 28
  • 87
  • 168
11
votes
3 answers

Barplot with significant differences and interactions?

I would like to visualize my data and ANOVA statistics. It is common to do this using a barplot with added lines indicating significant differences and interactions. How do you make plot like this using R? This is what I would like: Significant…
Jonas Lindeløv
  • 5,442
  • 6
  • 31
  • 54
10
votes
0 answers

Calculating marginal effects in Python with statsmodels' get_margeff command in logit model with interaction terms

I encountered a problem when working with statsmodels' get_margeff command for a logit model with interaction terms. While in a main effects models the effects are correctly calculated and correspond to Stata and R results, this is not the case when…
Patrick Patrick
  • 101
  • 1
  • 4
10
votes
2 answers

Using dplyr for frequency counts of interactions, must include zero counts

My question involves writing code using the dplyr package in R I have a relatively large dataframe (approx 5 million rows) with 2 columns: the first with an individual identifier (id), and a second with a date (date). At present, each row indicates…
Mark T Patterson
  • 397
  • 1
  • 2
  • 10
10
votes
2 answers

haskell and Unix shell scripting

is there any possibility to use haskell functions in unix shell scripts? for instance: #!/bin/bash ... var1=value ... # use haskell function with input from shell variable var1 # and store the result into another shell variable…
jimmyt
  • 491
  • 4
  • 10
1
2 3
64 65