- Posts: 45
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
how to generate 0-1 variable by fixed possibility
- qiangqi
- Topic Author
- Offline
- Senior Member
Less
More
1 year 2 months ago #240059
by qiangqi
how to generate 0-1 variable by fixed possibility was created by qiangqi
Please help us help you and fill where relevant:
Your LimeSurvey version: [Limesurvey cloud 3.28.42]
Hi everyone,
in the first question, "how much possibility could you use the car of your household when you plan to go to a leisure activity, such as watching a movie, go to sports?" and the answers include 20%, 50%, and 80%. THEN, in the second question, I want to generate a 0-1 variable by the possibility got from the first question. Does anyone know whether it is possible to achieve it? Thanks for help in advance.
Best,
Qiang
Your LimeSurvey version: [Limesurvey cloud 3.28.42]
Hi everyone,
in the first question, "how much possibility could you use the car of your household when you plan to go to a leisure activity, such as watching a movie, go to sports?" and the answers include 20%, 50%, and 80%. THEN, in the second question, I want to generate a 0-1 variable by the possibility got from the first question. Does anyone know whether it is possible to achieve it? Thanks for help in advance.
Best,
Qiang
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12923
- Thank you received: 3977
1 year 2 months ago #240061
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic how to generate 0-1 variable by fixed possibility
Which type of question do you want to use for this 0-1?
Please give an example
Please give an example
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
1 year 2 months ago #240064
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic how to generate 0-1 variable by fixed possibility
The question seem to be "What is the probability in percent that you use your household's car for a leisure activity (e.g. to watch a movie or go to sports)??"
Are there more than these three ( 20%, 50%, and 80%) answer items? What about 0% and 100%?
What is the purpose of the dichotomous (0,1) variable?
Are there more than these three ( 20%, 50%, and 80%) answer items? What about 0% and 100%?
What is the purpose of the dichotomous (0,1) variable?
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12923
- Thank you received: 3977
1 year 2 months ago #240069
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic how to generate 0-1 variable by fixed possibility
Still rather clueless.
But a built in way to get dichotomous variables out of a single punched question is:
Use a multiple question.
In the export settings there is the option to change the "Y", "" to whatever character you like.
Otherwise you have to use some equations, like
eq20: {if(Q1=="20",1,0)}
eq50: {if(Q1=="50",1,0)}
...
Or you set a hidden multiple question by equation. Result the same as above. In the export you select your desired values
Like
{M1_1={if(Q1=="20","Y","")}
{M1_2={if(Q1=="50","Y","")}
...
Or you use a hidden question (multiple numbers) by equation.
Like
{M1_1={if(Q1=="20",1,0)}
{M1_2={if(Q1=="50",1,0)}
...
As you see, there are several options.
So, please explain.
(As we are not part of your TUE group who deals with the new ideas of public transportation, we have no idea what you want to achieve )
But a built in way to get dichotomous variables out of a single punched question is:
Use a multiple question.
In the export settings there is the option to change the "Y", "" to whatever character you like.
Otherwise you have to use some equations, like
eq20: {if(Q1=="20",1,0)}
eq50: {if(Q1=="50",1,0)}
...
Or you set a hidden multiple question by equation. Result the same as above. In the export you select your desired values
Like
{M1_1={if(Q1=="20","Y","")}
{M1_2={if(Q1=="50","Y","")}
...
Or you use a hidden question (multiple numbers) by equation.
Like
{M1_1={if(Q1=="20",1,0)}
{M1_2={if(Q1=="50",1,0)}
...
As you see, there are several options.
So, please explain.
(As we are not part of your TUE group who deals with the new ideas of public transportation, we have no idea what you want to achieve )
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
1 year 2 months ago #240090
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic how to generate 0-1 variable by fixed possibility
Like Jelo, find the question rather strange and I would guess that there is a very high probability that a family car will be used 100% for leisure activities for most respondents. Who has their family car just for work or chores?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
- qiangqi
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 45
- Thank you received: 0
1 year 2 months ago #240105
by qiangqi
Replied by qiangqi on topic how to generate 0-1 variable by fixed possibility
Hi Joffm,
Sorry for the late response. Thanks for your help. I think your methods are useful for me. I want to explore which transport respondent prefer to choose under some uncertain purposes. in fact, the private mode may be occupied by others in your household and the alternative should not be shown. This is why I want to make the alternative of Private car appear with a possibility.
Best,
Qiang
Sorry for the late response. Thanks for your help. I think your methods are useful for me. I want to explore which transport respondent prefer to choose under some uncertain purposes. in fact, the private mode may be occupied by others in your household and the alternative should not be shown. This is why I want to make the alternative of Private car appear with a possibility.
Best,
Qiang
Please Log in to join the conversation.
- qiangqi
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 45
- Thank you received: 0
1 year 2 months ago #240106
by qiangqi
Replied by qiangqi on topic how to generate 0-1 variable by fixed possibility
Hi Holch,
I want to set a possibility of car availability in normal. because it is possible that others in your household need to use it. For example, for the purpose of going shopping, statistically, you could use private car 6 times in 10 times and the other 4 time you could not use it, because others need it.
Best,
Qiang
I want to set a possibility of car availability in normal. because it is possible that others in your household need to use it. For example, for the purpose of going shopping, statistically, you could use private car 6 times in 10 times and the other 4 time you could not use it, because others need it.
Best,
Qiang
Please Log in to join the conversation.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
1 year 2 months ago #240107
by jelo
You better create a survey with a few questions and attach the LSS-export here. That might help to understand the complete context and the question types used.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic how to generate 0-1 variable by fixed possibility
I don't understand anything in context. What does "the private mode may be occupied by others"? I understand that you want to display/hide answer items with a certain probability. 20%, 50%, and 80% where not answers, but probabilities.I want to explore which transport respondent prefer to choose under some uncertain purposes. in fact, the private mode may be occupied by others in your household and the alternative should not be shown. This is why I want to make the alternative of Private car appear with a possibility.
You better create a survey with a few questions and attach the LSS-export here. That might help to understand the complete context and the question types used.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Please Log in to join the conversation.
- qiangqi
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 45
- Thank you received: 0
1 year 2 months ago #240108
by qiangqi
Replied by qiangqi on topic how to generate 0-1 variable by fixed possibility
Hi jelo,
the purpose of dichotomous (0,1) is to do statistic. under a certain purpose, what percentage is the private car is available for you?
Best,
Qiang
the purpose of dichotomous (0,1) is to do statistic. under a certain purpose, what percentage is the private car is available for you?
Best,
Qiang
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12923
- Thank you received: 3977
1 year 2 months ago #240109
by Joffm
But till now you did not provide an example.
How does the first question look like?
How is it to be transformed to your dichotomes?
Please, explain.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic how to generate 0-1 variable by fixed possibility
Yes, of course.the purpose of dichotomous (0,1) is to do statistic
But till now you did not provide an example.
How does the first question look like?
How is it to be transformed to your dichotomes?
Please, explain.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- qiangqi
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 45
- Thank you received: 0
1 year 2 months ago #240112
by qiangqi
Replied by qiangqi on topic how to generate 0-1 variable by fixed possibility
Hi joffm,
In fact, I have not done it. It is an idea until now. I will do it a.s.s.p and show here.
Best,
Qiang
In fact, I have not done it. It is an idea until now. I will do it a.s.s.p and show here.
Best,
Qiang
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12923
- Thank you received: 3977
1 year 2 months ago #240114
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic how to generate 0-1 variable by fixed possibility
But you certainly can show how the first question looks like.
Is it a single punch question with answer options "20%", "50%", "80%"?
Or is it a multiple numeric question where the repondent enters probabilities?
And how do you want to store the dichotomous results?
Multiple question with subquestions "20%", "50%", "80%"?
Several single questions with answer options "0" and "1"?
Array with subquestions "20%", "50%", "80%" and answer options "0" and "1"?
So, if a respondent selects "20%" in the first question, what has to be stored in the second?
You could even store a simple string like "010" or "001" in a text question (or comma separated ("0,1,0")
Everything possible and easy, but ou have to tell us.
Joffm
Is it a single punch question with answer options "20%", "50%", "80%"?
Or is it a multiple numeric question where the repondent enters probabilities?
And how do you want to store the dichotomous results?
Multiple question with subquestions "20%", "50%", "80%"?
Several single questions with answer options "0" and "1"?
Array with subquestions "20%", "50%", "80%" and answer options "0" and "1"?
So, if a respondent selects "20%" in the first question, what has to be stored in the second?
You could even store a simple string like "010" or "001" in a text question (or comma separated ("0,1,0")
Everything possible and easy, but ou have to tell us.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.