HTML <button> value Attribute

Example Two buttons with equal names, that submit different values when clicked: <form action=”/action_page.php” method=”get”> Choose your favorite subject: <button name=”subject” type=”submit” value=”fav_HTML”>HTML</button> <button name=”subject” type=”submit” value=”fav_CSS”>CSS</button> </form> Try it Yourself » Definition and Usage The value attribute specifies the initial value for a <button> in a <form>. Note: In a form, the button and its value is only submitted if the button itself […]

Creating Bar Charts with Means by Category

One of the most common research questions is do different groups have different mean scores on some variable? This question is best answered in 3 steps: create a table showing mean scores per group -you’ll probably want to include the frequencies and standard deviations as well; create a chart showing mean scores per group; run some statistical test –ANOVA in this case. However, this […]

SPSS ALTER TYPE Reporting Wrong Values?

In some cases, ALTER TYPE in SPSS version 24 seems to report incorrect altered values when converting a string to a numeric value. This results in messed up data while SPSS reports that everything is fine. Let’s try and replicate the problem with the example below. Example We imported some .csv data in which some numeric values were flagged with an “a”. This indicates […]

Remove Value Label from Multiple Variables

Question “I’d like to completely remove the value label from a value for many variables at once. Is there an easy way to accomplish that?” SPSS Python Syntax Example begin program. variables = ‘v1 to v5‘ # Specify variables here. value = 3 # Specify value to unlabel here. import spss,spssaux vDict = spssaux.VariableDict(caseless = True) varList […]

SPSS Recode Values with Value Labels

Introduction In SPSS we sometimes find ordinal variables where lower values indicate more positive attitudes or larger quantities. An example is shown in the screenshot below. Now, the coding scheme shown above is not really ‘wrong’ in any way. However, we usually prefer higher values indicating more positive attitudes or larger quantities because we find this more […]