861 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
14
views
Split variable (object) to create Dummy variable using Pandas [duplicate]
I have the a dataset with 4 columns: user_id, number_of_clicks_before, order_before, personal_interest(see picture). I need to create a dummy variable for the variable personal_interest.
I tried this ...
0
votes
0
answers
23
views
Using dummy variables when data permits more than one category
I am creating a database of plant species and their traits. I have to create dummy variables for some categorical variables, but some of these variables can include more than one category for each ...
-2
votes
1
answer
118
views
Dummy Variable as Boolean rather than Integer [closed]
I'm working on a machine learning project in Python. Using pandas pd.get_dummies I'm trying to create dummy variables for a categorical column in my data but the variables are being converted to ...
3
votes
4
answers
156
views
create several dummy variables in dplyr base on a range
Unfortunately, I could not find a suitable simple solution.
Suppose I have a dataframe like this
set.seed(1)
data <- data.frame(ID = 1:20, value = sample(20))
ranges <- c(0, 5, 10, 15)
I want ...
1
vote
2
answers
131
views
Linear regression in R: Receiving different results based on dummy coding
I am performing a linear regression with one continuous predictor and one categorical (two levels) predictor. I have included the categorical factor as a named factor ("Control" and "BD&...
2
votes
1
answer
145
views
How to run a correlation test using dummy variables
I am quite new to using r and am struggling to find a few to actually find a pearson correlation coeffcient from a set data. I am attempting to analyze whether there is a correlation between scores ...
0
votes
0
answers
54
views
how to build a dummy with case_when?
i'm struggling on codes that worked well since this morning. I would like to create a dummy variable in this way:
for the group of observations identified by NCLP variable, it should take value 1 when ...
-1
votes
2
answers
67
views
Creating dummy variables for an R dataframe based on various groupings of months
Assume I have a dataframe with one column of class "Date" in R:
Date Sales Type
1 2012年03月22日 22 A
2 2012年03月22日 18 B
3 2012年04月11日 ...
-1
votes
1
answer
42
views
delete the dummy of 0s, if there is dummy of 1s. But keep 0s if there is no dummy of 1s, for two columns
the dataset like this:
a b c d
a1 b1 1 0
a1 b1 0 1
a1 b2 0 1
a1 b2 1 0
a2 b3 1 0
a2 b3 1 0
a2 b4 0 0
if a1&b1 as a pair, have the dummy of 1 and 0 for column c, and 0 and 1 for column d. I ...
2
votes
3
answers
299
views
ggplot geom_smooth() for linear regression dummy variable - no regression lines
I apologize in advance for my first question on this platform. I had browsed many threads, but most of the things I found do not involve any dummy variables.
However, after around 4 hours of ...
0
votes
1
answer
54
views
How to make searchview works for find my dummy data
I got stuck, i making some searchview for find my dummy item but still didnt work, anyone know how it works ? this is my dummy data
interface DummyMateriDataSource {
fun getMateriData(context:...
0
votes
1
answer
138
views
How to make dynamic source youtube url on dummy and show as a video
I don't know how to show a video as a dynamic source video url. This is my dummy
interface DummyMusicDataSource {
fun getMusicData(context: Context): List<Music>
}
class ...
0
votes
0
answers
216
views
Threshold and component GARCH (p,q)-M models augmented by past inflation and targeting dummy - Python code
I am a university student trying to replicate the paper 'Inflation and inflation uncertainty in the United Kingdom, evidence from GARCH modelling' by A. Kontonikas and I am looking for guidance ...
0
votes
1
answer
62
views
Assigning values based on varying and mutable criteria
I am generating a dataframe with dummy variables using the fastDummies for later modeling using two character variables.
The original looking something like this:
PID Flag1 Flag2 Var_1 Var_2
...
0
votes
2
answers
162
views
R ifelse dummy variable on multiple condition lookup
I have a huge dataset and I would like to insert a dummy variable column based on a set of conditions:
I have my main df (A) in which I have 5 million rows and 10 columns, where 4 of them are date;...